fix after approve cant edit & delete

This commit is contained in:
nccu 2015-03-23 16:10:53 +08:00
parent 88365ba6c1
commit 49e83f6ea0
1 changed files with 12 additions and 3 deletions

View File

@ -63,9 +63,18 @@
<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) %>
<% if current_user.is_admin? || current_user.is_manager?(@module_app) %>
<li><a href="/admin/news/<%=b.id.to_s%>/edit"><%= t(:edit) %></a></li>
<li><a href="#" class="delete text-error" rel="/admin/news/<%=b.id.to_s%>"><%= t(:delete_) %></a></li>
<% if !b.approved && user_can_approve? && !b.expired? %>
<% else %>
<% if !b.rejected && !b.approved %>
<li><a href="/admin/news/<%=b.id.to_s%>/edit"><%= t(:edit) %></a></li>
<li><a href="#" class="delete text-error" rel="/admin/news/<%=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}/news/#{b.to_param}" %>" data-id="<%= b.id.to_s %>"><%= t("news.approve") %></a></li>
<% end %>
<% end %>