forked from saurabh/orbit4-5
update structure form
This commit is contained in:
parent
36648d51a2
commit
f3882eee10
|
@ -1,3 +1,6 @@
|
|||
<% if params[:action] == "edit" %>
|
||||
<h4><%= @page.name %></h4>
|
||||
<% end %>
|
||||
<div class="control-group">
|
||||
<% if params[:action] == "new" %>
|
||||
<%= f.label :name, content_tag(:i, nil, :class => "icons-star") + t(:name) %>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
<% if params[:action] == "edit" %>
|
||||
<h4><%= @page.name %></h4>
|
||||
<% end %>
|
||||
|
||||
<div class="control-group">
|
||||
<% if params[:action] == "new" %>
|
||||
<label class="control-label">Page id :</label>
|
||||
<%= f.label :name, content_tag(:i, nil, :class => "icons-star") + t(:name) %>
|
||||
<div class="controls">
|
||||
<%= f.text_field :page_id, data: {"fv-validation" => "required;nospace;pageid_validation;", "fv-messages" => "Cannot be empty.;Cannot have blank spaces;Page id is already taken.;"} %>
|
||||
<%= f.text_field :page_id, class: "input-xlarge change", data: {"fv-validation" => "required;nospace;pageid_validation;", "fv-messages" => "Cannot be empty.;Cannot have blank spaces;Page id is already taken.;"} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="controls">
|
||||
|
@ -16,17 +15,17 @@
|
|||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<% I18n.available_locales.each do |locale| %>
|
||||
<label class="control-label">Page name (<%= t(locale.to_s) %>) :</label>
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
<label class="control-label">Link name (<%= t(locale.to_s) %>) :</label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :name_translations do |n| %>
|
||||
<%= n.text_field locale, data: {"fv-validation" => "required;", "fv-messages" => "Cannot be empty.;"}, :value=>@page.name_translations[locale] rescue nil %>
|
||||
<%= 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 %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<% I18n.available_locales.each do |locale| %>
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
<label class="control-label">Url (<%= t(locale.to_s) %>) :</label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :external_url_translations do |n| %>
|
||||
|
@ -42,15 +41,15 @@
|
|||
end
|
||||
end
|
||||
%>
|
||||
<%= n.text_field locale, :value=>url rescue nil %>
|
||||
<%= n.text_field locale, class:"input-xlarge change", :value=>url rescue nil %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="control-group" id="enable-menu">
|
||||
<div class="controls">
|
||||
<label class="control-label">Activation :</label>
|
||||
<% I18n.available_locales.each do |locale| %>
|
||||
<label class="control-label"><%= t(:is_published) %> :</label>
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="page[enabled_for][]" value="<%= locale.to_s %>" class="main-enable-parent" for="<%= "checkbox_for_#{locale}" %>" <%= "checked" if @page.enabled_for.include? locale.to_s %> />
|
||||
<%= t(locale.to_s) %>
|
||||
|
@ -70,3 +69,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#pageslide .content").css("padding","15px");
|
||||
</script>
|
Loading…
Reference in New Issue