diff --git a/app/assets/javascripts/bulletin_form.js.erb b/app/assets/javascripts/bulletin_form.js.erb
index 0240c613..18e8e375 100644
--- a/app/assets/javascripts/bulletin_form.js.erb
+++ b/app/assets/javascripts/bulletin_form.js.erb
@@ -22,5 +22,7 @@ $(document).on('click', '.quick_edit_cancel', function(){
$("tr#bulletin_file_" + $(this).prev().attr('value')).hide();
$("tr#bulletin_link_" + $(this).prev().attr('value')).hide();
});
-
+$('.reject_info').tooltip({
+ placement : 'bottom'
+});
});
\ No newline at end of file
diff --git a/app/assets/javascripts/news_bulletin_form.js.erb b/app/assets/javascripts/news_bulletin_form.js.erb
index e75e8d4f..092bbfff 100644
--- a/app/assets/javascripts/news_bulletin_form.js.erb
+++ b/app/assets/javascripts/news_bulletin_form.js.erb
@@ -23,4 +23,7 @@ $(document).on('click', '.quick_edit_cancel', function(){
$("tr#news_bulletin_file_" + $(this).prev().attr('value')).hide();
$("tr#news_bulletin_link_" + $(this).prev().attr('value')).hide();
});
+$('.reject_info').tooltip({
+ placement : 'bottom'
+});
});
\ No newline at end of file
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 63526229..a7ea211f 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -226,4 +226,9 @@ module ApplicationHelper
end
end
+ def wrap_string_with(str,options={})
+ line_width = options[:line_width] || 12
+ wrap_mark = options[:wrap_mark] || "
"
+ str.scan((/.{0,#{line_width}}/)).join(wrap_mark)
+ end
end
diff --git a/config/locales/en.yml b/config/locales/en.yml
index a3e295ff..68222292 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -298,6 +298,7 @@ en:
sys:
not_previewable: "Preview not support"
limit_of_upload_file_size: "Upload file must be less than: %{best_size}"
+ preview_only_for_img: "Preview only supprt with file type:jpg,png,gif,bmp"
can_not_display_due_to_no_context: "Can not display due to no context for English"
module_page_lang_not_support: "We are sorry, this page is not available for English"
search:
diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml
index 101b456b..443eb35d 100644
--- a/config/locales/zh_tw.yml
+++ b/config/locales/zh_tw.yml
@@ -528,6 +528,7 @@ zh_tw:
sys:
not_previewable: "不支援預覽"
limit_of_upload_file_size: "上傳檔案大小限制: %{best_size}"
+ preview_only_for_img: "預覽僅支援:jpg,png,gif,bmp...等圖片格式"
can_not_display_due_to_no_context: "因為沒有中文版本,所以無法顯示"
module_page_lang_not_support: "很抱歉,本頁沒有開放中文版本"
object_disable:
diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb
index 60784f05..6c3e5385 100644
--- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb
+++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb
@@ -183,8 +183,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
# PUT /bulletins/1.xml
def update
-
- if params[:bulletin_link]
+ if params[:bulletin_link]
@bulletin_link = BulletinLink.find(params[:id])
diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb
index 0adc848b..6c3aa066 100644
--- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb
+++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb
@@ -54,7 +54,7 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController
preview_content
else
@bulletin = Bulletin.all.can_display.where(_id: params[:id]).first
- if !@bulletin.disable?
+ if !@bulletin.disable? and !@bulletin.is_rejected
if @bulletin.enabled_for_lang(I18n.locale.to_s)
impressionist(@bulletin)
get_categorys
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 844ee4e4..7e36a22d 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
@@ -1,4 +1,10 @@
module Panel::Announcement::BackEnd::BulletinsHelper
+ def show_reject_reason(bulletin)
+ by_bulletin = bulletin.is_rejected
+ by_user = (((bulletin.create_user_id == current_user.id) rescue nil) or is_manager? or is_admin?)
+ by_bulletin && by_user
+ end
+
def show_form_status_field(bulletin)
#by_bulletin = (!bulletin.is_expired? and bulletin.is_pending?)
by_user = ((bulletin.bulletin_category.authed_users('fact_check').include?(current_user) rescue nil) or is_manager? or is_admin?)
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 b8886ad7..f6d9d240 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
@@ -56,6 +56,9 @@
<% if show_approval_link(bulletin) %>