fix after approve cant edit & delete
This commit is contained in:
parent
48487b80ac
commit
df7662e8bb
|
@ -87,9 +87,17 @@
|
|||
<ul class="nav nav-pills">
|
||||
<li><a href="#" class="detail-row" onclick="$('#<%= "#{b.id.to_s}-detail" %>').slideToggle(300); return false;"><%= t(:detail) %></a></li>
|
||||
<% if can_edit_or_delete?(b) %>
|
||||
<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>
|
||||
<% if !b.approved && user_can_approve? && !b.expired? %>
|
||||
<% 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>
|
||||
<% 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 %>
|
||||
<% end %>
|
||||
|
|
Reference in New Issue