adjust submanage priv

This commit is contained in:
nccu 2015-03-25 16:33:32 +08:00
parent df7662e8bb
commit fa3fa2278f
1 changed files with 5 additions and 1 deletions

View File

@ -90,13 +90,17 @@
<% if current_user.is_admin? || current_user.is_manager?(@module_app) %>
<li><a href="/admin/announcements/<%=b.id.to_s%>/edit"><%= t(:edit) %></a></li>
<li><a href="#" class="delete text-error" rel="/admin/announcements/<%=b.id.to_s%>"><%= t(:delete_) %></a></li>
<% elsif is_user_sub_manager? %>
<% if !b.rejected && !b.approved %>
<li><a href="/admin/announcements/<%=b.id.to_s%>/edit"><%= t(:edit) %></a></li>
<% end %>
<li><a href="#" class="delete text-error" rel="/admin/announcements/<%=b.id.to_s%>"><%= t(:delete_) %></a></li>
<% else %>
<% if !b.rejected && !b.approved %>
<li><a href="/admin/announcements/<%=b.id.to_s%>/edit"><%= t(:edit) %></a></li>
<li><a href="#" class="delete text-error" rel="/admin/announcements/<%=b.id.to_s%>"><%= t(:delete_) %></a></li>
<% end %>
<% end %>
<% if !b.rejected && !b.approved && user_can_approve? && !b.expired? %>
<li><a href="#" class="appoval_button" data-approve-link="<%= "/#{I18n.locale.to_s}/announcement/#{b.to_param}" %>" data-id="<%= b.id.to_s %>"><%= t("announcement.approve") %></a></li>
<% end %>