Add always_display checkbox for title in site_info independent of i18n

This commit is contained in:
Christophe Vilayphiou 2012-05-07 16:29:32 +08:00
parent 9a5e7cc8fa
commit 469f5c8267
1 changed files with 12 additions and 4 deletions

View File

@ -5,15 +5,19 @@
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<% @site_valid_locales.each do |locale|%> <% @site_valid_locales.each do |locale|%>
<%#= raise @site_valid_locales.inspect %> <%#= raise @site_valid_locales.inspect %>
<%= content_tag :li, link_to(I18nVariable.from_locale(locale), "##{locale}", :data => {:toggle => "tab"}), :class => (active_when_current_locale_eq locale) %> <%= content_tag :li, link_to(I18nVariable.from_locale(locale), ".#{locale}", :data => {:toggle => "tab"}), :class => (active_when_current_locale_eq locale) %>
<% end %> <% end %>
</ul> </ul>
<div class="tab-content form-horizontal"> <div class="tab-content form-horizontal">
<%= f.check_box :title_always_on %> <%= t 'admin.always_display_title' %>
<% @site_valid_locales.each do |locale|%>
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale}", :id => "#{locale}" do %>
<div class="control-group"> <div class="control-group">
<label class="control-label"><%= t 'admin.site_title' %></label> <label class="control-label"><%= t 'admin.site_title' %></label>
<div class="controls">
<%= f.check_box :title_always_on %> <%= t 'admin.always_display_title' %>
</div>
</div>
<% @site_valid_locales.each do |locale|%>
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
<div class="control-group">
<div class="controls"> <div class="controls">
<%= f.fields_for :title, @site.title do |f| %> <%= f.fields_for :title, @site.title do |f| %>
<%= f.text_field locale, :class => "input-xxlarge" %> <%= f.text_field locale, :class => "input-xxlarge" %>
@ -21,6 +25,10 @@
<p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
</div> </div>
</div> </div>
<% end %>
<% end %>
<% @site_valid_locales.each do |locale|%>
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
<div class="control-group"> <div class="control-group">
<label class="control-label"><%= t 'admin.keywords' %></label> <label class="control-label"><%= t 'admin.keywords' %></label>
<div class="controls"> <div class="controls">