Initial commit of foodsoft 2

This commit is contained in:
Benjamin Meichsner 2009-01-06 11:49:19 +01:00
commit 5b9a7e05df
657 changed files with 70444 additions and 0 deletions

View file

@ -0,0 +1,7 @@
<% remote_form_for :article_category, :url => { :action => 'updateCategory', :id => @article_category },
:before => "Element.show('loader')",
:success => "Element.hide('loader')" do |@f| %>
<%= render :partial => '/article_categories/form' %>
<br />
<%= submit_tag "Speichern" %> | <%= link_to_function("Abbrechen", "Element.hide('category_form')") %>
<% end %>

View file

@ -0,0 +1,17 @@
<%= error_messages_for 'article_category' %>
<!--[form:article_category]-->
<table>
<tr>
<th>Name</th>
<th>Beschreibung</th>
</tr>
<tr>
<td><label for="article_category_name">
<%= @f.text_field 'name', :size => 20 %></label></td>
<td><label for="article_category_description">
<%= @f.text_field 'description', :size => 30 %></label></td>
</tr>
</tabel>
<!--[eoform:article_category]-->

View file

@ -0,0 +1,22 @@
<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(image_tag('b_edit.png', :size => "16x16", :border => "0", :alt => 'Katgerie bearbeiten'),
:url => {:action => 'editCategory', :id => article_category},
:before => "Element.show('loader')",
:success => "Element.hide('loader')" ) %></td>
<td><%= link_to_remote(image_tag('b_drop.png', :size => "16x16", :border => "0", :alt => 'Kategorie löschen'), :url => {:action => 'destroyCategory', :id => article_category }, :confirm => 'Are you sure?' )%></td>
</tr>
<% end %>
</table>
<br />
<%= link_to_remote('Neue Kategorie', :url => {:action => :newCategory},
:before => "Element.show('loader')",
:success => "Element.hide('loader')") -%>

View file

@ -0,0 +1,7 @@
<% remote_form_for :article_category, :url => { :action => 'createCategory', :id => @article_category },
:before => "Element.show('loader')",
:success => "Element.hide('loader')" do |@f| %>
<%= render :partial => '/article_categories/form' %>
<br />
<%= submit_tag "Speichern" %> | <%= link_to_function("Abbrechen", "Element.hide('category_form')") %>
<% end %>