first version of multi categories and tags
This commit is contained in:
1 parent
96455f31e1
commit
b315215bed
12 files changed
+142
-34
No files matched your search
@@ -10,9 +10,9 @@
|
||||
<div class="well controls">
|
||||
<% if @categories %>
|
||||
<fieldset>
|
||||
<%= nil_radio_button(object,:category) %>
|
||||
<%= nil_checkbox_button(object,:category) %>
|
||||
<%= content_tag_for(:label, @categories,:class=>"radio inline") do |category|%>
|
||||
<%= radio_button_tag("#{field_name}[category]", category.id, category_checked_value(object,category.id) )%>
|
||||
<%= check_box_tag("#{field_name}[category][]", category.id, category_checked_value(object,category.id),:class=>'select_option' )%>
|
||||
<%= category.title%>
|
||||
<% end %>
|
||||
</fieldset>
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<div class="well controls">
|
||||
<% if @categories %>
|
||||
<fieldset>
|
||||
<%= nil_radio_button(object,:tag) %>
|
||||
<%= nil_checkbox_button(object,:tag) %>
|
||||
<%= content_tag_for(:label, @tags,:class=>"radio inline") do |tag|%>
|
||||
<%= radio_button_tag("#{field_name}[tag]", tag.id, tag_checked_value(object,tag.id) ) %>
|
||||
<%= check_box_tag("#{field_name}[tag][]", tag.id, tag_checked_value(object,tag.id),:class=>'select_option' ) %>
|
||||
<%= tag[I18n.locale]%>
|
||||
<% end if @tags%>
|
||||
</fieldset>
|
||||
|
||||
@@ -2,4 +2,10 @@
|
||||
<%= render 'admin/items/site_map_left_bar' %>
|
||||
<% end -%>
|
||||
|
||||
<%= render 'edit' %>
|
||||
|
||||
|
||||
|
||||
|
||||
<%= render 'edit' %>
|
||||
|
||||
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
|
||||
@@ -4,3 +4,4 @@
|
||||
<% end -%>
|
||||
|
||||
<%= render 'edit' %>
|
||||
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
|
||||
Reference in new issue
Block a user