From caba8ce7a4d6f21bc57033acfaa356b4ea70a945 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Tue, 8 May 2012 15:27:43 +0800 Subject: [PATCH 01/26] Add nccu icon Change news list in front-end Hide links and files in news and announcement front-end show when nothing --- app/assets/images/ncculogo.ico | Bin 0 -> 1150 bytes app/views/layouts/new_admin.html.erb | 1 + app/views/layouts/page_layout.html.erb | 1 + .../front_end/bulletins/show.html.erb | 19 ++++++---- .../front_end/news_bulletins/index.html.erb | 35 +++++++++--------- .../front_end/news_bulletins/show.html.erb | 19 ++++++---- 6 files changed, 41 insertions(+), 34 deletions(-) create mode 100644 app/assets/images/ncculogo.ico diff --git a/app/assets/images/ncculogo.ico b/app/assets/images/ncculogo.ico new file mode 100644 index 0000000000000000000000000000000000000000..3aa5e1c6712410a07a60d3a8f2806cfeb9d23b6e GIT binary patch literal 1150 zcmb_adq~q!6#gwms`Xf6Drz|_DuW`?veKN7Qq#<5mPS}cWm;iDxy%wXEHfc9vV2j} z6iG?R*A$#fEql#;)HW?~h_?08p({1;>;A5+hR|PmF6W-ZIp25Bz2{tp;gH4SF+})G zj4{KQ6K@SsHpC~&p*zF4liW-Jz?lsl9nlJ2H8f=I=$%p7cg7gcYie^0`2!#OQgVe!IKI&Zht@jaMsze}(k23#mVUVcqARHgwXnqz2WN<` zUYDx-RTd;m->%bY1?f@I*l%Z#o3XLzdG|q2{bSXizM=kp0lZBXAwTirmtl>@L(d=A z=>#3pW;ihn#TPY>P@7Zq5=||A)X%F@Qya-&jdrONza}T+NPyNK=;_T0x3a^%vx(EZ zl5T2qi{IdxOa;}T78!XjXsjwfpY*^4Dn(D0o*%c#wKCjh1uE{`r5N2La7_3FqDLKw zPp-uSV%xi?>la^3$KGWtad^FBrJnD<(5&Oc76C+Q8I)g8E=P5P0#jtMl8`1wX_cJ% z)wzW@N_rTu*t~-T==}*_n-my^5cA~}!)_H~f}fhgt->~R%GG$5)=v*ZkKB?Gz`?V45C){14HT&bT*2?zB9&YD}=tg+4Cr0 z`C5iBD_c6h?MCxam>?vzztej9t*#&sj$}TembQpq=LqH7b~Z)%to=Hq5tL_VOX?q% zBGA+l!Aorr@8X4XzPk`&W{qv+FLpM!qOqh*GW=O1FytEg6B9pEB3Ibc|0?tgM1pSs y4%% <%= @title || APP_CONFIG['orbit'] %> + "> diff --git a/app/views/layouts/page_layout.html.erb b/app/views/layouts/page_layout.html.erb index dd9aa94ad..0a7240ef3 100644 --- a/app/views/layouts/page_layout.html.erb +++ b/app/views/layouts/page_layout.html.erb @@ -3,6 +3,7 @@ <%= page_title(@item).html_safe %> + "> <%= page_metas(@item).html_safe %>

<%= t(:referral_in_links) %>

@@ -283,7 +249,7 @@
-
+ @@ -515,11 +480,10 @@ - + -->
@@ -540,46 +504,12 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + <% @recent_updated.each do |object| %> + + + + + <% end %>
Title1公告
Title2頁面
Title3頁面
Title4公告
Title5公告
Title6頁面
Title7頁面
Title8公告
Title9頁面
Title10公告
<%= link_to ((object[0].title[I18n.locale] rescue nil) || (object[0].page.i18n_variable[I18n.locale] rescue nil)), get_link_to_object(object[0]) %><%= link_to t("dashboard.#{object[0]._type.underscore}"), get_link(object[0]._type.underscore) %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 8384d5195..8be24e7fd 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -242,7 +242,13 @@ en: info: User information panel: User panel role: User role - + + dashboard: + bulletin: Announcement + news_bulletin: News + page_context: Page + web_link: Link + panel: modal: diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 6170e3d5a..3365cef23 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -238,6 +238,12 @@ zh_tw: panel: 用戶面板 role: 用戶身份 + dashboard: + bulletin: 公告 + news_bulletin: 新聞 + page_context: 頁面 + web_link: 鏈接 + panel: From b3be210ff7ce2ba14afe40571168c93a048daca8 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Wed, 9 May 2012 05:55:47 +0800 Subject: [PATCH 21/26] Small adjustment for dashboard --- app/views/admin/dashboards/index.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/admin/dashboards/index.html.erb b/app/views/admin/dashboards/index.html.erb index aee3e1ace..ee0bc920a 100644 --- a/app/views/admin/dashboards/index.html.erb +++ b/app/views/admin/dashboards/index.html.erb @@ -178,7 +178,7 @@ --> -
+
-

