From 9e82060654d732f4dbd943051796d332309b519e Mon Sep 17 00:00:00 2001 From: Saurabh Bhatia Date: Tue, 15 Apr 2014 18:32:45 +0800 Subject: [PATCH] Added Sidebar Links and locales --- config/locales/en.yml | 28 ++++++++++++++++++++++++++++ config/locales/zh_tw.yml | 23 +++++++++++++++++++++++ lib/ad_banner/engine.rb | 15 +++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 config/locales/en.yml create mode 100644 config/locales/zh_tw.yml diff --git a/config/locales/en.yml b/config/locales/en.yml new file mode 100644 index 0000000..a3a3949 --- /dev/null +++ b/config/locales/en.yml @@ -0,0 +1,28 @@ +en: + + ad_banner: + ad_banner: Ad Banner + banner: Banner + banner_name: Banner Name + edit_banner: Edit Banner + effect: Effect + enter_number: Please enter a number + enter_url: Please enter the URL + local: Current page + name_only_english: Banner Name can only in English + new_banner: New Banner + new_window: New window + no_ie_10_effect_support: IE10 earlier do not support this effect + number_milliseconds: Please enter the number of milliseconds + number_seconds: Please enter the number of seconds + size: Size + transition_interval: Transition Interval + transition_speed: Transition Speed + type: Type + banner_name_note: Banner Name only english + ste: Transition Interval + ste_note: Please enter the number of seconds + best_size: Best Size + all: All + categories: Categories + add: Add \ No newline at end of file diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml new file mode 100644 index 0000000..e47620b --- /dev/null +++ b/config/locales/zh_tw.yml @@ -0,0 +1,23 @@ +zh_tw: + + ad_banner: + ad_banner: 廣告輪播 + banner: 橫幅 + banner_name: 橫幅名稱 + name_only_english: 橫幅名稱只能為英文 + edit_banner: 編輯橫幅 + enter_number: 請輸入數字 + enter_url: 請輸入網址 + ste: 轉換間隔時間 + number_seconds: 請輸入秒數 + number_milliseconds: 請輸入毫秒數 + best_size: 最佳尺寸 + effect: 效果 + all: 全部 + categories: 類別 + add: 新增 + new_banner: 新增 + size: 大小 + transition_interval: 轉換間隔時間 + transition_speed: 轉換速度 + type: 類型 \ No newline at end of file diff --git a/lib/ad_banner/engine.rb b/lib/ad_banner/engine.rb index 60941db..7d20c83 100644 --- a/lib/ad_banner/engine.rb +++ b/lib/ad_banner/engine.rb @@ -10,6 +10,21 @@ module AdBanner head_label_i18n 'ad_banner.ad_banner', icon_class: "icons-landscape" active_for_controllers ({:private=>['ad_banner']}) head_link_path "admin_ad_banners_path" + + context_link 'ad_banner.all', + :link_path=>"admin_ad_images_path" , + :priority=>1, + :active_for_action=>{'admin/ad_banners'=>:index} + + context_link 'ad_banner.add', + :link_path=>"new_admin_ad_image_path" , + :priority=>1, + :active_for_action=>{'admin/ad_banners'=>:index} + + context_link 'ad_banner.banner', + :link_path=>"admin_ad_banners_path" , + :priority=>3, + :active_for_action=>{'admin/ad_banners'=>:index} end end end