<% # The following is used when the browser doesn't have javascript enabled %>
<% classAttr = cycle("", "class=\"even\"") %>
<tr <%= classAttr %> id="view-tag-<%= tag.id %>" <%= "style=\"display: none;\"" if hidden %>>
	<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>
