Update bakend index display fields.
This commit is contained in:
parent
4008b699e4
commit
bfe87b3a6d
|
@ -58,8 +58,14 @@ class Admin::AnnouncementsController < OrbitAdminController
|
|||
Bulletin.remove_expired_status
|
||||
@tags = @module_app.tags
|
||||
@table_fields = [:status, :category, :title, :start_date, :end_date, "announcement.comment", :last_modified]
|
||||
setting = AnnouncementSetting.first
|
||||
@annc_depts = []
|
||||
if (setting.enable_annc_dept rescue false)
|
||||
@table_fields.insert(1, "announcement.annc_dept")
|
||||
@annc_depts = setting.annc_depts
|
||||
end
|
||||
@current_user = current_user
|
||||
if AnnouncementSetting.first.is_display_edit_only && !current_user.is_admin? && !current_user.is_manager?(@module_app)
|
||||
if setting.is_display_edit_only && !current_user.is_admin? && !current_user.is_manager?(@module_app)
|
||||
current_user_is_sub_manager = !current_user.is_manager?(@module_app) && (current_user.is_sub_manager?(@module_app) || current_user.is_sub_manager_with_role?(@module_app)) rescue false
|
||||
if current_user_is_sub_manager
|
||||
@categories = current_user.approved_categories.select{|c| c.module_app_id == @module_app.id} rescue []
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
<td>
|
||||
<%= b.status_for_table %>
|
||||
</td>
|
||||
<td>
|
||||
<%= b.annc_dept ? @annc_depts[b.annc_dept] : '' rescue "" %>
|
||||
</td>
|
||||
<td>
|
||||
<%= b.category.title rescue "" %>
|
||||
<% if (b.category.disable rescue false) %>
|
||||
|
|
Loading…
Reference in New Issue