From 2b54067ecbc5defea4cdb2b0b9f7ae35dbbd04a7 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Tue, 26 Jun 2012 14:28:21 +0800 Subject: [PATCH] change order of display menu of categories of news_bulletin and bulletin. --- .../panel/announcement/back_end/bulletins_helper.rb | 8 ++++++++ .../bulletin_categorys/_bulletin_category.html.erb | 7 +++---- .../announcement/back_end/bulletins/_bulletin.html.erb | 3 +-- .../helpers/panel/news/back_end/news_bulletins_helper.rb | 9 +++++++++ .../_news_bulletin_category.html.erb | 7 +++---- .../news/back_end/news_bulletins/_news_bulletin.html.erb | 4 +--- 6 files changed, 25 insertions(+), 13 deletions(-) diff --git a/vendor/built_in_modules/announcement/app/helpers/panel/announcement/back_end/bulletins_helper.rb b/vendor/built_in_modules/announcement/app/helpers/panel/announcement/back_end/bulletins_helper.rb index 49f24079..88920b9e 100644 --- a/vendor/built_in_modules/announcement/app/helpers/panel/announcement/back_end/bulletins_helper.rb +++ b/vendor/built_in_modules/announcement/app/helpers/panel/announcement/back_end/bulletins_helper.rb @@ -12,4 +12,12 @@ module Panel::Announcement::BackEnd::BulletinsHelper by_bulletin or by_user end + def show_bulletin_title_at_index (bulletin) + if bulletin.is_checked? + link_to bulletin.title[I18n.locale], panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category.id) rescue '' + else + bulletin.title[I18n.locale] + end + end + end \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_categorys/_bulletin_category.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_categorys/_bulletin_category.html.erb index b5013698..6b98e466 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_categorys/_bulletin_category.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_categorys/_bulletin_category.html.erb @@ -4,14 +4,13 @@ <%= bulletin_category.key %>
diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb index afb57306..edff4d2d 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb @@ -30,8 +30,7 @@ <%= bulletin.bulletin_category.i18n_variable[I18n.locale] rescue nil %> - <%= link_to bulletin.title[I18n.locale], panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category.id) rescue ''%> - + <%= show_bulletin_title_at_index bulletin%>
<%= news_bulletin.news_bulletin_category.i18n_variable[I18n.locale] rescue nil %> - - <%= link_to news_bulletin.title[I18n.locale], panel_news_front_end_news_bulletin_path(news_bulletin, :category_id => news_bulletin.news_bulletin_category.id) rescue ''%> - + <%= show_news_bulletin_title_at_index news_bulletin%>