<%= t(:recent_update) %>

+

<%= t(:recent_update) %>

From 41c0c26330aed8903083f5bf750413d3ce72276e Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Wed, 9 May 2012 11:38:29 +0800 Subject: [PATCH 22/26] Add mail_settings --- app/mailer/cron_mail.rb | 27 ++++++++++++++++++++- app/models/site.rb | 2 ++ app/views/admin/sites/mail_setting.html.erb | 19 ++++++++++++++- config/environments/development.rb | 20 +++++++-------- 4 files changed, 56 insertions(+), 12 deletions(-) diff --git a/app/mailer/cron_mail.rb b/app/mailer/cron_mail.rb index 8a4c97009..bda1d0636 100644 --- a/app/mailer/cron_mail.rb +++ b/app/mailer/cron_mail.rb @@ -1,8 +1,33 @@ class CronMail < ActionMailer::Base default :from => "orbit_test@rulingcom.com" + def get_settings + # @@smtp_settings = { + # :address => "smtp.gmail.com", + # :port => '587', + # :domain => "smtp.gmail.com", + # :authentication => "plain", + # :user_name => "redmine@rulingcom.com", + # :password => "rulingredmine", + # :tls => true, + # :enable_starttls_auto => true + # } + @@smtp_settings = { + :address => @site['mail_settings']['address'], + :port => @site['mail_settings']['port'], + :domain => @site['mail_settings']['domain'], + :authentication => @site['mail_settings']['authentication'], + :user_name => @site['mail_settings']['user_name'], + :password => @site['mail_settings']['password'], + :tls => @site['mail_settings']['tls'], + :enable_starttls_auto => @site['mail_settings']['enable_starttls_auto'] + } + end + + def time_check(msg) + get_settings #attachments["rails.png"] = File.read("#{Rails.root}/public/images/rails.png") - mail(:to => "Matt ", :subject => msg) + mail(:to => "Chris ", :subject => msg) end end \ No newline at end of file diff --git a/app/models/site.rb b/app/models/site.rb index a0116bd36..55d6bfaf7 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -12,6 +12,8 @@ class Site field :private_key, :type => Binary field :public_key, :type => Binary field :title_always_on, :type => Boolean, :default => false + + field :mail_settings, :type => Hash field :school field :department diff --git a/app/views/admin/sites/mail_setting.html.erb b/app/views/admin/sites/mail_setting.html.erb index aaef18571..5c94e1740 100644 --- a/app/views/admin/sites/mail_setting.html.erb +++ b/app/views/admin/sites/mail_setting.html.erb @@ -2,4 +2,21 @@ <%= render 'side_bar' %> <% end %> -mail_setting.html.erb \ No newline at end of file +
+<%= form_for @site, :url => admin_site_path(@site), :html => {:class => "clear"} do |f| %> + <%= f.fields_for :site_settings, @site['site_settings'] do |f| %> + address: <%= f.text_field :address, :value => @site['site_settings']['address'] %> + port: <%= f.text_field :port, :value => @site['site_settings']['port'] %> + domain: <%= f.text_field :domain, :value => @site['site_settings']['domain'] %> + authentication: <%= f.text_field :authentication, :value => @site['site_settings']['authentication'] %> + user_name: <%= f.text_field :user_name, :value => @site['site_settings']['user_name'] %> + password: <%= f.text_field :password, :value => @site['site_settings']['password'] %> + tls: <%= f.check_box :tls, :checked => @site['site_settings']['tls'].eql?('1') %> + enable_starttls_auto: <%= f.check_box 'enable_starttls_auto', :checked => @site['site_settings']['enable_starttls_auto'].eql?('1') %> + <% end %> +
+ <%= f.submit t("submit"), :class => "btn btn-primary" %> + <%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %> +
+<% end %> +
\ No newline at end of file diff --git a/config/environments/development.rb b/config/environments/development.rb index 20f4519b4..026247726 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -29,16 +29,16 @@ Orbit::Application.configure do # :sender_address => %{"notifier" }, # :exception_recipients => %w{chris@rulingcom.com} - config.action_mailer.delivery_method = :smtp - config.action_mailer.smtp_settings = { - :tls => true, - :enable_starttls_auto => true, - :address => "smtp.gmail.com", - :port => '587', - :domain => "smtp.gmail.com", - :authentication => "plain", - :user_name => "redmine@rulingcom.com", - :password => "rulingredmine" } + # config.action_mailer.delivery_method = :smtp + # config.action_mailer.smtp_settings = { + # :tls => true, + # :enable_starttls_auto => true, + # :address => "smtp.gmail.com", + # :port => '587', + # :domain => "smtp.gmail.com", + # :authentication => "plain", + # :user_name => "redmine@rulingcom.com", + # :password => "rulingredmine" } end From 9216f29bc9781a09cef02a15072f554aab582a31 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Wed, 9 May 2012 12:19:32 +0800 Subject: [PATCH 23/26] Ray's changes for mail settings --- app/views/admin/sites/mail_setting.html.erb | 74 ++++++++++++++++++--- config/locales/en.yml | 8 +++ 2 files changed, 72 insertions(+), 10 deletions(-) diff --git a/app/views/admin/sites/mail_setting.html.erb b/app/views/admin/sites/mail_setting.html.erb index 5c94e1740..71c99bf71 100644 --- a/app/views/admin/sites/mail_setting.html.erb +++ b/app/views/admin/sites/mail_setting.html.erb @@ -4,16 +4,70 @@
<%= form_for @site, :url => admin_site_path(@site), :html => {:class => "clear"} do |f| %> - <%= f.fields_for :site_settings, @site['site_settings'] do |f| %> - address: <%= f.text_field :address, :value => @site['site_settings']['address'] %> - port: <%= f.text_field :port, :value => @site['site_settings']['port'] %> - domain: <%= f.text_field :domain, :value => @site['site_settings']['domain'] %> - authentication: <%= f.text_field :authentication, :value => @site['site_settings']['authentication'] %> - user_name: <%= f.text_field :user_name, :value => @site['site_settings']['user_name'] %> - password: <%= f.text_field :password, :value => @site['site_settings']['password'] %> - tls: <%= f.check_box :tls, :checked => @site['site_settings']['tls'].eql?('1') %> - enable_starttls_auto: <%= f.check_box 'enable_starttls_auto', :checked => @site['site_settings']['enable_starttls_auto'].eql?('1') %> - <% end %> +
+
+ <%= f.fields_for :site_settings, @site['site_settings'] do |f| %> +
+
+ +
+ <%= f.text_field :address, :value => (@site['site_settings']['address'] rescue nil) %> +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ +
+ <%= f.text_field :port, :value => (@site['site_settings']['port'] rescue nil) %> +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ +
+ <%= f.text_field :domain, :value => (@site['site_settings']['domain'] rescue nil) %> +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ +
+ <%= f.text_field :authentication, :value => (@site['site_settings']['authentication'] rescue nil) %> +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ +
+ <%= f.text_field :user_name, :value => (@site['site_settings']['user_name'] rescue nil) %> +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ +
+ <%= f.text_field :password, :value => (@site['site_settings']['password'] rescue nil) %> +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ +
+ <%= f.check_box :tls, :checked => (@site['site_settings']['tls'].eql?('1') rescue false) %> +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ +
+ <%= f.check_box 'enable_starttls_auto', :checked => (@site['site_settings']['enable_starttls_auto'].eql?('1') rescue false) %> +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ <% end %> +
+
<%= f.submit t("submit"), :class => "btn btn-primary" %> <%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 8be24e7fd..d8b9a0607 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -207,6 +207,14 @@ en: site_settings: Site Setting site_sub_menu: Site sub-menu site_title: Site title + mail_address: Address + mail_port: Port + mail_domain: Domain + mail_authentication: Authentication + mail_user_name: User Name + mail_password: Password + mail_tls: Tls + mail_enable_starttls_auto: Enable Starttls Auto super_pages: Super pages structure: Structure title: Title From 44a485611afc7c62f65946cddf7c5fec6d94d0c9 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Wed, 9 May 2012 12:29:46 +0800 Subject: [PATCH 24/26] Site_info and site_setting i18n --- app/views/admin/sites/_side_bar.html.erb | 2 +- app/views/admin/sites/mail_setting.html.erb | 16 +++++----- app/views/admin/sites/site_info.html.erb | 9 +++--- config/locales/en.yml | 35 +++++++++++++++------ config/locales/zh_tw.yml | 29 ++++++++++++++++- 5 files changed, 68 insertions(+), 23 deletions(-) diff --git a/app/views/admin/sites/_side_bar.html.erb b/app/views/admin/sites/_side_bar.html.erb index 4b25835ef..d2e5c03e6 100644 --- a/app/views/admin/sites/_side_bar.html.erb +++ b/app/views/admin/sites/_side_bar.html.erb @@ -4,7 +4,7 @@ <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('sites')) do -%> <%= content_tag :li, link_to(t('admin.site_info'), admin_site_site_info_path(@site)), :class => active_for_action('sites', 'site_info') %> <%= content_tag :li, link_to(t('admin.system_info'), admin_site_system_info_path(@site)), :class => active_for_action('sites', 'system_info') %> - <%= content_tag :li, link_to(t('admin.language'), admin_site_language_path(@site)), :class => active_for_action('sites', 'language') %> + <%= content_tag :li, link_to(t('admin.site_language'), admin_site_language_path(@site)), :class => active_for_action('sites', 'language') %> <%= content_tag :li, link_to(t('admin.mail_setting'), admin_site_mail_setting_path(@site)), :class => active_for_action('sites', 'mail_setting') %> <%= content_tag :li, link_to(t('admin.ui_theme'), admin_site_ui_theme_path(@site)), :class => active_for_action('sites', 'ui_theme') %> <% end -%> diff --git a/app/views/admin/sites/mail_setting.html.erb b/app/views/admin/sites/mail_setting.html.erb index 71c99bf71..72ec67873 100644 --- a/app/views/admin/sites/mail_setting.html.erb +++ b/app/views/admin/sites/mail_setting.html.erb @@ -12,56 +12,56 @@
<%= f.text_field :address, :value => (@site['site_settings']['address'] rescue nil) %> -

