This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/views/admin/sites/site_info.html.erb

85 lines
3.5 KiB
Plaintext

<% content_for :side_bar do %>
<%= render 'side_bar' %>
<% end %>
<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">
<% @site_valid_locales.each do |locale|%>
<%#= 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 %>
</ul>
<div class="tab-content form-horizontal">
<div class="control-group" style="margin-bottom: 0;">
<div class="controls">
<label class="checkbox">
<%= f.check_box :title_always_on %> <%= t 'admin.always_display_title' %>
</label>
</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">
<label class="control-label"><%= t 'admin.site_title' %></label>
<div class="controls">
<%= f.fields_for :title_translations do |f| %>
<%= f.text_field locale, :class => "input-xxlarge", :value => (@site.title_translations[locale] rescue nil) %>
<% end %>
<p class="help-block"><%= (t 'admin.site_title_help').html_safe %></p>
</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">
<label class="control-label"><%= t 'admin.site_keywords' %></label>
<div class="controls">
<% #TODO: set keywords into meta %>
<%= f.fields_for :keywords, @site.keywords do |f| %>
<%= f.text_area locale, :class => "input-xxlarge textarea-height-s" %>
<% end %>
<p class="help-block"><%= (t 'admin.site_keywords_help').html_safe %></p>
</div>
</div>
<div class="control-group">
<label class="control-label"><%= t 'admin.site_description' %></label>
<div class="controls">
<%= f.fields_for :description_translations do |f| %>
<%= f.text_area locale, :class => "input-xxlarge textarea-height-s", :value => (@site.description_translations[locale] %>
<% end %>
<p class="help-block"><%= (t 'admin.site_description_help').html_safe %></p>
</div>
</div>
<div class="control-group">
<label class="control-label"><%= t 'admin.site_footer' %></label>
<div class="controls">
<%= f.fields_for :footer_translations do |f| %>
<%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.footer_translations[locale] %>
<% end %>
<p class="help-block"><%= (t 'admin.site_footer_help').html_safe %></p>
</div>
</div>
<div class="control-group">
<label class="control-label"><%= t 'admin.site_sub_menu' %></label>
<div class="controls">
<%= f.fields_for :sub_menu_translations do |f| %>
<%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.sub_menu_translations[locale] %>
<% end %>
</div>
</div>
<% end %>
<% end %>
</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>