<div id="left">
<div class="blue">Actions</div>
<div class="articles">  	


 <%= link_to("New Page", :action => 'fnew') %>

<br />


  <%= loading_indicator_tag 'page', "new" %>
  <%= link_to_remote "Quick New",
      		      { :url => { :controller => 'Page', :action => 'new' }, 
			:loading => "AjaxScaffold.newOnLoading(request,'page');",
			:success => "AjaxScaffold.newOnSuccess(request,'page');",
			:failure => "AjaxScaffold.newOnFailure(request,'page');",
			:complete => "AjaxScaffold.newOnComplete(request,'page');" },
		      { :class => "create",
			 :href => url_for(:action => 'fnew') } %> 
	
			 
</div>

<div class="blue">Order By:</div>
<div class="articles">
<%= start_form_tag :action => 'update', :controller => 'options' %>

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

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

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

<div class="blue">Display Number:</div>
<div class="articles">
<select name="setting[page_display_number]" id="page_display_number">
<%= options_for_select(display_by_options, config_value('page_display_number')) %>
</select>
<%= submit_tag "Go" %>
<%= end_form_tag %>
</div>

<div id="page_search_box" style="display:none">
<div class="blue">Search Names:</div>
<div class="articles">
<input id="page_search" name="page_search_list" type="text" value="">
<%= observe_field 'page_search',  :frequency => 0.5, 
         :update => 'tablediv', :url => 
         { :controller => 'page', :action=> 'list' }, 
         :with => "'search=' + escape(value)",
         :loading => "$('page_search').className = 'blue_loader';",
         :success => "$('page_search').className = '';" %>
</div>
</div>

<script type="text/javascript">
Element.show('page_search_box');
</script>

</div>


<div id="content">

<div id="page-list-wrapper" class="list-wrapper">
<div id="page-list-header" class="list-header">
<div class="blue">Pages</div>
</div>

<div class="articles">
<div id="tablediv">
<table id="page-list" class="list" cellpadding="0" cellspacing="0">
  <thead>  

	 			  <tr class="header">
	 				<th scope="col" width="100">Name</th>
	 				<th scope="col">Edited/Created</th>
	 				<th scope="col">Author</th>
	 				<th scope="col">Actions</th>
	 			  </tr> 
		
  </thead>
  <tfoot id="page-tfoot">
  		  <tr>		<% if pagination_links(@page_pages) %>
  		  		<th scope="row">Page: </th>
  		  		<td colspan="4"><%= pagination_links(@page_pages) -%></td>
  		  		<% end %>
  		</tr>
 </tfoot>
  <tbody>
    <tr id="page-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('page');" %>   
      </td>
    </tr>
    <tr id="page-empty-message" class="empty-message" <%= " style=\"display:none;\" " if !@pages.empty? %>>
      <td colspan="<%= num_columns %>">No Entries</td>
    </tr>
  </tbody>  
  <tbody id="page-list-body">
    <% if !@pages.empty? %>
  	  <%= render :partial => 'page', :collection => @pages, :locals => { :hidden => false } %>
  	<% end %>
    <!-- Do not remove the following TR, it is needed to load up the even row color when enableHighlighting is turned on -->
    <tr class="even ignore" style="display: none;">
      <td colspan="<%= num_columns %>"></td>
    </tr>
  </tbody>
  
</table>
</div>

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

</div>
</div>
</div>