From d2190ea67f653412f44bb6526cb5aaf4078bbd4e Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Mon, 30 Jan 2017 13:02:42 +0000 Subject: [PATCH] Show chart of which content types user can currently create/edit --- app/views/subscriptions/new.html.erb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/views/subscriptions/new.html.erb b/app/views/subscriptions/new.html.erb index 57dbe989..d45eed15 100644 --- a/app/views/subscriptions/new.html.erb +++ b/app/views/subscriptions/new.html.erb @@ -1,7 +1,16 @@ +

+ <% [Character, Location, Item, Creature, Race, Religion, Group, Magic, Language, Scene].each do |content_class| %> + <% can_create = current_user.can_create?(content_class) %> + <% edit_message = current_user.send(content_class.name.pluralize.downcase).any? && !can_create %> + + <%= content_class.icon %> + + <% end %> +

+

Subscription Plan

- <%# Please choose one of the following plans for your Notebook subscription. %> You're currently subscribed to Notebook's <%= @active_billing_plan.name %> plan. <% unless @active_billing_plan.nil? || @active_billing_plan.stripe_plan_id == 'starter' %> Your subscription will be active until <%= current_user.active_subscriptions.first.end_date.strftime('%B %d, %Y') %>, when it will automatically renew for another month.