Fix bug in is_admin?
Fix bug in helpers for news and announcement
This commit is contained in:
1 parent
555aa088d9
commit
b48099d752
3 files changed
+12
-13
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
module Panel::News::BackEnd::NewsBulletinsHelper
|
||||
|
||||
def show_approval_link(news_bulletin)
|
||||
def news_show_approval_link(news_bulletin)
|
||||
by_news_bulletin = (!news_bulletin.is_expired? and !news_bulletin.is_checked?)
|
||||
by_user = news_bulletin.news_bulletin_category.authed_users('fact_check').include?(current_user) or is_manager?
|
||||
by_news_bulletin and by_user
|
||||
|
||||
Vendored
+1
-1
@@ -54,7 +54,7 @@
|
||||
<% end %>
|
||||
<li class="dropdown"><%= link_to t('news_bulletin.delete'), panel_news_back_end_news_bulletin_path(news_bulletin), :confirm => t('news.sure?'), :method => :delete, :remote => true %></li>
|
||||
<% end %>
|
||||
<% if show_approval_link(news_bulletin) %>
|
||||
<% if news_show_approval_link(news_bulletin) %>
|
||||
<li><%= link_to t('news.news_bulletin.approval'), panel_news_back_end_news_bulletin_approval_preview_path(news_bulletin) %></li><%#= #TODO add ancher so user can quick access into that part %>
|
||||
<% end %>
|
||||
|
||||
|
||||
Reference in new issue
Block a user