In addition to freeform text, any HTML5 text-based input appears like so.

+
<%= f.text_field :port, :value => (@site['site_settings']['port'] rescue nil) %> -

In addition to freeform text, any HTML5 text-based input appears like so.

+
<%= f.text_field :domain, :value => (@site['site_settings']['domain'] rescue nil) %> -

In addition to freeform text, any HTML5 text-based input appears like so.

+
<%= f.text_field :authentication, :value => (@site['site_settings']['authentication'] rescue nil) %> -

In addition to freeform text, any HTML5 text-based input appears like so.

+
<%= f.text_field :user_name, :value => (@site['site_settings']['user_name'] rescue nil) %> -

In addition to freeform text, any HTML5 text-based input appears like so.

+
<%= f.text_field :password, :value => (@site['site_settings']['password'] rescue nil) %> -

In addition to freeform text, any HTML5 text-based input appears like so.

+
<%= f.check_box :tls, :checked => (@site['site_settings']['tls'].eql?('1') rescue false) %> -

In addition to freeform text, any HTML5 text-based input appears like so.

+
<%= f.check_box 'enable_starttls_auto', :checked => (@site['site_settings']['enable_starttls_auto'].eql?('1') rescue false) %> -

In addition to freeform text, any HTML5 text-based input appears like so.

