nccu fix
This commit is contained in:
parent
080974b563
commit
6cc470ede9
|
@ -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'
|
||||
});
|
||||
});
|
|
@ -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'
|
||||
});
|
||||
});
|
|
@ -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] || "<br />"
|
||||
str.scan((/.{0,#{line_width}}/)).join(wrap_mark)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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])
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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?)
|
||||
|
|
|
@ -56,6 +56,9 @@
|
|||
<% if show_approval_link(bulletin) %>
|
||||
<li><%= link_to t('announcement.bulletin.approval'), panel_announcement_back_end_bulletin_approval_preview_path(bulletin),:class => 'preview_trigger' %></li><%#= #TODO add ancher so user can quick access into that part %>
|
||||
<% end %>
|
||||
<% if show_reject_reason(bulletin)%>
|
||||
<li><%= link_to t('rejected_reason')+truncate(bulletin.not_checked_reason, :length => 10),'#',:rel=>"tooltip" ,'data-original-title'=> (wrap_string_with(bulletin.not_checked_reason, :line_width => 24)),:class=>'reject_info' %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -49,6 +49,17 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @bulletin.is_rejected %>
|
||||
<div id="widget-rejected" class="widget-box widget-size-300">
|
||||
<div class="widget-action clear">
|
||||
<a class="action"><i title="Rejected Report" class="icon-cog icon-white tip"></i></a>
|
||||
</div>
|
||||
<h3 class="widget-title"><i class="icons-tag icons-white"></i>Approval Status</h3>
|
||||
<div class="widget-content clear form-horizontal">
|
||||
<%= @bulletin.not_checked_reason rescue t("rejected_reason_empty") %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div id="widget-tags" class="widget-box widget-size-300">
|
||||
<div class="widget-action clear">
|
||||
|
@ -198,6 +209,7 @@
|
|||
<%= hidden_field_tag 'bulletin_file_field_count', @bulletin.bulletin_files.count %>
|
||||
<a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i><%= t(:add) %></span></a>
|
||||
<p><%= t("sys.limit_of_upload_file_size",:best_size => '3MB') %></p>
|
||||
<p><%= t("sys.preview_only_for_img") %></p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -35,6 +35,9 @@ en:
|
|||
passed: Passed
|
||||
pending: Pending
|
||||
rejected: Rejected
|
||||
rejected_reason: 'Reason:'
|
||||
rejected_reason_empty: "Approval rejected,no referencable information"
|
||||
|
||||
clear: Clear
|
||||
|
||||
hot: Hot
|
||||
|
|
|
@ -30,6 +30,8 @@ zh_tw:
|
|||
passed: 審核通過
|
||||
pending: 待審查
|
||||
rejected: 不通過
|
||||
rejected_reason_empty: 審核沒有通過,沒有相關訊息
|
||||
rejected_reason: '原因:'
|
||||
clear: 清除
|
||||
|
||||
quick_edit: 快速編輯
|
||||
|
|
|
@ -226,7 +226,6 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
|
|||
# PUT /news_bulletins/1
|
||||
# PUT /news_bulletins/1.xml
|
||||
def update
|
||||
|
||||
if params[:news_bulletin_link]
|
||||
|
||||
@news_bulletin_link = NewsBulletinLink.find(params[:id])
|
||||
|
@ -258,7 +257,7 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
|
|||
else
|
||||
|
||||
@news_bulletin = NewsBulletin.find(params[:id])
|
||||
@news_bulletin.deadline = nil if (@news_bulletin.deadline < @news_bulletin.postdate rescue nil)
|
||||
@news_bulletin.deadline = nil if (@news_bulletin.deadline < @news_bulletin.postdate rescue nil)
|
||||
|
||||
@news_bulletin.update_user_id = current_user.id
|
||||
|
||||
|
@ -278,7 +277,7 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
|
|||
end
|
||||
expire_page(:controller=>'panel/news/widget/news_bulletins' , :action=>'home_banner')
|
||||
# format.html { redirect_to(panel_news_back_end_news_bulletin_url(@news_bulletin), :notice => t('news_bulletin.update_news_bulletin_success')) }
|
||||
format.html { redirect_to(panel_news_back_end_news_bulletins_url, :notice => t('news_bulletin.update_success')) }
|
||||
format.html { redirect_to(panel_news_back_end_news_bulletins_url, :notice => t('news.news_bulletin.update_success')) }
|
||||
format.js { render 'toggle_enable' }
|
||||
format.xml { head :ok }
|
||||
else
|
||||
|
|
|
@ -54,7 +54,7 @@ class Panel::News::FrontEnd::NewsBulletinsController < OrbitWidgetController
|
|||
else
|
||||
''
|
||||
@news_bulletin = NewsBulletin.all.can_display.where(_id: params[:id]).first
|
||||
if !@news_bulletin.disable?
|
||||
if !@news_bulletin.disable? and !@news_bulletin.is_rejected
|
||||
if @news_bulletin.enabled_for_lang(I18n.locale.to_s)
|
||||
impressionist(@news_bulletin)
|
||||
get_categorys
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
module Panel::News::BackEnd::NewsBulletinsHelper
|
||||
def news_show_reject_reason(news_bulletin)
|
||||
by_news_bulletin = news_bulletin.is_rejected
|
||||
by_user = (((news_bulletin.create_user_id == current_user.id) rescue nil) or is_manager? or is_admin?)
|
||||
by_news_bulletin && by_user
|
||||
end
|
||||
def news_show_form_status_field(news_bulletin)
|
||||
#by_news_bulletin = (!news_bulletin.is_expired? and news_bulletin.is_pending?)
|
||||
by_user = ((news_bulletin.news_bulletin_category.authed_users('fact_check').include?(current_user) rescue nil) or is_manager? or is_admin?)
|
||||
|
|
|
@ -100,6 +100,17 @@
|
|||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% if @news_bulletin.is_rejected %>
|
||||
<div id="widget-rejected" class="widget-box widget-size-300">
|
||||
<div class="widget-action clear">
|
||||
<a class="action"><i title="Rejected Report" class="icon-cog icon-white tip"></i></a>
|
||||
</div>
|
||||
<h3 class="widget-title"><i class="icons-tag icons-white"></i>Approval Status</h3>
|
||||
<div class="widget-content clear form-horizontal">
|
||||
<%= @news_bulletin.not_checked_reason rescue t("rejected_reason_empty") %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if params[:action] != 'new' %>
|
||||
<div id="widget-audit" class="widget-box">
|
||||
<div class="widget-action clear">
|
||||
|
@ -239,6 +250,7 @@
|
|||
<%= hidden_field_tag 'news_bulletin_file_field_count', @news_bulletin.news_bulletin_files.count %>
|
||||
<a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i><%= t(:add) %></span></a>
|
||||
<p><%= t("sys.limit_of_upload_file_size",:best_size => '3MB') %></p>
|
||||
<p><%= t("sys.preview_only_for_img") %></p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -46,9 +46,6 @@
|
|||
<li><%#= link_to t(:file), load_quick_edit_panel_news_back_end_news_bulletin_path(news_bulletin, :type => 'files'), :remote => true %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<%#= debugger %>
|
||||
<%#= a=1 %>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if news_show_delete_link(news_bulletin) %>
|
||||
|
@ -57,7 +54,9 @@
|
|||
<% if news_show_approval_link(news_bulletin) %>
|
||||
<li><%= link_to t('news.news_bulletin.approval'), panel_news_back_end_news_bulletin_approval_preview_path(news_bulletin),:class => 'preview_trigger' %></li><%#= #TODO add ancher so user can quick access into that part %>
|
||||
<% end %>
|
||||
|
||||
<% if news_show_reject_reason(news_bulletin)%>
|
||||
<li><%= link_to t('rejected_reason')+truncate(news_bulletin.not_checked_reason, :length => 10),'#',:rel=>"tooltip" ,'data-original-title'=> (wrap_string_with(news_bulletin.not_checked_reason, :line_width => 24)),:class=>'reject_info' %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -35,6 +35,9 @@ en:
|
|||
passed: Passed
|
||||
pending: Pending
|
||||
rejected: Rejected
|
||||
rejected_reason: 'Reason:'
|
||||
rejected_reason_empty: "Approval rejected,no referencable information"
|
||||
|
||||
clear: Clear
|
||||
|
||||
hot: Hot
|
||||
|
@ -79,7 +82,7 @@ en:
|
|||
approval_pending: 'Pending'
|
||||
approval_pass: 'Pass'
|
||||
approval_setting_window_title: 'Unit'
|
||||
|
||||
update_success: Successfully Updated
|
||||
# admin:
|
||||
# action: Action
|
||||
# add_language: Add language
|
||||
|
|
|
@ -30,6 +30,8 @@ zh_tw:
|
|||
passed: 審核通過
|
||||
pending: 待審查
|
||||
rejected: 不通過
|
||||
rejected_reason: '原因:'
|
||||
rejected_reason_empty: 審核沒有通過,沒有相關訊息
|
||||
clear: 清除
|
||||
|
||||
quick_edit: 快速編輯
|
||||
|
@ -64,7 +66,7 @@ zh_tw:
|
|||
approval_pass: '通過'
|
||||
approval_not_pass_reason: '不通過原因'
|
||||
approval_setting_window_title: '單位'
|
||||
|
||||
update_success: 新聞已成功更新
|
||||
news_bulletin:
|
||||
last_modified: 最後修改於
|
||||
tags: 標籤
|
||||
|
@ -82,6 +84,7 @@ zh_tw:
|
|||
update_success: 更新新聞成功
|
||||
approve_bulletin_success: 成功審核新聞
|
||||
approve_bulletin_fail: 審核新聞失敗
|
||||
|
||||
# action: 行動
|
||||
# add_language: 新增語言
|
||||
# admin: 管理
|
||||
|
|
Loading…
Reference in New Issue