 <div id="left">
 <div class="blue">Actions</div>
 <div class="articles">
  <%= loading_indicator_tag 'flare', "new" %>
  <%= link_to_remote "Create New",
         { :url => { :controller => 'Feeds', :action => 'new' }, 
           :loading => "AjaxScaffold.newOnLoading(request,'flare');",
			     :success => "AjaxScaffold.newOnSuccess(request,'flare');",
			     :failure => "AjaxScaffold.newOnFailure(request,'flare');" },
         { :href => url_for(:controller => 'Feeds', :action => 'new'), 
			     :class => "create" } %>
</div>

<div class="blue">Go To</div>
<div class="articles">
  <%= link_to "View RSS", :action => 'rss' %>
<br />
  <%= link_to "View Atom", :action => 'atom' %>
  </div>
  
  <div class="blue">Order By:</div>
  <div class="articles">
  <%= start_form_tag :action => 'update', :controller => 'options' %>

  <select name="setting[feed_order_by]" id="feed_order_by">
  <%= options_for_select(feed_order_by_options, config_value('feed_order_by')) %>
  </select>
  
  <select name="setting[feed_display_order]" id="feed_display_order">
  <%= options_for_select(['asc','desc'], config_value('feed_display_order')) %>
  </select>

  <%= submit_tag "Go" %>
  </div>
  
  <div class="blue">Display Number:</div>
  <div class="articles">

  <select name="setting[feed_display_number]" id="feed_display_number">
  <%= options_for_select(display_by_options, config_value('feed_display_number')) %>
</select>

  <%= submit_tag "Go" %>
  <%= end_form_tag %>
</div>
</div>


<div id="content">
<div class="blue">Flares</div>
<div class="articles">
<div id="tablediv">
<table id="flare-list" class="list" cellpadding="0" cellspacing="0">
  <thead>  
	 <tr class="header">
		<th scope="col" width="100">Title</th>
		<th scope="col">Url</th>
		<th scope="col">Edited/Created</th>
		<th scope="col">Actions</th>
	 </tr>
  </thead>
   <tfoot id="page-tfoot">
    	 <tr>		
    	 <% if pagination_links(@flare_pages) %>
   	<th scope="row">Page: </th>
   	<td colspan="4"><%= pagination_links(@flare_pages) -%></td>
    	<% end %>
    	</tr>
 </tfoot>
  <tbody>
    <tr id="flare-error-message" class="error-message" style="display:none;">
      <td colspan="<%= num_columns - 1 %>">
          <p>An error has occurred</p>
      </td>
      <td class="actions">
         <%= link_to_function "Close", "AjaxScaffold.hideError('flare');" %>   
      </td>
    </tr>
    <tr id="flare-empty-message" class="empty-message" <%= " style=\"display:none;\" " if !@flares.empty? %>>
      <td colspan="<%= num_columns %>">No Entries</td>
    </tr>
  </tbody>  
  <tbody id="flare-list-body">
    <% if !@flares.empty? %>
  	  <%= render :partial => 'flare', :collection => @flares, :locals => { :hidden => false } %>
  	<% else %>
    <% # Do not remove the following TR, it is needed to load up the even row color when enableHighlighting is turned on and the list is empty %>
    <tr class="even ignore" style="display: none;">
      <td colspan="<%= num_columns %>"></td>
    </tr>
    <% end %>
  </tbody>
</table>
</div>
</div>

<div class="blue">Current Preferences</div>

<div class="articles">
<b>Title:</b><br />
<%= @feed_title %>
</div>

<div class="articles">
<b>Author:</b><br />
<%= @feed_author %>
</div>

<div class="articles">
<b>Description:</b><br />
<%= @feed_description %>
</div>

<div class="articles">
<b>Link:</b><br />
<%= @feed_link %>
</div>

<div class="articles">
<b>Actions:</b><br />
<%= link_to "Edit", :controller => 'options' %>
</div>

</div>

<script type="text/javascript">
TableBodyUtil.disableHighlighting(AjaxScaffold.getTableBodyElement('flare'));
</script>