+
diff --git a/app/views/admin/sites/site_info.html.erb b/app/views/admin/sites/site_info.html.erb index f0ad23ce3..e19307ca6 100644 --- a/app/views/admin/sites/site_info.html.erb +++ b/app/views/admin/sites/site_info.html.erb @@ -28,7 +28,7 @@ <%= f.fields_for :title, @site.title do |f| %> <%= f.text_field locale, :class => "input-xxlarge" %> <% end %> -

In addition to freeform text, any HTML5 text-based input appears like so.

+

<%= (t 'admin.site_title_help').html_safe %>

<% end %> @@ -36,12 +36,12 @@ <% @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, @site.keywords do |f| %> <%= f.text_area locale, :class => "input-xxlarge textarea-height-s" %> <% end %> -

In addition to freeform text, any HTML5 text-based input appears like so.

+

<%= (t 'admin.site_keywords_help').html_safe %>

@@ -50,7 +50,7 @@ <%= f.fields_for :description, @site.description do |f| %> <%= f.text_area locale, :class => "input-xxlarge textarea-height-s" %> <% end %> -

In addition to freeform text, any HTML5 text-based input appears like so.

+

<%= (t 'admin.site_description_help').html_safe %>

@@ -59,6 +59,7 @@ <%= f.fields_for :footer, @site.footer do |f| %> <%= f.text_area locale, :class => "tinymce_textarea input-xxlarge" %> <% end %> +

