
<table id="tag-list" class="list" cellpadding="0" cellspacing="0">
  <thead>  
	    <tr class="header">
	 		<th scope="col" width="120">Name</th>
	 		<th scope="col">Edited/Created</th>
	 		<th scope="col">Actions</th>
	    </tr> 
  </thead>
  <tbody>
    <tr id="tag-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('tag');" %>   
      </td>
    </tr>
    <tr id="tag-empty-message" class="empty-message" <%= " style=\"display:none;\" " if !@mark_term.empty? %>>
      <td colspan="<%= num_columns %>">No Entries</td>
    </tr>
  </tbody>  
  <tbody id="tag-list-body">

<% for tag in @mark_term %>

<tr id="view-tag-<%= tag.id %>">
<td><%= link_to tag.name, :action => 'show', :id => tag %></td>
<td><%=distance_of_time_in_words_to_now tag.updated_at %> ago</td>
 	<td class="actions">
 	  <div>
 	  <%= loading_indicator_tag 'tag', "edit-#{tag.id}" %>
   	<%= link_to_remote "Edit", 
   	                    { :url => { :controller => 'Tags', :action => 'edit', :id => tag }, 
   	                      :loading => "AjaxScaffold.editOnLoading(request,'tag', #{tag.id});",
   	                      :success => "AjaxScaffold.editOnSuccess(request,'tag', #{tag.id});",
   	                      :failure => "AjaxScaffold.editOnFailure(request,'tag', #{tag.id});",
   	                      :post => true },
   	                    { :href => url_for( :controller => 'Tags', :action => 'edit', :id => tag ) } %>
   	                    
   	           <%= link_to_remote('Overlay', 
		      			{ :update => "boxcontent", 
		      			:loading => "showLoader()", 
		      			:complete => "showBox()", 
		      			:url => { :action => 'overlay', :id => tag } },
   			{ :href => url_for(:action => 'show', :id => tag ) } )%>
   			
   	<%= link_to_remote "Delete", 
   	                    { :url => { :controller => 'Tags',:action => 'destroy', :id => tag }, 
   	                      :confirm => 'Are you sure?', 
   	                      :loading => "AjaxScaffold.deleteOnLoading('tag', #{tag.id});",
   	                      :success => "AjaxScaffold.deleteOnSuccess('tag', #{tag.id});",
   	                      :failure => "AjaxScaffold.deleteOnFailure('tag', #{tag.id});",
   	                      :post => true },
   	                    { :href => url_for(:controller => 'Tags', :action => 'destroy', :id => tag) } %>
   	</div>
  </td>
</tr>
<% end %>
</tbody>
</table>

