Orbit/app/views/admin/pages/_form.html.erb

96 lines
3.9 KiB
Plaintext
Raw Normal View History

<%= flash_messages %>
2011-06-01 02:24:14 +00:00
<%= f.error_messages %>
2012-02-19 19:22:53 +00:00
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
<%= f.hidden_field :id, :value => (@item.id), :id => "object_id" %>
2013-07-22 05:45:13 +00:00
<%= f.label :name, content_tag(:i, nil, :class => "icons-star") + t(:name) %>
<%= f.text_field :name, class: 'input-xlarge', placeholder: t(:name) %>
<span class="help-block"><%= I18n.t("front_page.name_field_helper") %></span>
2010-01-08 10:36:36 +00:00
2012-07-25 21:58:09 +00:00
<%= f.fields_for :title_translations do |f| %>
2012-05-13 12:13:26 +00:00
<% @site_valid_locales.each do |locale| %>
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}" %>
<%= f.text_field locale, class: 'input-xlarge', placeholder: "#{t(:title)} #{I18nVariable.from_locale(locale)}", value: (@item.title_translations[locale] rescue nil) %>
2012-05-13 12:13:26 +00:00
<% end %>
<% end %>
2010-01-08 10:36:36 +00:00
<%= f.label :design, t(:template_name) %>
<%= f.collection_select :design, @designs, :id, :title, {selected: (@selected[:design].id rescue nil) }, {rel: reload_themes_admin_pages_path, class: "input-xlarge"} %>
2013-01-21 08:56:37 +00:00
<%= f.label :theme, t(:theme) %>
<%= f.select :theme_id, @themes.collect { |t| [t.name.capitalize, t.id] }, {include_blank: true, selected: (@selected[:theme].id rescue nil) }, { class: "input-xlarge" } %>
<div id="module_app_list">
<label for="select_module_app">
<%= t("default_widget.select_module_app") %>
</label>
<%= f.select :module_app_id, options_from_collection_for_select(@module_apps, :id, :module_name, selected: (@selected[:module_app].id rescue nil)), {include_blank: true }, {rel: reload_after_module_changed_admin_pages_path, id: "page_module_app_id", class: "input-xlarge"} %>
2012-05-13 12:13:26 +00:00
</div>
2013-01-21 08:56:37 +00:00
<div id="frontend_list">
<label for="select_app_url">
<%= t("default_widget.select_app_url") %>
</label>
<div id="app_page_url">
<%= select('page','app_frontend_url', @app_frontend_urls || [], {selected: @selected[:app_frontend_url], rel: reload_after_list_changed_admin_pages_path}, class: "input-xlarge") rescue '' %>
2013-01-21 08:56:37 +00:00
</div>
</div>
<div id="app_page_category">
2013-01-21 08:56:37 +00:00
<%= render :partial=>"admin/page_parts/widget_data_source_category",:locals=>{:object=>@item} %>
</div>
<div id="app_page_tag">
2013-01-21 08:56:37 +00:00
<%= render :partial=>"admin/page_parts/widget_data_source_tag" ,:locals=>{:object=>@item}%>
</div>
<div id="frontend_setting">
<% if show_default_widget_setting_panel %>
<%= render :partial=>'admin/page_parts/widget_setting',:locals=>{:object=>@item,:f=>f} %>
<% end %>
2013-01-21 08:56:37 +00:00
</div>
<div id='data_count'>
2013-04-01 09:06:10 +00:00
<%= render :partial=>'data_count_field',:locals=>{:field_name=>"page[frontend_data_count]",:field_value=>@selected[:page_frontend_data_count]} %>
</div>
<%= f.label :is_published, "#{t('front_page.is_published')} ?" %>
<p>
<label class="radio inline">
<%= f.radio_button :is_published, true %>
<%= t(:yes_) %>
</label>
<label class="radio inline">
<%= f.radio_button :is_published, false %>
<%= t(:no_) %>
</label>
</p>
<%= f.label :menu_enabled_for, "#{t('front_page.menu_enable_lang')}:" %>
<p>
<% @site_valid_locales.each do |valid_locale| %>
<label class="checkbox inline">
2012-05-13 12:13:26 +00:00
<%= check_box_tag 'page[menu_enabled_for][]', valid_locale, (@item.menu_enabled_for.nil? ? true : @item.menu_enabled_for.include?(valid_locale)) %>
<%= I18nVariable.from_locale(valid_locale) %>
</label>
<% end %>
<%= hidden_field_tag 'page[menu_enabled_for][]', '' %>
</p>
2012-05-13 12:13:26 +00:00
<%= f.label :enabled_for, "#{t('front_page.link_enable_lang')}:" %>
<p>
<% @site_valid_locales.each do |valid_locale| %>
<label class="checkbox inline">
2012-05-13 12:13:26 +00:00
<%= check_box_tag 'page[enabled_for][]', valid_locale, (@item.enabled_for.nil? ? true : @item.enabled_for.include?(valid_locale)) %>
<%= I18nVariable.from_locale(valid_locale) %>
</label>
<% end %>
<%= hidden_field_tag 'page[enabled_for][]', '' %>
2013-07-22 05:45:13 +00:00
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
</div>
</div>
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
<%= javascript_include_tag "inc/page_widget_edit_interface.js" %>