Update category and tag

This commit is contained in:
manson committed 2014-05-16 16:26:43 +08:00
1 parent 8e5f1af790
commit 325838cf59
2 files changed
+18 -11

No files matched your search

+2 -9
View File
@@ -40,7 +40,7 @@
<div class="control-group">
<label class="control-label muted"><%= t(:category) %></label>
<div class="controls">
<%= f.select :category_id, @categories.collect{|t| [ t.title, t.id ]} %>
<%= select_category(f, @module_app) %>
</div>
</div>
@@ -81,14 +81,7 @@
<!-- Tag -->
<div class="control-group">
<label class="control-label muted"><%= t(:tags) %></label>
<div class="controls" data-toggle="buttons-checkbox">
<% @tags.each do |tag| %>
<label class="checkbox inline btn <%= 'active' if @archive_file.tags.include?(tag) %>">
<%= check_box_tag 'archive_file[tags][]', tag.id, @archive_file.tags.include?(tag) %> <%= tag.name %>
<%= hidden_field_tag 'archive_file[tags][]', '' %>
</label>
<% end %>
</div>
<%= select_tag(f, @module_app) %>
</div>
</div>