Sha256: e525bf7128d0013a02067d63e62725612c0b281ad251955c9b35aeed99a3ba6b

Contents?: true

Size: 1.67 KB

Versions: 1

Compression:

Stored size: 1.67 KB

Contents

<div class="page-header">
  <h3>Subscriptions</h3>
</div>
<table class="table table-condensed table-striped data-table">
  <thead>
    <tr>
      <th>Product category</th>
      <th>Product name</th>
      <th>Billing period</th>
      <th>Start date</th>
      <th>Charged through date</th>
      <th>Actions</th>
    </tr>   
  </thead>
  <tbody>
    <% if @subscriptions.present? && !@subscriptions.nil? %>
      <% @subscriptions.each do |sub| %>
        <tr>
          <td><%= sub.product_category.downcase.capitalize if sub.product_category.present? %></td>
          <td><%= sub.product_name.downcase.capitalize if sub.product_name.present? %></td>
          <td><%= sub.billing_period.downcase.capitalize if sub.billing_period.present? %></td>
          <td><%= format_date(sub.start_date).html_safe %></td>
          <td><%= format_date(sub.charged_through_date).html_safe %></td>
          <td>
            <% if sub.product_category == 'BASE' %>
              <%= link_to "Change", kaui_engine.edit_subscription_path(sub.subscription_id), :class => "btn btn-mini" %>
              <%= link_to "Cancel", kaui_engine.subscription_path(:id => sub.subscription_id), :method => :delete, :class => "btn btn-mini" %>
              <%= link_to "Add Addons", kaui_engine.subscription_path(sub.subscription_id), :method => :post, :class => "btn btn-mini" %>
            <% else %>
            <% end %>
            <% if sub.product_category == 'ADD_ON' %>
              <%= link_to "Cancel", kaui_engine.subscription_path(:id => sub.subscription_id), :method => :delete, :class => "btn btn-mini" %>            
            <% end %>
          </td>
        </tr>
      <% end %>
    <% end %>
  </tbody>
</table>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kaui-0.0.1 app/views/kaui/subscriptions/_subscriptions_table.html.erb