adjust submanage priv
This commit is contained in:
parent
df7662e8bb
commit
fa3fa2278f
|
@ -90,13 +90,17 @@
|
||||||
<% if current_user.is_admin? || current_user.is_manager?(@module_app) %>
|
<% 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="/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>
|
<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 %>
|
<% else %>
|
||||||
<% if !b.rejected && !b.approved %>
|
<% if !b.rejected && !b.approved %>
|
||||||
<li><a href="/admin/announcements/<%=b.id.to_s%>/edit"><%= t(:edit) %></a></li>
|
<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>
|
<li><a href="#" class="delete text-error" rel="/admin/announcements/<%=b.id.to_s%>"><%= t(:delete_) %></a></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if !b.rejected && !b.approved && user_can_approve? && !b.expired? %>
|
<% 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>
|
<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 %>
|
<% end %>
|
||||||
|
|
Reference in New Issue