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.
- data/app/controllers/kaui/account_timelines_controller.rb +37 -42
- data/app/controllers/kaui/accounts_controller.rb +11 -5
- data/app/controllers/kaui/bundles_controller.rb +20 -14
- data/app/controllers/kaui/credits_controller.rb +4 -2
- data/app/controllers/kaui/payment_methods_controller.rb +7 -3
- data/app/controllers/kaui/refunds_controller.rb +17 -8
- data/app/controllers/kaui/subscriptions_controller.rb +1 -2
- data/app/helpers/kaui/killbill_helper.rb +47 -96
- data/app/views/kaui/accounts/show.html.erb +4 -4
- data/app/views/kaui/payment_methods/_payment_methods_table.html.erb +3 -1
- data/app/views/kaui/subscriptions/_subscriptions_table.html.erb +7 -3
- data/lib/kaui/version.rb +1 -1
- data/test/dummy/config/database.yml +1 -1
- data/test/dummy/log/development.log +627 -0
- data/test/dummy/log/test.log +9612 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/test_helper.rb +10 -0
- metadata +2 -2
@@ -31,12 +31,12 @@
|
|
31
31
|
<dt>External key:</dt>
|
32
32
|
<dd><%= @account.external_key %> </dd>
|
33
33
|
<dt>Account balance:</dt>
|
34
|
-
<% if @account.balance.nil? %>
|
35
|
-
<dd>unknown </dd>
|
34
|
+
<% if @account.balance.nil? %>
|
35
|
+
<dd>unknown </dd>
|
36
36
|
<% elsif @account.balance <= 0 %>
|
37
37
|
<dd><span class="label label-success" ><%= @account.balance %></span> </dd>
|
38
38
|
<% else %>
|
39
|
-
<dd><span class="label label-important" ><%= @account.balance %></span> </dd>
|
39
|
+
<dd><span class="label label-important" ><%= @account.balance %></span> </dd>
|
40
40
|
<% end %>
|
41
41
|
<dt>Notified for inv?</dt>
|
42
42
|
<dd><%= @account.is_notified_for_invoices %> <%= 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.
|
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? %> </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
|
-
<%
|
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
|
-
|
34
|
-
|
35
|
-
|
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