Add categories for all the widgets
This commit is contained in:
1 parent
6a30b0a1e4
commit
18617850e5
4 files changed
+16
-3
No files matched your search
@@ -8,5 +8,5 @@
|
||||
|
||||
|
||||
<span id="widget_category">
|
||||
<%= select 'page_part', 'category', @categories.collect{|category| [category.i18n_variable[I18n.locale], category.id]}, :selected => @part[:category] %>
|
||||
<%= render 'widget_categories' %>
|
||||
</span>
|
||||
@@ -0,0 +1 @@
|
||||
<%= select 'page_part', 'category', @categories.collect{|category| [category.i18n_variable[I18n.locale], category.id]}, :selected => (@part ? @part[:category] : nil) if @categories && @categories.size > 0 %>
|
||||
@@ -1 +1,2 @@
|
||||
$('#widget_list select').html("<%= j options_for_select(@module_app.widgets.collect{|widget| [widget.humanize, widget]}) %>")
|
||||
$('#widget_list select').html("<%= j options_for_select(@module_app.widgets.collect{|widget| [widget.humanize, widget]}) %>")
|
||||
$('#widget_category').html("<%= j render 'widget_categories' %>")
|
||||
Reference in new issue
Block a user