hides retire link if no author/admin
This commit is contained in:
@@ -3,6 +3,7 @@ class UsersController < ApplicationController
|
|||||||
|
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
helper_method :authorized_for_filter?
|
helper_method :authorized_for_filter?
|
||||||
|
helper_method :author_or_admin?
|
||||||
|
|
||||||
def show
|
def show
|
||||||
load_filtered_activity if valid_access?
|
load_filtered_activity if valid_access?
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
<br>
|
<br>
|
||||||
<%= proposal.summary %>
|
<%= proposal.summary %>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
<% if author_or_admin? %>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<% if proposal.retired? %>
|
<% if proposal.retired? %>
|
||||||
<span class="label alert"><%= t('users.show.retired') %></span>
|
<span class="label alert"><%= t('users.show.retired') %></span>
|
||||||
@@ -15,6 +17,7 @@
|
|||||||
class: 'delete' %>
|
class: 'delete' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user