From fa3fa2278f5107d3d3743a392e39fcc1599b91fa Mon Sep 17 00:00:00 2001 From: nccu Date: Wed, 25 Mar 2015 16:33:32 +0800 Subject: [PATCH] adjust submanage priv --- app/views/admin/announcements/_index.html.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/admin/announcements/_index.html.erb b/app/views/admin/announcements/_index.html.erb index 8b0a73b..cfa01b4 100644 --- a/app/views/admin/announcements/_index.html.erb +++ b/app/views/admin/announcements/_index.html.erb @@ -90,13 +90,17 @@ <% if current_user.is_admin? || current_user.is_manager?(@module_app) %>
  • <%= t(:edit) %>
  • <%= t(:delete_) %>
  • + <% elsif is_user_sub_manager? %> + <% if !b.rejected && !b.approved %> +
  • <%= t(:edit) %>
  • + <% end %> +
  • <%= t(:delete_) %>
  • <% else %> <% if !b.rejected && !b.approved %>
  • <%= t(:edit) %>
  • <%= t(:delete_) %>
  • <% end %> <% end %> - <% if !b.rejected && !b.approved && user_can_approve? && !b.expired? %>
  • " data-id="<%= b.id.to_s %>"><%= t("announcement.approve") %>
  • <% end %>