0
0
Fork 0
mirror of https://github.com/ENSL/ensl.org.git synced 2025-01-22 17:21:10 +00:00
ensl.org/app/views/forums/_controls.html.erb

11 lines
436 B
Text
Raw Normal View History

<div class="controls">
<% if forum.topics.build.can_create? cuser %>
<%= link_to 'New Topic', new_topic_url(id: forum.id), class: 'button' %>
<% end %>
<% if forum.can_update? cuser %>
<%= link_to 'Edit Forum', edit_forum_path(forum), class: 'button' %>
<% end %>
<% if forum.can_destroy? cuser %>
<%= link_to 'Destroy Forum', forum, class: 'button', confirm: 'Are you sure?', method: :delete %>
<% end %>
</div>