


<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>
  <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 !@mark_term.empty? %>>
        <td colspan="<%= num_columns %>">No Entries</td>
      </tr>
  </tbody>  
 <tbody id="page-list-body">
 <% for page in @mark_term %>
<tr id="view-page-<%= page.id %>">
	<td><%= link_to(h(page.name), :action => 'show', :id => page) %></td>
		    <td><%= distance_of_time_in_words_to_now page.updated_at %> ago</td>
	<td><%= page.created_by %></td>
 	<td class="actions">
 	  <div>
 	  <%= loading_indicator_tag 'page', "edit-#{page.id}" %>
   	<%= link_to_remote "Quick Edit",
   				{ :url => { :controller => 'Page', :action => 'edit', :id => page }, 
   				:loading => "AjaxScaffold.editOnLoading(request,'page', #{page.id});",
   				:success => "AjaxScaffold.editOnSuccess(request,'page', #{page.id});",
   				:failure => "AjaxScaffold.editOnFailure(request,'page', #{page.id});",
   				:complete => "AjaxScaffold.editOnComplete(request,'page', #{page.id});",
   				:post => true },
   				{ :href => url_for(:action => 'fedit', :id => page ) }
   				%>
   				
   	<%= link_to_remote('Overlay', 
   			{ :update => "boxcontent", 
   			:loading => "showLoader()", 
   			:complete => "showBox()", 
   			:url => { :action => 'overlay', :id => page } },
   			{ :href => url_for(:action => 'show', :id => page ) } )%>
   	
	<%= link_to 'Edit', :action => 'fedit', :id => page %>
   	<%= link_to_remote "Delete", 
	   			{	:url => { :controller => 'Page',:action => 'destroy', :id => page }, 
	   				:confirm => 'Are you sure?', 
	   				:loading => "AjaxScaffold.deleteOnLoading('page', #{page.id});",
	   				:success => "AjaxScaffold.deleteOnSuccess('page', #{page.id});",
	   				:failure => "AjaxScaffold.deleteOnFailure('page', #{page.id});",
	   				:complete => "AjaxScaffold.deleteOnComplete('page', #{page.id});",
   				:post => true },
   				{ :href => url_for(:action => 'confirm_delete', :id => page ) } %>
   	</div>
  </td>
</tr>
<% end %>
</tbody>
</table>
