Sha256: d15b1d21deba3aa64a4994aef7fa88e4b3a7a3ac80e0303ff2b8c4176f4679b1
Contents?: true
Size: 1.74 KB
Versions: 3
Compression:
Stored size: 1.74 KB
Contents
<%= render 'header' %> <h1><%= @plan.name %></h1> <h2><%= plan_cost(@plan) %></h2> <hr> <div class="clearfix"> <h3 class="float-md-left">Plan details</h3> <ul class="nav nav-inline float-md-right"> <li class="nav-item"> <%= link_to 'Edit Details', tang.edit_admin_plan_path(@plan), class: 'nav-link' %> </li> </ul> </div> <div class="card card-block"> <dl class="card-text"> <dt>ID:</dt> <dd><%= @plan.stripe_id %></dd> <dt>Name:</dt> <dd><%= @plan.name %></dd> <dt>Price:</dt> <dd><%= "#{number_to_currency(@plan.amount.to_f / 100.0)} #{@plan.currency.upcase}/#{@plan.interval}" %></dd> <dt>Trial period:</dt> <% if @plan.trial_period_days.present? %> <dd><%= @plan.trial_period_days %></dd> <% else %> <dd>No trial</dd> <% end %> <% if @plan.statement_descriptor.present? %> <dt>Statement descriptor:</dt> <dd><%= @plan.statement_descriptor %></dd> <% end %> </dl> </div> <h3>Active subscriptions</h3> <div class="card"> <table class="table table-responsive card-text"> <tbody> <% @plan.subscriptions.where(status: [:trialing, :active, :past_due]).each do |subscription| %> <tr> <td><%= link_to subscription.customer.email, tang.admin_subscription_path(subscription) if subscription.customer.present? %></td> <td><%= subscription.status %></td> </tr> <% end %> <% if @plan.subscriptions.empty? %> <tr> <td>No active subscriptions</td> <td> </td> </tr> <% end %> </tbody> </table> </div> <hr> <%= link_to 'Delete Plan', tang.admin_plan_path(@plan), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger float-md-right' %> <%= render 'footer' %>
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tang-0.2.2 | app/views/tang/admin/plans/show.html.erb |
tang-0.2.1 | app/views/tang/admin/plans/show.html.erb |
tang-0.2.0 | app/views/tang/admin/plans/show.html.erb |