% if params[:action] == "edit" %>
<%= @page.name %>
<% end %>
<% if params[:action] == "new" %>
<%= f.label :name, content_tag(:i, nil, :class => "icons-star") + t(:page)+' ID' %>
<%= f.text_field :page_id, class:"input-xlarge change", data: {"fv-validation" => "required;nospace;pageid_validation;detect_chinese;", "fv-messages" => "Cannot be empty.;Cannot have blank spaces.;Page id is already taken.;Page ID cannot be in chinese.;"} %>
<%= t("front_page.name_field_helper") %>
<% end %>
<% @site_in_use_locales.each do |locale| %>
<%= f.label :locale, "#{t(:title)} #{t(locale)}" %>
<%= f.fields_for :name_translations do |n| %>
<%= n.text_field locale, class:"input-xlarge change", data: {"fv-validation" => "required;", "fv-messages" => "Cannot be empty.;"}, :value=>@page.name_translations[locale] rescue nil %>
<% end %>
<% end %>
<%= t(:module) %> :
<%= f.select(:module, @modules.map{|m| [t('module_name.'+m.key),m.key]},{:include_blank => true},:class=>"module_select input-xlarge change", data: {"fv-validation" => "required;", "fv-messages" => "Cannot be empty.;"}) %>
<%= f.hidden_field :parent_page, value: (params[:parent_page] || @page.parent_page_id) %>
<%= f.hidden_field :page_type, value: "page" %>
<% if @module_app and @module_app.key.eql?("member") %>
<%= t(:sort) %>:
<%= f.radio_button :member_sort_position, false, checked: !@page.member_sort_position? %> <%= t(:sort_by_role_fields) %>
<%= f.radio_button :member_sort_position, true, checked: @page.member_sort_position?%> <%= t(:sort_manually) %>
<%= t(:sort_edit_order) %>
<%= t(:feilds_to_show_for_index) %>:
<% end %>
<%= t(:category)+" :" if params[:action] == "edit" && !@categories.blank? %>
<%= t(:tags)+" :" if params[:action] == "edit" && !@tags.blank? %>
<%= t(:role)+" :" if params[:action] == "edit" && !@roles.blank? %>
<% if params[:action] == "edit" %>
<% end %>
<%= t(:theme)+":" if params[:action] == "edit" && !@layout_types.blank? %>
<% if params[:action] == "edit" && !@layout_types.blank? %>
<% if @layout_types.first.kind_of?(Hash) %>
<% @layout_types.each do |lt| %>
" <%= (lt["filename"] == @page.layout ? "selected=selected" : "") %> data-image="<%= lt["thumbnail"] %>"><%= (lt["name"].kind_of?(Hash) ? lt["name"][I18n.locale.to_s] : lt["name"]) %>
<% end %>
<% else %>
<%= f.select(:layout, @layout_types) %>
<% end %>
<% end %>
<%= "Data count :" if params[:action] == "edit" && !@module_app.data_count.nil? %>
<% if params[:action] == "edit" %>
<% if !@module_app.data_count.nil? %>
<% (@module_app.data_count).each do |i| %>
><%= i %>
<% end %>
<% end %>
<% end %>
Enable for mobile
" <%= "checked" if @page.enabled_for_mobile %> />