Integrate App & Object Auth to announcement with i18n variables. Also changed Role and SubRole i18n var. Checked with Allen

This commit is contained in:
Matthew K. Fu JuYuan authored and Christophe Vilayphiou committed 2012-04-30 00:24:11 +08:00
1 parent 382932036d
commit a46a8898d7
15 files changed
+86 -39

No files matched your search

@@ -0,0 +1,14 @@
module Panel::Announcement::BackEnd::BulletinCategorysHelper
include ActionView::Helpers::UrlHelper
def show_submit_permission_link(bulletin_category)
oa = bulletin_category.get_object_auth_by_title('submit')
if oa.nil?
bulletin_category.object_auths.new(title: 'submit' ).save
oa = bulletin_category.get_object_auth_by_title('submit')
end
link_to t('announcement.bulletin.cate_auth'), edit_admin_object_auth_path(oa)
end
end
@@ -7,7 +7,7 @@
</div>
<div class="modal-body">
<div class="clear">
<% bulletin_category.object_auths.where(title: 'fact_check').first.auth_users.each do |user| %>
<% bulletin_category.get_object_auth_by_title('fact_check').auth_users.each do |user| %>
<div class="checkbox clear checked">
<div class='member-avatar'>
<% if user.avatar? %>
@@ -5,7 +5,10 @@
<div class="quick-edit">
<ul class="nav nav-pills hide">
<li><%= link_to t('bulletin_category.edit'), edit_panel_announcement_back_end_bulletin_category_path(bulletin_category), :remote => true %></li>
<li><%= show_submit_permission_link(bulletin_category) %></li>
<li><%= link_to t('bulletin_category.delete'), panel_announcement_back_end_bulletin_category_path(bulletin_category), :confirm => t('announcement.sure?'), :method => :delete, :remote => true %></li>
</ul>
</div>
</td>
@@ -78,6 +78,7 @@ en:
approval_pass: 'Pass'
approval_setting_window_title: 'Unit'
approval_user_list: 'Approval Users'
cate_auth: Category Authorization
# admin:
# action: Action
# add_language: Add language
@@ -60,6 +60,8 @@ zh_tw:
approval_not_pass_reason: '不通過原因'
approval_setting_window_title: '單位'
approval_user_list: '審核者'
cate_auth: '分類授權'
bulletin:
last_modified: 最後修改於
tags: 標籤