foodsoft/app/views/article_categories/_list.rhtml

28 lines
1.1 KiB
Plaintext

<table>
<tr>
<th>Name</th>
<th>Beschreibung</th>
<th colspan="2"></th>
</tr>
<% for article_category in ArticleCategory.find(:all) -%>
<tr class="<%= cycle("even","odd", :name => 'category') -%>" id="category_<%= article_category.id -%>">
<td><%=h article_category.name -%></td>
<td><%=h article_category.description -%></td>
<td><%= link_to_remote icon(:edit),
:url => edit_article_category_path(article_category),
:method => :get,
:before => "Element.show('loader')",
:success => "Element.hide('loader')" -%></td>
<td><%= link_to_remote icon(:delete),
:url => article_category,
:method => :delete,
:confirm => 'Are you sure?' -%></td>
</tr>
<% end -%>
</table>
<br />
<%= link_to_remote 'Neue Kategorie', :url => new_article_category_path,
:method => :get,
:before => "Element.show('loader')",
:success => "Element.hide('loader')" %>