kaui 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,12 +31,12 @@
31
31
  <dt>External key:</dt>
32
32
  <dd><%= @account.external_key %>&nbsp;</dd>
33
33
  <dt>Account balance:</dt>
34
- <% if @account.balance.nil? %>
35
- <dd>unknown &nbsp;</dd>
34
+ <% if @account.balance.nil? %>
35
+ <dd>unknown &nbsp;</dd>
36
36
  <% elsif @account.balance <= 0 %>
37
37
  <dd><span class="label label-success" ><%= @account.balance %></span> &nbsp;</dd>
38
38
  <% else %>
39
- <dd><span class="label label-important" ><%= @account.balance %></span>&nbsp;</dd>
39
+ <dd><span class="label label-important" ><%= @account.balance %></span>&nbsp;</dd>
40
40
  <% end %>
41
41
  <dt>Notified for inv?</dt>
42
42
  <dd><%= @account.is_notified_for_invoices %>&nbsp;<%= link_to "Toggle", kaui_engine.toggle_email_notifications_account_path(@account.account_id, :is_notified => !@account.is_notified_for_invoices), :method => :post, :class => 'btn btn-mini' %></dd>
@@ -54,7 +54,7 @@
54
54
  <% @bundles.each do |bundle| %>
55
55
  <% subs = @subscriptions_by_bundle_id[bundle.bundle_id] %>
56
56
  <% if subs.present? %>
57
- <h2>Bundle <%= link_to Kaui.bundle_key_display_string.call(bundle.external_key), Kaui.bundle_home_path.call(bundle.bundle_id) if bundle.external_key.present? %>&nbsp;</h2>
57
+ <h2>Bundle <%= link_to Kaui.bundle_key_display_string.call(bundle.external_key), Kaui.bundle_home_path.call(bundle.external_key) if bundle.external_key.present? %>&nbsp;</h2>
58
58
  <%= render :partial => "kaui/subscriptions/subscriptions_table", :locals => { :subscriptions => subs } %>
59
59
  <% end %>
60
60
  <% end %>
@@ -30,7 +30,9 @@
30
30
  <% end %>
31
31
  </td>
32
32
  <td>
33
- <% unless payment_method.is_default %>
33
+ <% if payment_method.is_default %>
34
+ <%= link_to "Delete", kaui_engine.payment_method_path(payment_method.payment_method_id, :params => { :set_auto_pay_off => "true" }), :method => :delete, :confirm => "Are you sure you want to delete this payment method?", :class => "btn btn-mini" %>
35
+ <% else %>
34
36
  <%= link_to "Delete", kaui_engine.payment_method_path(payment_method.payment_method_id), :method => :delete, :confirm => "Are you sure you want to delete this payment method?", :class => "btn btn-mini" %>
35
37
  <% end %>
36
38
  </td>
@@ -30,9 +30,13 @@
30
30
  <td>
31
31
  <nobr>
32
32
  <% if sub.product_category == 'BASE' %>
33
- <%= link_to "Change", kaui_engine.edit_subscription_path(sub.subscription_id), :class => "btn btn-mini" unless sub.canceled_date.present? %>
34
- <%= link_to "Cancel", kaui_engine.subscription_path(:id => sub.subscription_id), :method => :delete, :class => "btn btn-mini" %>
35
- <%= link_to "Add Addons", kaui_engine.new_subscription_path(:params => { :bundle_id => sub.bundle_id, :base_subscription => sub.product_name }), :class => "btn btn-mini" %>
33
+ <% if sub.canceled_date.present? %>
34
+ <%= link_to "Reinstate", kaui_engine.reinstate_subscription_path(:id => sub.subscription_id), :method => :put, :class => "btn btn-mini" %>
35
+ <% else %>
36
+ <%= link_to "Change", kaui_engine.edit_subscription_path(sub.subscription_id), :class => "btn btn-mini" %>
37
+ <%= link_to "Cancel", kaui_engine.subscription_path(:id => sub.subscription_id), :method => :delete, :class => "btn btn-mini" %>
38
+ <%= link_to "Add Addons", kaui_engine.new_subscription_path(:params => { :bundle_id => sub.bundle_id, :base_subscription => sub.product_name }), :class => "btn btn-mini" %>
39
+ <% end%>
36
40
  <% else %>
37
41
  <% end %>
38
42
  <% if sub.product_category == 'ADD_ON' %>
data/lib/kaui/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kaui
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -30,7 +30,7 @@ test:
30
30
  database: kaui_test
31
31
  pool: 5
32
32
  username: root
33
- password: root
33
+ password: <%= ENV['MYSQL_PASSWORD'] || 'root' %>
34
34
 
35
35
  production:
36
36
  adapter: mysql2