Merge branch 'design_team' of github.com:Rulingcom/orbit into design_team

Conflicts:
	app/views/admin/sites/site_info.html.erb
This commit is contained in:
Christophe Vilayphiou 2012-05-07 16:08:05 +08:00
commit 9a5e7cc8fa
3 changed files with 58 additions and 31 deletions

View File

@ -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;

View File

@ -160,7 +160,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

View File

@ -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,44 +7,54 @@
<%#= 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">
<%= f.check_box :title_always_on %> <%= t 'admin.always_display_title' %>
<% @site_valid_locales.each do |locale|%>
<%= content_tag :div, :class => "tab-pane #{active_when_current_locale_eq locale}", :id => "#{locale}" do %>
<div>
<%= t 'admin.site_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 'admin.site_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 'admin.keywords' %>
<%= f.fields_for :keywords, @site.keywords do |f| %>
<%= f.text_field locale %>
<% end %>
<div class="control-group">
<label class="control-label"><%= t 'admin.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 'admin.site_description' %>
<%= f.fields_for :description, @site.description do |f| %>
<%= f.text_field locale %>
<% end %>
<div class="control-group">
<label class="control-label"><%= t 'admin.site_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 'admin.site_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 'admin.site_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>
<div class="form-actions">
<%= f.submit t("submit"), :class => "btn btn-primary" %>
<%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %>
</div>
<% end %>
</div>