change sub_menu to header in site setting

This commit is contained in:
Rueshyna 2013-01-03 14:46:02 +08:00
parent 80f545966e
commit cb3a9ea98b
3 changed files with 106 additions and 104 deletions

View File

@ -1,112 +1,112 @@
<% # encoding: utf-8 %> <% # encoding: utf-8 %>
<% content_for :side_bar do %> <% content_for :side_bar do %>
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %> <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %>
<% end %> <% end %>
<div id="poststuff"> <div id="poststuff">
<%= form_for @site, :url => admin_site_path(@site), :html => {:class => "clear"} do |f| %> <%= form_for @site, :url => admin_site_path(@site), :html => {:class => "clear"} do |f| %>
<div id="post-body"> <div id="post-body">
<div id="post-body-content" class="clear"> <div id="post-body-content" class="clear">
<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">
<div class="control-group" style="margin-bottom: 0;"> <div class="control-group" style="margin-bottom: 0;">
<div class="controls"> <div class="controls">
<label class="checkbox"> <label class="checkbox">
<%= f.check_box :title_always_on %> <%= t :always_display_title %> <%= f.check_box :title_always_on %> <%= t :always_display_title %>
</label> </label>
</div> </div>
</div> </div>
<% @site_valid_locales.each do |locale|%> <% @site_valid_locales.each do |locale|%>
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %> <%= 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 'site.title' %></label> <label class="control-label"><%= t 'site.title' %></label>
<div class="controls"> <div class="controls">
<%= f.fields_for :title_translations do |f| %> <%= f.fields_for :title_translations do |f| %>
<%= f.text_field locale, :class => "input-xxlarge", :value => (@site.title_translations[locale] rescue nil) %> <%= f.text_field locale, :class => "input-xxlarge", :value => (@site.title_translations[locale] rescue nil) %>
<% end %> <% end %>
<p class="help-block"><%= (t 'site.title_help').html_safe %></p> <p class="help-block"><%= (t 'site.title_help').html_safe %></p>
</div> </div>
</div> </div>
<% end %> <% end %>
<% end %> <% end %>
<div class="control-group"> <div class="control-group">
<label class="control-label"><%= t 'site.search' %></label> <label class="control-label"><%= t 'site.search' %></label>
<div class="controls"> <div class="controls">
<%= text_field_tag 'site[search][domains]',(@site.search["domains"] rescue nil), {:class => "input-xxlarge" ,:placeholder => t("search.domains") }%> <%= text_field_tag 'site[search][domains]',(@site.search["domains"] rescue nil), {:class => "input-xxlarge" ,:placeholder => t("search.domains") }%>
<%= text_field_tag 'site[search][sitesearch]',(@site.search["sitesearch"] rescue nil),{ :class => "input-xxlarge" ,:placeholder => t("search.sitesearch") }%> <%= text_field_tag 'site[search][sitesearch]',(@site.search["sitesearch"] rescue nil),{ :class => "input-xxlarge" ,:placeholder => t("search.sitesearch") }%>
<p class="help-block"><%= (t 'site.search_help').html_safe %></p> <p class="help-block"><%= (t 'site.search_help').html_safe %></p>
</div> </div>
</div> </div>
<% @site_valid_locales.each do |locale|%> <% @site_valid_locales.each do |locale|%>
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %> <%= 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 'site.keywords' %></label> <label class="control-label"><%= t 'site.keywords' %></label>
<div class="controls"> <div class="controls">
<%= f.fields_for :keywords do |f| %> <%= f.fields_for :keywords do |f| %>
<%= f.text_area locale, :class => "input-xxlarge textarea-height-s", :value => (@site.keywords(locale) rescue nil) %> <%= f.text_area locale, :class => "input-xxlarge textarea-height-s", :value => (@site.keywords(locale) rescue nil) %>
<% end %> <% end %>
<p class="help-block"><%= (t 'site.keywords_help').html_safe %></p> <p class="help-block"><%= (t 'site.keywords_help').html_safe %></p>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label"><%= t 'site.description' %></label> <label class="control-label"><%= t 'site.description' %></label>
<div class="controls"> <div class="controls">
<%= f.fields_for :description do |f| %> <%= f.fields_for :description do |f| %>
<%= f.text_area locale, :class => "input-xxlarge textarea-height-s", :value => (@site.description(locale) rescue nil) %> <%= f.text_area locale, :class => "input-xxlarge textarea-height-s", :value => (@site.description(locale) rescue nil) %>
<% end %> <% end %>
<p class="help-block"><%= (t 'site.description_help').html_safe %></p> <p class="help-block"><%= (t 'site.description_help').html_safe %></p>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label"><%= t 'site.footer' %></label> <label class="control-label"><%= t 'site.header' %></label>
<div class="controls"> <div class="controls">
<%= f.fields_for :footer_translations do |f| %> <%= f.fields_for :sub_menu_translations do |f| %>
<%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.footer_translations[locale] rescue nil) %> <%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.sub_menu_translations[locale] rescue nil) %>
<% end %> <% end %>
<p class="help-block"><%= (t 'site.footer_help').html_safe %></p> </div>
</div> </div>
</div> <div class="control-group">
<div class="control-group"> <label class="control-label"><%= t 'site.footer' %></label>
<label class="control-label"><%= t 'site.sub_menu' %></label> <div class="controls">
<div class="controls"> <%= f.fields_for :footer_translations do |f| %>
<%= f.fields_for :sub_menu_translations do |f| %> <%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.footer_translations[locale] rescue nil) %>
<%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.sub_menu_translations[locale] rescue nil) %> <% end %>
<% end %> <p class="help-block"><%= (t 'site.footer_help').html_safe %></p>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label"><%= t 'site.default_image' %></label> <label class="control-label"><%= t 'site.default_image' %></label>
<div class="controls"> <div class="controls">
<%= f.file_field :default_image, :id => "input-upload", :class => 'upload', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %> <%= f.file_field :default_image, :id => "input-upload", :class => 'upload', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>
<span id='fu' class="file-name"></span> <span id='fu' class="file-name"></span>
<!--請程式務必將圖片尺寸加入到行內裡--> <!--請程式務必將圖片尺寸加入到行內裡-->
<% if @site.default_image %> <% if @site.default_image %>
<%= image_tag( @site.default_image, :size=>"120x120") rescue ''%> <%= image_tag( @site.default_image, :size=>"120x120") rescue ''%>
<% else %> <% else %>
<img class="pull-left upload-picture" src="/assets/default-img.png" /> <img class="pull-left upload-picture" src="/assets/default-img.png" />
<% end %> <% end %>
<br> <br>
<% if @site.default_image.file %> <% if @site.default_image.file %>
<%= f.check_box :remove_default_image %> <%= f.check_box :remove_default_image %>
<%= t('刪除已上傳檔案') %> <%= t('刪除已上傳檔案') %>
<% end %> <% end %>
</div> </div>
</div> </div>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
</div> </div>
</div> </div>
<div class="form-actions"> <div class="form-actions">
<%= f.submit t("submit"), :class => "btn btn-primary" %> <%= f.submit t("submit"), :class => "btn btn-primary" %>
<%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %> <%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %>
</div> </div>
<% end %> <% end %>
</div> </div>

View File

@ -327,6 +327,7 @@ en:
description: Site description description: Site description
description_help: '' description_help: ''
footer: Site footer footer: Site footer
header: Site header
footer_help: '' footer_help: ''
info: Site information info: Site information
keywords: Site keywords keywords: Site keywords

View File

@ -327,6 +327,7 @@ zh_tw:
description: 網站描述 description: 網站描述
description_help: '' description_help: ''
footer: 網站頁尾 footer: 網站頁尾
header: 網站頁首
footer_help: '' footer_help: ''
info: 網站資訊 info: 網站資訊
keywords: 搜尋關鍵字 keywords: 搜尋關鍵字