modified breadcrumb

This commit is contained in:
saurabhbhatia 2013-12-25 12:09:02 +08:00
parent 3b0113d9a7
commit b51030ac14
4 changed files with 56 additions and 6 deletions

View File

@ -402,11 +402,10 @@ module OrbitBackendHelper
def site_breadcrumb def site_breadcrumb
res = '' res = ''
divider = "<span class='divider'>/</span>" divider = "<span class='divider'>/</span>"
res << "<li><a href='#{admin_dashboards_path}'>Dashboard</a>#{divider}</li>" res << "<li>#{t(:settings)}#{divider}</li>"
site = Site.first site = Site.first
case controller.controller_name case controller.controller_name
when 'sites' when 'sites'
res << "<li>#{t(:settings)}#{divider}</li>"
case controller.action_name case controller.action_name
when 'sitemap' when 'sitemap'
res << "<li class='active'>#{t(:sitemap)}</li>" res << "<li class='active'>#{t(:sitemap)}</li>"
@ -422,13 +421,10 @@ module OrbitBackendHelper
res << "<li class='active'>#{t(:site_info)}</li>" res << "<li class='active'>#{t(:site_info)}</li>"
end end
when 'items' when 'items'
res << "<li>Structure#{divider}</li>" res << "<li class='active'>#{t(:structure)}</li>"
res << "<li class='active'>#{t(:items)}</li>"
when 'module_store' when 'module_store'
res << "<li>#{t(:settings)}#{divider}</li>"
res << "<li class='active'>#{t(:modules)}</li>" res << "<li class='active'>#{t(:modules)}</li>"
when 'designs' when 'designs'
res << "<li>#{t(:settings)}#{divider}</li>"
res << "<li class='active'>#{t(:templates)}</li>" res << "<li class='active'>#{t(:templates)}</li>"
end end
res.html_safe res.html_safe

View File

@ -423,6 +423,7 @@ en:
index: Index index: Index
summary: Summary summary: Summary
thumbnail: Thumbnail thumbnail: Thumbnail
settings: Site setting
site: site:
backend_openness_on: Backend Openness backend_openness_on: Backend Openness
mobile_api_openness_on: Mobile API Openness mobile_api_openness_on: Mobile API Openness

View File

@ -423,6 +423,7 @@ zh_tw:
index: 檢索 index: 檢索
summary: 摘要 summary: 摘要
thumbnail: 縮圖 thumbnail: 縮圖
settings: 基本設定
site: site:
frontend_closed: 前台關閉? frontend_closed: 前台關閉?
frontend_open: 開啟前台 frontend_open: 開啟前台

View File

@ -0,0 +1,52 @@
From 427c24be97de625b2dc3de95048d8a8aa0a81577 Mon Sep 17 00:00:00 2001
Message-Id: <427c24be97de625b2dc3de95048d8a8aa0a81577.1387872856.git.saurabh.a.bhatia@gmail.com>
From: thomaschen <99703040@nccu.edu.tw>
Date: Tue, 24 Dec 2013 16:09:58 +0800
Subject: [PATCH] add translation for terms of use frontpage ui
---
app/controllers/front_controller.rb | 2 +-
config/locales/en.yml | 1 +
config/locales/zh_tw.yml | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/controllers/front_controller.rb b/app/controllers/front_controller.rb
index 9fb1d5a..a5b3780 100644
--- a/app/controllers/front_controller.rb
+++ b/app/controllers/front_controller.rb
@@ -17,7 +17,7 @@ class FrontController < ApplicationController
@url = "/#{@name}" if @name.present?
if (!@site.enable_terms_of_use && @page.first.present?)
- render :text => (@site.footer + "<a href='#{@url}'>Terms of Use</a>")
+ render :text => (@site.footer + "<a href='#{@url}'>#{t(:terms_of_use)}</a>")
else
render :text => @site.footer
end
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 9e9e7d8..08894af 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -484,6 +484,7 @@ en:
template: Template
templates: Templates
template_name: Template name
+ terms_of_use: Terms of Use
text: Text
theme: Theme
themes: Themes
diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml
index 7342e17..ca81e12 100644
--- a/config/locales/zh_tw.yml
+++ b/config/locales/zh_tw.yml
@@ -485,6 +485,7 @@ zh_tw:
template: 樣版
templates: 網站模版
template_name: 樣版名稱
+ terms_of_use: 使用規則
text: 內文
theme: 套用頁面樣式
themes: 主題
--
1.8.3.2