From 791a96f68948b52940cccb98a5821b015ff941ee Mon Sep 17 00:00:00 2001 From: Albert Yi Date: Fri, 20 Jul 2018 14:12:28 -0700 Subject: [PATCH] hide title in wiki page form if not builder --- app/views/wiki_pages/_form.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/wiki_pages/_form.html.erb b/app/views/wiki_pages/_form.html.erb index 5bd91b149..737f3c9b7 100644 --- a/app/views/wiki_pages/_form.html.erb +++ b/app/views/wiki_pages/_form.html.erb @@ -4,8 +4,10 @@ <%= simple_form_for(@wiki_page) do |f| %> <% if @wiki_page.new_record? %> <%= f.input :title, error: false, input_html: { data: { autocomplete: "tag" } } %> - <% else %> + <% elsif CurrentUser.is_builder? %> <%= f.input :title, error: false, input_html: { data: { autocomplete: "tag" } }, hint: "Change to rename this wiki page. Move the tag and update any wikis linking to this page first." %> + <% else %> +

<%= @wiki_page.pretty_title %>

<% end %> <%= f.input :other_names, :as => :text, :label => "Other names (view help)".html_safe, :hint => "Names used for this tag on other sites such as Pixiv. Separate with spaces." %>