From 029229f65e34d1c10255c096e889b2e772f49e05 Mon Sep 17 00:00:00 2001 From: Suyash Choudhary <57896905+sssash18@users.noreply.github.com> Date: Sun, 16 Feb 2020 14:01:02 +0530 Subject: [PATCH] Added condition for non admins (#7480) --- app/views/features/index.html.erb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/features/index.html.erb b/app/views/features/index.html.erb index 332dbcd299..2449a76521 100644 --- a/app/views/features/index.html.erb +++ b/app/views/features/index.html.erb @@ -1,19 +1,23 @@

Features

Features allow admins to edit/update text and images displayed around the site, for example banners, sidebar content, and alerts or notices.

- +<% if current_user.admin? %>

New feature

- +<% end %> + <% if current_user.admin? %> + <% end %> <% @features.each do |feature| %> + <% if current_user.admin? %> + <% end %>
TitleEditLast edited
<%= feature.title %>edit<%= time_ago_in_words(feature.latest.created_at) %> ago by <%= feature.latest.author.name %>