From c1cf0fd57f03bfec454b682e358fbdcb35d8caa4 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 9 Apr 2019 19:36:54 -0500 Subject: [PATCH] Add a quick create another button to content#show pages --- app/views/content/show.html.erb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/views/content/show.html.erb b/app/views/content/show.html.erb index cb262b72..8198e31f 100644 --- a/app/views/content/show.html.erb +++ b/app/views/content/show.html.erb @@ -27,6 +27,17 @@
<%= render partial: 'content/display/sidelinks', locals: { content: @serialized_content } %> + + <% if user_signed_in? && current_user.can_create?(@serialized_content.raw_model.class) %> + <%= link_to new_polymorphic_path(@serialized_content.raw_model.class) do %> +
+
+ arrow_forward + Create another <%= @serialized_content.class_name.downcase %> +
+
+ <% end %> + <% end %>