From 607b764b505e0d3165b37569a947c3a73fcdd016 Mon Sep 17 00:00:00 2001 From: jomo Date: Sun, 29 Jun 2014 05:45:46 +0200 Subject: [PATCH] hide 'edit info' button for non-staff --- app/views/info/show.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/info/show.html.erb b/app/views/info/show.html.erb index 3c2799d..718fe9d 100644 --- a/app/views/info/show.html.erb +++ b/app/views/info/show.html.erb @@ -1,7 +1,9 @@ <% title @info.title %> <%= link_to "Info", info_index_path %> → <%= @info.title %> -<%= link_to "Edit Info", edit_info_path(@info), class: "btn blue right" %> +<% if mod? %> + <%= link_to "Edit Info", edit_info_path(@info), class: "btn blue right" %> +<% end %>

<%= @info.title %>

<%= render_trusted_md(@info.content).html_safe %>
\ No newline at end of file