<%= (t 'admin.site_footer_help').html_safe %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index d8b9a0607..444696255 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -148,7 +148,6 @@ en: is_published: Is published item: Item key: Key - keywords: Keywords language: Language layout: Layout layout_name: Layout name @@ -162,6 +161,15 @@ en: list_users: Users list list_infos: User information list list_roles: User roles list + mail_address: Address + mail_authentication: Authentication + mail_domain: Domain + mail_enable_starttls_auto: Enable Starttls Auto + mail_password: Password + mail_port: Port + mail_setting: Mail Setting + mail_tls: Tls + mail_user_name: User Name member: Member menu_enabled_for: Menu enabled for module: @@ -203,23 +211,32 @@ en: setup_designs: Designs setup site: Site site_description: Site description + site_description_help: | + Describing your organization in a short paragraph within 50~80 words for recognition purpose of search engines.
+ Ex. MIT is devoted to the advancement of knowledge and education of students in areas that contribute to or prosper in an environment of science and technology. site_footer: Site footer + site_footer_help: | + Will be displayed on the website each page footer, usually for copyright information or contact information. + site_info: Website Info + site_keywords: Keywords + site_keywords_help: | + It can be the combination of title of your university, department, institute or sector.
+ (Full name or abbreviation)Divide different keyword with comma(,), keywords can be mixed with different languages, and different combination, but do not make it a too long list.
+ Example:清華大學,清大,化工,化學工程,研究所,Chemical Engineering,Tsing Hua,National Tsing Hua University,National University,NTHU,單元操作,單操,熱力學,流體力學,工程數學,工數,有機化學,無機化學,材料,生化,光譜,物化 + site_language: Language site_settings: Site Setting site_sub_menu: Site sub-menu site_title: Site title - mail_address: Address - mail_port: Port - mail_domain: Domain - mail_authentication: Authentication - mail_user_name: User Name - mail_password: Password - mail_tls: Tls - mail_enable_starttls_auto: Enable Starttls Auto + site_title_help: | + Please provide the Official Title of your organization. It is important keyword for search engines!
+ Example:Department of Communication Engineering, NCTU super_pages: Super pages structure: Structure + system_info: System Info title: Title translation: Translation type: Type + ui_theme: UI Theme up_to_date: Up-to-date update_error_link: Error when updating link. update_error_page: Error when updating page. diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 3365cef23..93c8d4074 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -145,7 +145,6 @@ zh_tw: is_published: 被出版 item: 網站架構 key: 關鍵 - keywords: 關鍵字 language: 語言 layout: 佈局 layout_name: 佈局名字 @@ -159,6 +158,15 @@ zh_tw: list_users: 使用列表 list_infos: 用戶資料列表 list_roles: 用戶身份列表 + mail_address: 地址 + mail_authentication: 認證 + mail_domain: 域 + mail_enable_starttls_auto: Starttls自動啟用 + mail_password: 密碼 + mail_port: 港 + mail_setting: 郵件設定 + mail_tls: Tls + mail_user_name: 用戶名 member: 會員 menu_enabled_for: 選單啟用 module: @@ -193,10 +201,27 @@ zh_tw: role: 身份 roles: 身份 site_description: 網站描述 + site_description_help: | + 用在「敘述」貴單位網站,盡量在50~80個字左右。當您在搜尋引擎中搜尋時,貴單位的首頁連結下方出現用來介紹的文字。
+ 範例:臺灣第一所最完整,歷史最悠久,且最具代表之綜合性高等教育學府,肩負高深學術研究及教學之重任,並在強調基本理論之純學術研究與提倡學術思想之自由學風之下,自始即朝著人文學、社會科學、生物科學及物理科學四大領域之目標發展,賦有致用性之科系發展之專業學院。(以台大為例) site_footer: 網站頁尾 + site_footer_help: | + 將顯示於網站每頁網頁頁尾,通常為著作權資訊或聯繫資訊等 + site_info: 網站資訊 + site_keywords: 關鍵字 + site_keywords_help: | + 在搜尋引擎中,它可以為學校名稱(全名及簡寫)、單位名稱(平常會用到的縮寫)、專業科目的名稱等等組合搭配。
+ 需用半形逗點「,」隔開不同的關鍵字,建議不要太長,可多重組合搭配,可中英文混雜。關鍵字無上限,不要重複即可。
+ 範例:清華大學,清大,化工,化學工程,研究所,Chemical Engineering,Tsing Hua,National Tsing Hua University,National University,NTHU,單元操作,單操,熱力學,流體力學,工程數學,工數,有機化學,無機化學,材料,生化,光譜,物化 + + site_language: 語系設定 site_settings: 基本設定 site_sub_menu: 網站次選單 site_title: 網站標題 + site_title_help: | + 請提供貴單位網站抬頭,以可明確的辨識貴單位名稱為主。
+ 抬頭將會顯示於使用者瀏覽器標題列上,是搜尋條件中重要的關鍵字之一。
+ 若勾選永遠顯示則無論連至任一內頁,標題列都會顯示該網站標題,否則將只顯示該頁標題。 setup_member: 成員設置 setup_translations: 語系設定 setup_designs: 版型設定 @@ -204,9 +229,11 @@ zh_tw: site_setting: 網站設定 super_pages: 可編頁面 structure: 網站結構 + system_info: 系統資訊 title: 標題 translation: 翻譯 type: 類型 + ui_theme: 佈景主題 up_to_date: 最新版本 update_error_link: 更新鏈接時出現錯誤。 update_error_page: 更新頁面時出現錯誤。 From 3a38992f2960196a5366453ae5584454dc43c3e3 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Wed, 9 May 2012 12:45:27 +0800 Subject: [PATCH 25/26] Ray's changes for mail_setting i18n --- config/locales/en.yml | 35 +++++++++-------------------------- config/locales/zh_tw.yml | 37 +++++++++---------------------------- 2 files changed, 18 insertions(+), 54 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 444696255..e5d184587 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -148,6 +148,7 @@ en: is_published: Is published item: Item key: Key + keywords: Keywords language: Language layout: Layout layout_name: Layout name @@ -161,15 +162,6 @@ en: list_users: Users list list_infos: User information list list_roles: User roles list - mail_address: Address - mail_authentication: Authentication - mail_domain: Domain - mail_enable_starttls_auto: Enable Starttls Auto - mail_password: Password - mail_port: Port - mail_setting: Mail Setting - mail_tls: Tls - mail_user_name: User Name member: Member menu_enabled_for: Menu enabled for module: @@ -211,32 +203,23 @@ en: setup_designs: Designs setup site: Site site_description: Site description - site_description_help: | - Describing your organization in a short paragraph within 50~80 words for recognition purpose of search engines.
- Ex. MIT is devoted to the advancement of knowledge and education of students in areas that contribute to or prosper in an environment of science and technology. site_footer: Site footer - site_footer_help: | - Will be displayed on the website each page footer, usually for copyright information or contact information. - site_info: Website Info - site_keywords: Keywords - site_keywords_help: | - It can be the combination of title of your university, department, institute or sector.
- (Full name or abbreviation)Divide different keyword with comma(,), keywords can be mixed with different languages, and different combination, but do not make it a too long list.
- Example:清華大學,清大,化工,化學工程,研究所,Chemical Engineering,Tsing Hua,National Tsing Hua University,National University,NTHU,單元操作,單操,熱力學,流體力學,工程數學,工數,有機化學,無機化學,材料,生化,光譜,物化 - site_language: Language site_settings: Site Setting site_sub_menu: Site sub-menu site_title: Site title - site_title_help: | - Please provide the Official Title of your organization. It is important keyword for search engines!
- Example:Department of Communication Engineering, NCTU + mail_address: Address + mail_port: Port + mail_domain: Domain + mail_authentication: Authentication + mail_user_name: User Name + mail_password: Password + mail_tls: TLS + mail_enable_starttls_auto: Enable Start TLS Auto super_pages: Super pages structure: Structure - system_info: System Info title: Title translation: Translation type: Type - ui_theme: UI Theme up_to_date: Up-to-date update_error_link: Error when updating link. update_error_page: Error when updating page. diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 93c8d4074..f9bd017fa 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -145,6 +145,7 @@ zh_tw: is_published: 被出版 item: 網站架構 key: 關鍵 + keywords: 關鍵字 language: 語言 layout: 佈局 layout_name: 佈局名字 @@ -158,15 +159,6 @@ zh_tw: list_users: 使用列表 list_infos: 用戶資料列表 list_roles: 用戶身份列表 - mail_address: 地址 - mail_authentication: 認證 - mail_domain: 域 - mail_enable_starttls_auto: Starttls自動啟用 - mail_password: 密碼 - mail_port: 港 - mail_setting: 郵件設定 - mail_tls: Tls - mail_user_name: 用戶名 member: 會員 menu_enabled_for: 選單啟用 module: @@ -201,27 +193,18 @@ zh_tw: role: 身份 roles: 身份 site_description: 網站描述 - site_description_help: | - 用在「敘述」貴單位網站,盡量在50~80個字左右。當您在搜尋引擎中搜尋時,貴單位的首頁連結下方出現用來介紹的文字。
- 範例:臺灣第一所最完整,歷史最悠久,且最具代表之綜合性高等教育學府,肩負高深學術研究及教學之重任,並在強調基本理論之純學術研究與提倡學術思想之自由學風之下,自始即朝著人文學、社會科學、生物科學及物理科學四大領域之目標發展,賦有致用性之科系發展之專業學院。(以台大為例) site_footer: 網站頁尾 - site_footer_help: | - 將顯示於網站每頁網頁頁尾,通常為著作權資訊或聯繫資訊等 - site_info: 網站資訊 - site_keywords: 關鍵字 - site_keywords_help: | - 在搜尋引擎中,它可以為學校名稱(全名及簡寫)、單位名稱(平常會用到的縮寫)、專業科目的名稱等等組合搭配。
- 需用半形逗點「,」隔開不同的關鍵字,建議不要太長,可多重組合搭配,可中英文混雜。關鍵字無上限,不要重複即可。
- 範例:清華大學,清大,化工,化學工程,研究所,Chemical Engineering,Tsing Hua,National Tsing Hua University,National University,NTHU,單元操作,單操,熱力學,流體力學,工程數學,工數,有機化學,無機化學,材料,生化,光譜,物化 - - site_language: 語系設定 site_settings: 基本設定 site_sub_menu: 網站次選單 site_title: 網站標題 - site_title_help: | - 請提供貴單位網站抬頭,以可明確的辨識貴單位名稱為主。
- 抬頭將會顯示於使用者瀏覽器標題列上,是搜尋條件中重要的關鍵字之一。
- 若勾選永遠顯示則無論連至任一內頁,標題列都會顯示該網站標題,否則將只顯示該頁標題。 + mail_address: 郵件地址 + mail_port: 傳輸埠 + mail_domain: 網域名稱 + mail_authentication: 認證 + mail_user_name: 帳號 + mail_password: 密碼 + mail_tls: TLS + mail_enable_starttls_auto: Enable Start TLS Auto setup_member: 成員設置 setup_translations: 語系設定 setup_designs: 版型設定 @@ -229,11 +212,9 @@ zh_tw: site_setting: 網站設定 super_pages: 可編頁面 structure: 網站結構 - system_info: 系統資訊 title: 標題 translation: 翻譯 type: 類型 - ui_theme: 佈景主題 up_to_date: 最新版本 update_error_link: 更新鏈接時出現錯誤。 update_error_page: 更新頁面時出現錯誤。 From f9f7ddc8ee0059a171b9f0873590b81628a86a1b Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Wed, 9 May 2012 12:53:42 +0800 Subject: [PATCH 26/26] Hide some links in side_bar for site_settings --- app/views/admin/sites/_side_bar.html.erb | 6 +++--- config/locales/en.yml | 16 ++++++++-------- config/locales/zh_tw.yml | 16 ++++++++-------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/app/views/admin/sites/_side_bar.html.erb b/app/views/admin/sites/_side_bar.html.erb index d2e5c03e6..1ad8ae432 100644 --- a/app/views/admin/sites/_side_bar.html.erb +++ b/app/views/admin/sites/_side_bar.html.erb @@ -3,10 +3,10 @@ <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('sites')) do -%> <%= content_tag :li, link_to(t('admin.site_info'), admin_site_site_info_path(@site)), :class => active_for_action('sites', 'site_info') %> - <%= content_tag :li, link_to(t('admin.system_info'), admin_site_system_info_path(@site)), :class => active_for_action('sites', 'system_info') %> - <%= content_tag :li, link_to(t('admin.site_language'), admin_site_language_path(@site)), :class => active_for_action('sites', 'language') %> + <%#= content_tag :li, link_to(t('admin.system_info'), admin_site_system_info_path(@site)), :class => active_for_action('sites', 'system_info') %> + <%#= content_tag :li, link_to(t('admin.site_language'), admin_site_language_path(@site)), :class => active_for_action('sites', 'language') %> <%= content_tag :li, link_to(t('admin.mail_setting'), admin_site_mail_setting_path(@site)), :class => active_for_action('sites', 'mail_setting') %> - <%= content_tag :li, link_to(t('admin.ui_theme'), admin_site_ui_theme_path(@site)), :class => active_for_action('sites', 'ui_theme') %> + <%#= content_tag :li, link_to(t('admin.ui_theme'), admin_site_ui_theme_path(@site)), :class => active_for_action('sites', 'ui_theme') %> <% end -%> <% end -%> diff --git a/config/locales/en.yml b/config/locales/en.yml index e5d184587..07bfe189e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -162,6 +162,14 @@ en: list_users: Users list list_infos: User information list list_roles: User roles list + mail_address: Address + mail_port: Port + mail_domain: Domain + mail_authentication: Authentication + mail_user_name: User Name + mail_password: Password + mail_tls: TLS + mail_enable_starttls_auto: Enable Start TLS Auto member: Member menu_enabled_for: Menu enabled for module: @@ -207,14 +215,6 @@ en: site_settings: Site Setting site_sub_menu: Site sub-menu site_title: Site title - mail_address: Address - mail_port: Port - mail_domain: Domain - mail_authentication: Authentication - mail_user_name: User Name - mail_password: Password - mail_tls: TLS - mail_enable_starttls_auto: Enable Start TLS Auto super_pages: Super pages structure: Structure title: Title diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index f9bd017fa..ae1b92f34 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -159,6 +159,14 @@ zh_tw: list_users: 使用列表 list_infos: 用戶資料列表 list_roles: 用戶身份列表 + mail_address: 郵件地址 + mail_port: 傳輸埠 + mail_domain: 網域名稱 + mail_authentication: 認證 + mail_user_name: 帳號 + mail_password: 密碼 + mail_tls: TLS + mail_enable_starttls_auto: Enable Start TLS Auto member: 會員 menu_enabled_for: 選單啟用 module: @@ -197,14 +205,6 @@ zh_tw: site_settings: 基本設定 site_sub_menu: 網站次選單 site_title: 網站標題 - mail_address: 郵件地址 - mail_port: 傳輸埠 - mail_domain: 網域名稱 - mail_authentication: 認證 - mail_user_name: 帳號 - mail_password: 密碼 - mail_tls: TLS - mail_enable_starttls_auto: Enable Start TLS Auto setup_member: 成員設置 setup_translations: 語系設定 setup_designs: 版型設定