115 lines
4.8 KiB
Plaintext
115 lines
4.8 KiB
Plaintext
<%= f.error_messages %>
|
|
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
|
|
|
|
<div class="control-group">
|
|
<%= f.label :name, '*'+t(:name), :class => 'control-label' %>
|
|
|
|
|
|
<div class="controls">
|
|
<%= f.text_field :name, :class => 'text input-xlarge' %>
|
|
<span class="help-inline">請輸入數字或英文,不可使用空白</span>
|
|
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
|
</div>
|
|
</div>
|
|
|
|
<%= f.fields_for :title_translations do |f| %>
|
|
<% @site_valid_locales.each do |locale| %>
|
|
<div class="control-group">
|
|
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
|
|
<div class="controls">
|
|
<%= f.text_field locale, :class => 'text input-xlarge', :value => (@item.title_translations[locale] rescue nil) %>
|
|
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<div class="control-group">
|
|
<%= f.label :name, t(:template_name), :class => 'control-label' %>
|
|
<div class="controls">
|
|
<%= f.collection_select :design, @designs, :id, :title, {:selected => @design.id}, {:rel => reload_themes_admin_pages_path} %>
|
|
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<%= f.label :name, t(:theme), :class => 'control-label' %>
|
|
<div class="controls">
|
|
<%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %>
|
|
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
|
</div>
|
|
</div>
|
|
|
|
<div class="control-group" id="module_app_list">
|
|
<%= f.label '',t("default_widget.select_module_app"), :class => 'control-label' %>
|
|
<div class="controls">
|
|
<%= f.select :module_app_id, options_from_collection_for_select(@module_apps, :id, :module_name, :selected => (@module_app.id rescue nil)), {:include_blank => true }, {:rel => reload_after_module_changed_admin_pages_path,:id=>"page_module_app_id"} %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="control-group" id="frontend_list">
|
|
<%= f.label '', t("front_page.select_app_url"), :class => 'control-label' %>
|
|
<div class="controls" id="app_page_url">
|
|
<%= select('page','app_frontend_url', @app_frontend_urls || [],{}, {:selected => (@item.app_frontend_url || 'default_widget'),:rel => reload_after_list_changed_admin_pages_path}) rescue ''%>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div id="app_page_category" class="control-group">
|
|
<%= render :partial=>"admin/page_parts/widget_data_source_category",:locals=>{:object=>@item} %>
|
|
</div>
|
|
|
|
<div id="app_page_tag" class="control-group">
|
|
<%= render :partial=>"admin/page_parts/widget_data_source_tag" ,:locals=>{:object=>@item}%>
|
|
</div>
|
|
|
|
<div id="frontend_setting">
|
|
<%= render :partial => 'frontend_setting', :locals=>{:object=>@item,:f=>f} %>
|
|
</div>
|
|
|
|
<div class="control-group" id='data_count'>
|
|
<%= render :partial=>'data_count_field',:locals=>{:field_name=>"page[frontend_data_count]",:field_value=>@item.frontend_data_count} %>
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
<%= f.label :is_published, "#{t('front_page.is_published')} ?", :class => 'control-label' %>
|
|
<div class="controls">
|
|
<label class="radio">
|
|
<%= f.radio_button :is_published, true %>
|
|
Yes
|
|
</label>
|
|
<label class="radio">
|
|
<%= f.radio_button :is_published, false %>
|
|
No
|
|
</label>
|
|
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<%= f.label :menu_enabled_for, "#{t('front_page.menu_enable_lang')}:", :class => 'control-label' %>
|
|
<div class="controls">
|
|
<% @site_valid_locales.each do |valid_locale| %>
|
|
<label class="checkbox">
|
|
<%= 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 class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
|
</div>
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
<%= f.label :enabled_for, "#{t('front_page.link_enable_lang')}:", :class => 'control-label' %>
|
|
<div class="controls">
|
|
<% @site_valid_locales.each do |valid_locale| %>
|
|
<label class="checkbox">
|
|
<%= 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][]', '' %>
|
|
<!-- <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" %> |