竞赛通知要可以编辑和删除
This commit is contained in:
parent
cbefe70e00
commit
631bcd508f
|
@ -32,14 +32,14 @@
|
|||
l(:button_edit),
|
||||
{:action => 'edit', :id => @news},
|
||||
:class => 'postOptionLink'
|
||||
) if User.current.allowed_to?(:manage_news, @contest) %>
|
||||
) if User.current == @news.author || User.current.admin_of_contest?(@contest) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= delete_link(
|
||||
news_path(@news),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'postOptionLink'
|
||||
) if User.current.allowed_to?(:manage_news, @contest) %>
|
||||
) if User.current == @news.author || User.current.admin_of_contest?(@contest) %>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -45,14 +45,14 @@
|
|||
l(:button_edit),
|
||||
{controller:'news', :action => 'edit', :id => activity.id},
|
||||
:class => 'postOptionLink'
|
||||
) if User.current.allowed_to?(:manage_news, activity.course) %>
|
||||
) if User.current == activity.author || User.current.admin_of_contest?(activity.contest) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= delete_link(
|
||||
news_path(activity),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'postOptionLink'
|
||||
) if User.current.allowed_to?(:manage_news, activity.course) %>
|
||||
) if User.current == activity.author || User.current.admin_of_contest?(activity.contest) %>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue