Add new created files to previous commit
This commit is contained in:
parent
e0accbecaa
commit
4389f0cf28
|
@ -0,0 +1,19 @@
|
|||
<%= @part.inspect %><br/><br/>
|
||||
|
||||
<%= form_for @part, :url => admin_page_part_path(@part) do |f| %>
|
||||
|
||||
<% LIST[:page_part_kinds].each do |kind| %>
|
||||
<%= f.radio_button :kind, kind, :class => 'part_kind' %>
|
||||
<%= t(kind) %>
|
||||
<% end %>
|
||||
|
||||
<% LIST[:page_part_kinds].each do |kind| %>
|
||||
<div id='<%= "part_#{kind}" %>' class='part_kind_partial' style="display:<%= kind.eql?(@part.kind) ? 'block' : 'none' %>">
|
||||
<%= render :partial => kind, :locals => {:f => f} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= f.submit t(:update) %> <%= link_back %>
|
||||
</p>
|
||||
<% end %>
|
|
@ -0,0 +1,7 @@
|
|||
<span id='module_app_list'>
|
||||
<%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :title, :selected => @module_app.id), {}, {:rel => admin_page_parts_path} %>
|
||||
</span>
|
||||
|
||||
<span id='widget_list'>
|
||||
<%= f.select :widget_path, @module_app.widgets.collect{|widget| [widget.humanize, widget]}, :selected => @part.widget_path %>
|
||||
</span>
|
|
@ -0,0 +1,7 @@
|
|||
<span id='tag_list'>
|
||||
<%= f.select :public_r_tag, LIST[:public_r_tags].collect{|tag| [t(tag), tag]}, :selected => @r_tag %>
|
||||
</span>
|
||||
|
||||
<span id='name_list'>
|
||||
<%= f.select :public_r_tag_object_id, options_from_collection_for_select(@tag_objects, :id, :title, :selected => @part.public_r_tag_object_id) %>
|
||||
</span>
|
|
@ -0,0 +1,8 @@
|
|||
<%= f.fields_for :i18n_variable, (@part.i18n_variable ? @part.i18n_variable : @part.build_i18n_variable) do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<div>
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
<%= f.text_field locale %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -0,0 +1 @@
|
|||
$('#widget_list select').html("<%= j options_for_select(@module_app.widgets.collect{|widget| [widget.humanize, widget]}) %>")
|
|
@ -0,0 +1,11 @@
|
|||
module ActiveSupport::Inflector
|
||||
def dehumanize(the_string)
|
||||
the_string.gsub(' ', '_').downcase
|
||||
end
|
||||
end
|
||||
|
||||
class String
|
||||
def dehumanize
|
||||
ActiveSupport::Inflector.dehumanize(self)
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue