Ray's changes for site_info
This commit is contained in:
parent
0246341aef
commit
f534e6ca7b
|
@ -636,6 +636,22 @@
|
|||
.adbanner-action {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.textarea-height-s {
|
||||
resize: none;
|
||||
max-height: 150px;
|
||||
}
|
||||
.textarea-height-m {
|
||||
resize: none;
|
||||
max-height: 250px;
|
||||
}
|
||||
.textarea-height-l {
|
||||
resize: none;
|
||||
max-height: 350px;
|
||||
}
|
||||
.textarea-height-xl {
|
||||
resize: none;
|
||||
max-height: 500px;
|
||||
}
|
||||
[class^="icons-"] {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
|
|
|
@ -150,7 +150,7 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def active_when_current_locale_eq(locale)
|
||||
locale.to_sym == I18n.locale ? 'active': ''
|
||||
locale.to_sym == I18n.locale ? 'active in': ''
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<%= form_for @site, :url => admin_site_path(@site) do |f| %>
|
||||
<div id="poststuff">
|
||||
<%= form_for @site, :url => admin_site_path(@site), :html => {:class => "clear"} do |f| %>
|
||||
<div id="post-body">
|
||||
<div id="post-body-content" class="clear">
|
||||
<ul class="nav nav-tabs">
|
||||
|
@ -6,43 +7,53 @@
|
|||
<%#= 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) %>
|
||||
<% end %>
|
||||
<li>
|
||||
<%= f.submit t("submit"), :class => "btn btn-primary" %>
|
||||
<%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-content form-horizontal">
|
||||
<% @site_valid_locales.each do |locale|%>
|
||||
<%= content_tag :div, :class => "tab-pane #{active_when_current_locale_eq locale}", :id => "#{locale}" do %>
|
||||
<div>
|
||||
<%= t :title %>
|
||||
<%= f.fields_for :title, @site.title do |f| %>
|
||||
<%= f.text_field locale %>
|
||||
<% end %>
|
||||
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale}", :id => "#{locale}" do %>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t :title %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :title, @site.title do |f| %>
|
||||
<%= f.text_field locale, :class => "input-xxlarge" %>
|
||||
<% end %>
|
||||
<p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<%= t :keywords %>
|
||||
<%= f.fields_for :keywords, @site.keywords do |f| %>
|
||||
<%= f.text_field locale %>
|
||||
<% end %>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t :keywords %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :keywords, @site.keywords do |f| %>
|
||||
<%= f.text_area locale, :class => "input-xxlarge textarea-height-s" %>
|
||||
<% end %>
|
||||
<p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<%= t :description %>
|
||||
<%= f.fields_for :description, @site.description do |f| %>
|
||||
<%= f.text_field locale %>
|
||||
<% end %>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t :description %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :description, @site.description do |f| %>
|
||||
<%= f.text_area locale, :class => "input-xxlarge textarea-height-s" %>
|
||||
<% end %>
|
||||
<p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<%= t :footer %>
|
||||
<%= f.fields_for :footer, @site.footer do |f| %>
|
||||
<%= f.text_area locale, :class => "tinymce_textarea" %>
|
||||
<% end %>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t :footer %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :footer, @site.footer do |f| %>
|
||||
<%= f.text_area locale, :class => "tinymce_textarea input-xxlarge" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="form-actions">
|
||||
<%= f.submit t("submit"), :class => "btn btn-primary" %>
|
||||
<%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
Reference in New Issue