From cb3a9ea98b235acbdec06252039bb192ab5d5557 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Thu, 3 Jan 2013 14:46:02 +0800 Subject: [PATCH] change sub_menu to header in site setting --- app/views/admin/sites/site_info.html.erb | 208 +++++++++++------------ config/locales/en.yml | 1 + config/locales/zh_tw.yml | 1 + 3 files changed, 106 insertions(+), 104 deletions(-) diff --git a/app/views/admin/sites/site_info.html.erb b/app/views/admin/sites/site_info.html.erb index 9a219e5a..9ae4060a 100644 --- a/app/views/admin/sites/site_info.html.erb +++ b/app/views/admin/sites/site_info.html.erb @@ -1,112 +1,112 @@ <% # encoding: utf-8 %> <% 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 %>
-<%= form_for @site, :url => admin_site_path(@site), :html => {:class => "clear"} do |f| %> -
-
- -
-
-
- -
-
- <% @site_valid_locales.each do |locale|%> - <%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %> -
- -
- <%= f.fields_for :title_translations do |f| %> - <%= f.text_field locale, :class => "input-xxlarge", :value => (@site.title_translations[locale] rescue nil) %> - <% end %> -

<%= (t 'site.title_help').html_safe %>

-
-
- <% end %> - <% end %> -
- -
- <%= 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") }%> -

<%= (t 'site.search_help').html_safe %>

-
-
+ <%= form_for @site, :url => admin_site_path(@site), :html => {:class => "clear"} do |f| %> +
+
+ +
+
+
+ +
+
+ <% @site_valid_locales.each do |locale|%> + <%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %> +
+ +
+ <%= f.fields_for :title_translations do |f| %> + <%= f.text_field locale, :class => "input-xxlarge", :value => (@site.title_translations[locale] rescue nil) %> + <% end %> +

<%= (t 'site.title_help').html_safe %>

+
+
+ <% end %> + <% end %> +
+ +
+ <%= 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") }%> +

<%= (t 'site.search_help').html_safe %>

+
+
- <% @site_valid_locales.each do |locale|%> - <%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %> -
- -
- <%= f.fields_for :keywords do |f| %> - <%= f.text_area locale, :class => "input-xxlarge textarea-height-s", :value => (@site.keywords(locale) rescue nil) %> - <% end %> -

<%= (t 'site.keywords_help').html_safe %>

-
-
-
- -
- <%= f.fields_for :description do |f| %> - <%= f.text_area locale, :class => "input-xxlarge textarea-height-s", :value => (@site.description(locale) rescue nil) %> - <% end %> -

<%= (t 'site.description_help').html_safe %>

-
-
-
- -
- <%= f.fields_for :footer_translations do |f| %> - <%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.footer_translations[locale] rescue nil) %> - <% end %> -

<%= (t 'site.footer_help').html_safe %>

-
-
-
- -
- <%= f.fields_for :sub_menu_translations do |f| %> - <%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.sub_menu_translations[locale] rescue nil) %> - <% end %> -
-
-
- -
- <%= f.file_field :default_image, :id => "input-upload", :class => 'upload', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %> - - - <% if @site.default_image %> - <%= image_tag( @site.default_image, :size=>"120x120") rescue ''%> - <% else %> - - <% end %> -
- <% if @site.default_image.file %> - <%= f.check_box :remove_default_image %> - <%= t('刪除已上傳檔案') %> - <% end %> -
-
- <% end %> - <% end %> -
-
-
-
- <%= f.submit t("submit"), :class => "btn btn-primary" %> - <%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %> -
-<% end %> + <% @site_valid_locales.each do |locale|%> + <%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %> +
+ +
+ <%= f.fields_for :keywords do |f| %> + <%= f.text_area locale, :class => "input-xxlarge textarea-height-s", :value => (@site.keywords(locale) rescue nil) %> + <% end %> +

<%= (t 'site.keywords_help').html_safe %>

+
+
+
+ +
+ <%= f.fields_for :description do |f| %> + <%= f.text_area locale, :class => "input-xxlarge textarea-height-s", :value => (@site.description(locale) rescue nil) %> + <% end %> +

<%= (t 'site.description_help').html_safe %>

+
+
+
+ +
+ <%= f.fields_for :sub_menu_translations do |f| %> + <%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.sub_menu_translations[locale] rescue nil) %> + <% end %> +
+
+
+ +
+ <%= f.fields_for :footer_translations do |f| %> + <%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.footer_translations[locale] rescue nil) %> + <% end %> +

<%= (t 'site.footer_help').html_safe %>

+
+
+
+ +
+ <%= f.file_field :default_image, :id => "input-upload", :class => 'upload', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %> + + + <% if @site.default_image %> + <%= image_tag( @site.default_image, :size=>"120x120") rescue ''%> + <% else %> + + <% end %> +
+ <% if @site.default_image.file %> + <%= f.check_box :remove_default_image %> + <%= t('刪除已上傳檔案') %> + <% end %> +
+
+ <% end %> + <% end %> +
+
+
+
+ <%= f.submit t("submit"), :class => "btn btn-primary" %> + <%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %> +
+ <% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 8dea5eb3..17609266 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -327,6 +327,7 @@ en: description: Site description description_help: '' footer: Site footer + header: Site header footer_help: '' info: Site information keywords: Site keywords diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 026a43d0..f91ea8f2 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -327,6 +327,7 @@ zh_tw: description: 網站描述 description_help: '' footer: 網站頁尾 + header: 網站頁首 footer_help: '' info: 網站資訊 keywords: 搜尋關鍵字