diff --git a/app/views/pages/_form.html.erb b/app/views/pages/_form.html.erb index d2c0b34..9f7abed 100644 --- a/app/views/pages/_form.html.erb +++ b/app/views/pages/_form.html.erb @@ -1,3 +1,6 @@ +<% if params[:action] == "edit" %> +

<%= @page.name %>

+<% end %>
<% if params[:action] == "new" %> <%= f.label :name, content_tag(:i, nil, :class => "icons-star") + t(:name) %> diff --git a/app/views/pages/_form_link.html.erb b/app/views/pages/_form_link.html.erb index 093cd58..ce59176 100644 --- a/app/views/pages/_form_link.html.erb +++ b/app/views/pages/_form_link.html.erb @@ -1,12 +1,11 @@ <% if params[:action] == "edit" %>

<%= @page.name %>

<% end %> -
<% if params[:action] == "new" %> - + <%= f.label :name, content_tag(:i, nil, :class => "icons-star") + t(:name) %>
- <%= 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.;"} %>
<% end %>
@@ -16,17 +15,17 @@
- <% I18n.available_locales.each do |locale| %> - + <% @site_in_use_locales.each do |locale| %> +
<%= 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 %>
<% end %>
- <% I18n.available_locales.each do |locale| %> + <% @site_in_use_locales.each do |locale| %>
<%= 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 %>
<% end %>
- - <% I18n.available_locales.each do |locale| %> + + <% @site_in_use_locales.each do |locale| %>
<% end %>
-
\ No newline at end of file +
+ + \ No newline at end of file