kaui 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/Gemfile +1 -1
- data/README.md +10 -15
- data/app/assets/images/kaui/duck.png +0 -0
- data/app/assets/images/kaui/logo.png +0 -0
- data/app/assets/images/kaui/search.png +0 -0
- data/app/assets/images/kaui/search_white.png +0 -0
- data/app/assets/javascripts/application.js +3 -0
- data/app/assets/javascripts/kaui/bootstrap-tweaks.js +3 -0
- data/app/assets/javascripts/kaui/kaui.js +99 -0
- data/app/assets/stylesheets/application.css +3 -1
- data/app/assets/stylesheets/bootstrap_and_overrides.less +39 -0
- data/app/assets/stylesheets/kaui/common.less +538 -0
- data/app/assets/stylesheets/kaui/datatable.less +75 -0
- data/app/assets/stylesheets/kaui/header.less +186 -0
- data/app/assets/stylesheets/kaui/home.less +82 -0
- data/app/assets/stylesheets/kaui/invoice.less +54 -0
- data/app/assets/stylesheets/kaui/kaui.less +16 -0
- data/app/assets/stylesheets/kaui/payment.less +29 -0
- data/app/assets/stylesheets/kaui/subscription.less +5 -0
- data/app/assets/stylesheets/kaui/tags.less +175 -0
- data/app/assets/stylesheets/kaui/timeline.less +4 -0
- data/app/controllers/kaui/account_emails_controller.rb +18 -18
- data/app/controllers/kaui/account_tags_controller.rb +8 -30
- data/app/controllers/kaui/account_timelines_controller.rb +13 -23
- data/app/controllers/kaui/accounts_controller.rb +65 -62
- data/app/controllers/kaui/admin_allowed_users_controller.rb +48 -32
- data/app/controllers/kaui/admin_tenants_controller.rb +147 -142
- data/app/controllers/kaui/bundle_tags_controller.rb +9 -33
- data/app/controllers/kaui/bundles_controller.rb +23 -62
- data/app/controllers/kaui/chargebacks_controller.rb +5 -11
- data/app/controllers/kaui/charges_controller.rb +11 -18
- data/app/controllers/kaui/credits_controller.rb +19 -22
- data/app/controllers/kaui/custom_fields_controller.rb +44 -16
- data/app/controllers/kaui/engine_controller.rb +56 -3
- data/app/controllers/kaui/engine_controller_util.rb +75 -1
- data/app/controllers/kaui/home_controller.rb +19 -0
- data/app/controllers/kaui/invoice_items_controller.rb +16 -21
- data/app/controllers/kaui/invoices_controller.rb +31 -53
- data/app/controllers/kaui/payment_methods_controller.rb +14 -46
- data/app/controllers/kaui/payments_controller.rb +60 -69
- data/app/controllers/kaui/refunds_controller.rb +11 -25
- data/app/controllers/kaui/registrations_controller.rb +38 -0
- data/app/controllers/kaui/subscriptions_controller.rb +82 -95
- data/app/controllers/kaui/tag_definitions_controller.rb +1 -5
- data/app/controllers/kaui/tags_controller.rb +17 -17
- data/app/controllers/kaui/tenants_controller.rb +38 -55
- data/app/controllers/kaui/transactions_controller.rb +8 -15
- data/app/helpers/kaui/application_helper.rb +4 -0
- data/app/helpers/kaui/object_helper.rb +24 -0
- data/app/helpers/kaui/payment_method_helper.rb +9 -0
- data/app/helpers/kaui/subscription_helper.rb +1 -1
- data/app/helpers/kaui/uuid_helper.rb +1 -0
- data/app/models/kaui/ability.rb +7 -1
- data/app/models/kaui/account.rb +6 -2
- data/app/models/kaui/account_email.rb +10 -0
- data/app/models/kaui/allowed_user.rb +16 -4
- data/app/models/kaui/audit_log.rb +5 -3
- data/app/models/kaui/bundle.rb +6 -11
- data/app/models/kaui/credit.rb +3 -0
- data/app/models/kaui/invoice.rb +10 -15
- data/app/models/kaui/invoice_payment.rb +10 -13
- data/app/models/kaui/killbill_registerable.rb +7 -0
- data/app/models/kaui/payment.rb +19 -12
- data/app/models/kaui/payment_method.rb +9 -0
- data/app/models/kaui/payment_state.rb +52 -0
- data/app/models/kaui/tag.rb +14 -0
- data/app/models/kaui/tag_definition.rb +8 -2
- data/app/models/kaui/user.rb +5 -4
- data/app/views/kaui/account_emails/_account_emails_table.html.erb +12 -9
- data/app/views/kaui/account_emails/_form.html.erb +9 -9
- data/app/views/kaui/account_emails/new.html.erb +9 -2
- data/app/views/kaui/account_tags/_form.html.erb +20 -29
- data/app/views/kaui/account_tags/_form_bar.html.erb +21 -0
- data/app/views/kaui/account_tags/edit.html.erb +9 -4
- data/app/views/kaui/account_timelines/show.html.erb +204 -287
- data/app/views/kaui/accounts/_account_info.html.erb +108 -0
- data/app/views/kaui/accounts/_billing_info.html.erb +129 -0
- data/app/views/kaui/accounts/_form.html.erb +127 -115
- data/app/views/kaui/accounts/_payment_methods.html.erb +28 -0
- data/app/views/kaui/accounts/edit.html.erb +10 -0
- data/app/views/kaui/accounts/index.html.erb +38 -23
- data/app/views/kaui/accounts/new.html.erb +9 -4
- data/app/views/kaui/accounts/show.html.erb +4 -106
- data/app/views/kaui/admin_allowed_users/_form.html.erb +19 -0
- data/app/views/kaui/admin_allowed_users/index.html.erb +35 -18
- data/app/views/kaui/admin_allowed_users/new.html.erb +9 -21
- data/app/views/kaui/admin_allowed_users/show.html.erb +42 -50
- data/app/views/kaui/admin_tenants/_form.html.erb +25 -0
- data/app/views/kaui/admin_tenants/_tenants_table.html.erb +27 -0
- data/app/views/kaui/admin_tenants/index.html.erb +14 -23
- data/app/views/kaui/admin_tenants/new.html.erb +8 -37
- data/app/views/kaui/admin_tenants/show.html.erb +128 -113
- data/app/views/kaui/bundle_tags/_form.html.erb +20 -28
- data/app/views/kaui/bundle_tags/_form_bar.html.erb +21 -0
- data/app/views/kaui/bundle_tags/edit.html.erb +9 -4
- data/app/views/kaui/bundles/index.html.erb +76 -29
- data/app/views/kaui/bundles/transfer.html.erb +28 -28
- data/app/views/kaui/chargebacks/_form.html.erb +31 -29
- data/app/views/kaui/chargebacks/new.html.erb +9 -4
- data/app/views/kaui/charges/_form.html.erb +35 -59
- data/app/views/kaui/charges/new.html.erb +9 -4
- data/app/views/kaui/credits/_form.html.erb +32 -59
- data/app/views/kaui/credits/new.html.erb +9 -4
- data/app/views/kaui/custom_fields/_form.html.erb +31 -0
- data/app/views/kaui/custom_fields/index.html.erb +33 -20
- data/app/views/kaui/custom_fields/new.html.erb +10 -0
- data/app/views/kaui/home/index.html.erb +12 -9
- data/app/views/kaui/invoice_items/_edit_form.html.erb +30 -0
- data/app/views/kaui/invoice_items/edit.html.erb +10 -91
- data/app/views/kaui/invoices/_invoice_table.html.erb +113 -0
- data/app/views/kaui/invoices/index.html.erb +31 -22
- data/app/views/kaui/invoices/show.html.erb +77 -91
- data/app/views/kaui/layouts/kaui_account_navbar.html.erb +11 -0
- data/app/views/kaui/layouts/kaui_application.html.erb +14 -53
- data/app/views/kaui/layouts/kaui_flash.html.erb +17 -0
- data/app/views/kaui/layouts/kaui_footer.html.erb +2 -0
- data/app/views/kaui/layouts/kaui_header.html.erb +17 -0
- data/app/views/kaui/layouts/kaui_navbar.html.erb +75 -0
- data/app/views/kaui/payment_methods/_form.html.erb +26 -23
- data/app/views/kaui/payment_methods/_new_creditcard_payment_method.html.erb +46 -41
- data/app/views/kaui/payment_methods/_payment_methods_details_table.html.erb +25 -0
- data/app/views/kaui/payment_methods/_payment_methods_table.html.erb +50 -52
- data/app/views/kaui/payment_methods/new.html.erb +9 -4
- data/app/views/kaui/payments/_form.html.erb +55 -0
- data/app/views/kaui/payments/_payment_table.html.erb +117 -0
- data/app/views/kaui/payments/index.html.erb +31 -22
- data/app/views/kaui/payments/new.html.erb +9 -92
- data/app/views/kaui/payments/show.html.erb +38 -2
- data/app/views/kaui/refunds/_form.html.erb +240 -0
- data/app/views/kaui/refunds/new.html.erb +8 -280
- data/app/views/kaui/registrations/_form.html.erb +19 -0
- data/app/views/kaui/registrations/new.html.erb +10 -0
- data/app/views/kaui/sessions/_form.html.erb +19 -0
- data/app/views/kaui/sessions/new.html.erb +7 -18
- data/app/views/kaui/subscriptions/_edit_form.html.erb +26 -0
- data/app/views/kaui/subscriptions/_form.html.erb +34 -31
- data/app/views/kaui/subscriptions/_subscriptions_table.html.erb +37 -24
- data/app/views/kaui/subscriptions/edit.html.erb +10 -30
- data/app/views/kaui/subscriptions/new.html.erb +14 -11
- data/app/views/kaui/tag_definitions/_form.html.erb +14 -11
- data/app/views/kaui/tag_definitions/index.html.erb +56 -30
- data/app/views/kaui/tag_definitions/new.html.erb +9 -2
- data/app/views/kaui/tags/_tags_table.html.erb +7 -10
- data/app/views/kaui/tags/index.html.erb +29 -20
- data/app/views/kaui/tenants/_form.html.erb +13 -0
- data/app/views/kaui/tenants/index.html.erb +9 -16
- data/app/views/kaui/transactions/_form.html.erb +47 -67
- data/app/views/kaui/transactions/new.html.erb +9 -2
- data/config/initializers/killbill_registerable.rb +4 -0
- data/config/routes.rb +88 -93
- data/kaui.gemspec +11 -2
- data/lib/kaui/engine.rb +6 -4
- data/lib/kaui/version.rb +1 -1
- data/lib/kaui.rb +24 -1
- data/test/dummy/config/application.rb +2 -0
- data/test/dummy/config/database.yml +6 -3
- data/test/dummy/config/initializers/killbill_client.rb +0 -2
- data/test/fixtures/catalog-v1.xml +74 -0
- data/test/fixtures/catalog_translation_fr-v1.properties +1 -0
- data/test/fixtures/invoice_template-v1.html +100 -0
- data/test/fixtures/invoice_translation_fr-v1.properties +23 -0
- data/test/fixtures/overdue-v1.xml +49 -0
- data/test/fixtures/stripe.yml +2 -0
- data/test/functional/kaui/account_emails_controller_test.rb +35 -8
- data/test/functional/kaui/account_tags_controller_test.rb +8 -8
- data/test/functional/kaui/account_timelines_controller_test.rb +6 -7
- data/test/functional/kaui/accounts_controller_test.rb +72 -10
- data/test/functional/kaui/admin_allowed_users_controller_test.rb +6 -5
- data/test/functional/kaui/admin_tenants_controller_test.rb +104 -48
- data/test/functional/kaui/bundle_tags_controller_test.rb +14 -9
- data/test/functional/kaui/bundles_controller_test.rb +59 -23
- data/test/functional/kaui/chargebacks_controller_test.rb +29 -7
- data/test/functional/kaui/charges_controller_test.rb +31 -10
- data/test/functional/kaui/credits_controller_test.rb +25 -6
- data/test/functional/kaui/custom_fields_controller_test.rb +25 -1
- data/test/functional/kaui/functional_test_helper_nosetup.rb +6 -4
- data/test/functional/kaui/home_controller_test.rb +24 -0
- data/test/functional/kaui/invoice_items_controller_test.rb +56 -8
- data/test/functional/kaui/invoices_controller_test.rb +27 -18
- data/test/functional/kaui/payment_methods_controller_test.rb +2 -22
- data/test/functional/kaui/payments_controller_test.rb +8 -3
- data/test/functional/kaui/refunds_controller_test.rb +40 -21
- data/test/functional/kaui/subscriptions_controller_test.rb +77 -24
- data/test/functional/kaui/tag_definitions_controller_test.rb +1 -7
- data/test/functional/kaui/tags_controller_test.rb +1 -1
- data/test/functional/kaui/tenants_controller_test.rb +9 -9
- data/test/functional/kaui/transactions_controller_test.rb +41 -16
- data/test/integration/kaui/integration_test_helper.rb +0 -1
- data/test/integration/kaui/navigation_test.rb +4 -6
- data/test/test_helper.rb +2 -0
- metadata +155 -28
- data/Gemfile.lock +0 -210
- data/app/assets/stylesheets/bootstrap_and_overrides.css +0 -7
- data/app/assets/stylesheets/datatables.scss +0 -14
- data/app/assets/stylesheets/layout.scss +0 -19
- data/app/views/kaui/account_emails/show.html.erb +0 -25
- data/app/views/kaui/account_tags/_account_tags_table.html.erb +0 -32
- data/app/views/kaui/account_tags/show.html.erb +0 -6
- data/app/views/kaui/account_timelines/index.html.erb +0 -14
- data/app/views/kaui/bundle_tags/_bundle_tags_table.html.erb +0 -31
- data/app/views/kaui/bundle_tags/show.html.erb +0 -6
- data/app/views/kaui/bundles/show.html.erb +0 -18
- data/app/views/kaui/payment_methods/index.html.erb +0 -30
- data/app/views/kaui/payment_methods/show.html.erb +0 -3
- data/app/views/kaui/payments/_payments_table.html.erb +0 -41
- data/app/views/kaui/subscriptions/index.html.erb +0 -15
- data/app/views/kaui/subscriptions/show.html.erb +0 -33
- data/app/views/kaui/tag_definitions/show.html.erb +0 -15
- data/vendor/assets/images/img/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/img/glyphicons-halflings.png +0 -0
- data/vendor/assets/stylesheets/css/bootstrap-datepicker.cd46d38.css +0 -274
@@ -1,36 +1,39 @@
|
|
1
|
-
<%= form_for
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<p class="help-block">
|
13
|
-
Proration on customer's invoice will be done automatically.
|
14
|
-
</p>
|
15
|
-
</div>
|
1
|
+
<%= form_for @subscription, :html => {:class => 'form-horizontal'} do |f| %>
|
2
|
+
<%= f.hidden_field :bundle_id %>
|
3
|
+
<%= f.hidden_field :account_id %>
|
4
|
+
<%= f.hidden_field :product_category %>
|
5
|
+
|
6
|
+
<% if @subscription.product_category == 'ADD_ON' %>
|
7
|
+
<%= hidden_field_tag :base_product_name, @base_product_name %>
|
8
|
+
<div class="form-group">
|
9
|
+
<%= label_tag :plan_name, 'Plan', :class => 'col-sm-2 control-label' %>
|
10
|
+
<div class="col-sm-10">
|
11
|
+
<%= select_tag :plan_name, options_for_select(@plans), :class => 'form-control' %>
|
16
12
|
</div>
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
13
|
+
</div>
|
14
|
+
<% else %>
|
15
|
+
<div class="form-group">
|
16
|
+
<%= f.label :external_key, 'Key', :class => 'col-sm-2 control-label' %>
|
17
|
+
<div class="col-sm-10">
|
18
|
+
<%= f.text_field :external_key, :class => 'form-control', :id => 'external_key' %>
|
23
19
|
</div>
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
20
|
+
</div>
|
21
|
+
<div class="form-group">
|
22
|
+
<%= label_tag :plan_name, 'Plan', :class => 'col-sm-2 control-label' %>
|
23
|
+
<div class="col-sm-10">
|
24
|
+
<%= select_tag :plan_name, options_for_select(@plans), :class => 'form-control' %>
|
29
25
|
</div>
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
26
|
+
</div>
|
27
|
+
<% end %>
|
28
|
+
<div class="form-group">
|
29
|
+
<%= label_tag :requested_date, 'Date', :class => 'col-sm-2 control-label' %>
|
30
|
+
<div class="col-sm-10">
|
31
|
+
<%= text_field_tag :requested_date, Date.parse(Time.now.to_s).to_s, :class => 'form-control date-picker' %>
|
34
32
|
</div>
|
35
|
-
</
|
33
|
+
</div>
|
34
|
+
<div class="form-group">
|
35
|
+
<div class="col-sm-offset-2 col-sm-10">
|
36
|
+
<%= submit_tag 'Save', :class => 'btn btn-default' %>
|
37
|
+
</div>
|
38
|
+
</div>
|
36
39
|
<% end %>
|
@@ -1,7 +1,4 @@
|
|
1
|
-
<
|
2
|
-
<h3>Subscriptions</h3>
|
3
|
-
</div>
|
4
|
-
<table class="table table-condensed table-striped data-table">
|
1
|
+
<table id="subscriptions_<%= bundle.bundle_id %>" class="table table-condensed mobile-data">
|
5
2
|
<thead>
|
6
3
|
<tr>
|
7
4
|
<th>Product category</th>
|
@@ -13,39 +10,55 @@
|
|
13
10
|
</tr>
|
14
11
|
</thead>
|
15
12
|
<tbody>
|
16
|
-
<%
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<%= link_to '
|
26
|
-
|
27
|
-
|
28
|
-
<% elsif is_cancelled?(sub) %>
|
13
|
+
<% (bundle.subscriptions || []).each do |sub| %>
|
14
|
+
<tr class="<%= is_cancelled?(sub) ? 'expired' : 'non-expired' %>">
|
15
|
+
<td><%= humanized_product_category(sub) %></td>
|
16
|
+
<td><%= humanized_full_product_name(sub) %></td>
|
17
|
+
<td><%= humanized_start_date(sub, account) %></td>
|
18
|
+
<td><%= humanized_charged_through_date(sub, account) %></td>
|
19
|
+
<td><%= humanized_cancelled_date(sub, account) %></td>
|
20
|
+
<td class="text-center">
|
21
|
+
<% if is_future_cancelled?(sub) %>
|
22
|
+
<%= link_to 'Reinstate', kaui_engine.reinstate_subscription_path(:id => sub.subscription_id), :method => :put, :class => 'btn btn-xs' %>
|
23
|
+
<% elsif !is_cancelled?(sub) %>
|
24
|
+
<% if can? :change_plan, Kaui::Subscription %>
|
29
25
|
<%= link_to 'Change', kaui_engine.edit_subscription_path(sub.subscription_id), :class => 'btn btn-xs' %>
|
26
|
+
<% end %>
|
27
|
+
<% if can? :cancel, Kaui::Subscription %>
|
30
28
|
<div class="btn-group">
|
31
29
|
<a class="btn btn-xs dropdown-toggle" data-toggle="dropdown" href="#">
|
32
30
|
Cancel
|
33
31
|
<span class="caret"></span>
|
34
32
|
</a>
|
35
33
|
<ul class="dropdown-menu">
|
36
|
-
<li><%= link_to 'Cancel (default policy)', kaui_engine.subscription_path(:id => sub.subscription_id
|
34
|
+
<li><%= link_to 'Cancel (default policy)', kaui_engine.subscription_path(:id => sub.subscription_id), :method => :delete %></li>
|
37
35
|
<li><%= link_to 'Cancel at previous CTD (no proration)', kaui_engine.subscription_path(:id => sub.subscription_id, :policy => 'IMMEDIATE', :ctd => sub.charged_through_date, :billing_period => sub.billing_period), :method => :delete %></li>
|
38
36
|
<li><%= link_to 'Cancel immediately (generate proration)', kaui_engine.subscription_path(:id => sub.subscription_id, :policy => 'IMMEDIATE'), :method => :delete %></li>
|
39
37
|
<li><%= link_to 'Cancel end of term', kaui_engine.subscription_path(:id => sub.subscription_id, :policy => 'END_OF_TERM'), :method => :delete %></li>
|
40
38
|
</ul>
|
41
39
|
</div>
|
42
|
-
<% if sub.product_category == 'BASE' %>
|
43
|
-
<%= link_to 'Add add-ons', kaui_engine.new_subscription_path(:params => {:bundle_id => sub.bundle_id, :base_product_name => sub.product_name, :product_category => 'ADD_ON'}), :class => 'btn btn-xs' %>
|
44
|
-
<% end %>
|
45
40
|
<% end %>
|
46
|
-
|
47
|
-
|
48
|
-
|
41
|
+
<% end %>
|
42
|
+
</td>
|
43
|
+
</tr>
|
49
44
|
<% end %>
|
50
45
|
</tbody>
|
51
46
|
</table>
|
47
|
+
|
48
|
+
<%= javascript_tag do %>
|
49
|
+
$(document).ready(function() {
|
50
|
+
$('#subscriptions_<%= bundle.bundle_id %>').dataTable({
|
51
|
+
"dom": "t",
|
52
|
+
"paging": false,
|
53
|
+
"order": [[ 2, "asc" ]],
|
54
|
+
"columns": [
|
55
|
+
null,
|
56
|
+
null,
|
57
|
+
null,
|
58
|
+
null,
|
59
|
+
null,
|
60
|
+
{ "orderable": false }
|
61
|
+
]
|
62
|
+
});
|
63
|
+
});
|
64
|
+
<% end %>
|
@@ -1,30 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<div class="controls">
|
12
|
-
<%= select_tag :plan_name, options_for_select(@plans) %>
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
<div class="control-group">
|
16
|
-
<%= label_tag :requested_date, 'Change Date:', :class => 'control-label' %>
|
17
|
-
<div class="controls">
|
18
|
-
<%= text_field_tag :requested_date, Date.parse(Time.now.to_s).to_s, :class => 'input-xlarge date-picker' %>
|
19
|
-
</div>
|
20
|
-
</div>
|
21
|
-
<div class="control-group">
|
22
|
-
<%= label_tag :policy, 'Policy Override (leave blank for default; select an option to force plan change):', :class => 'control-label' %>
|
23
|
-
<div class="controls">
|
24
|
-
<%= select_tag :policy, options_for_select(['', 'IMMEDIATE', 'END_OF_TERM']) %>
|
25
|
-
</div>
|
26
|
-
</div>
|
27
|
-
<div class="form-actions">
|
28
|
-
<%= f.submit 'Change', :class => 'btn btn-primary' %>
|
29
|
-
</div>
|
30
|
-
<% end %>
|
1
|
+
<div class="register">
|
2
|
+
<div class="col-md-8 col-md-offset-2">
|
3
|
+
|
4
|
+
<div class="column-block">
|
5
|
+
<h1>Change subscription</h1>
|
6
|
+
<%= render 'edit_form' %>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
</div>
|
10
|
+
</div>
|
@@ -1,12 +1,15 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
</div>
|
1
|
+
<div class="register">
|
2
|
+
<div class="col-md-8 col-md-offset-2">
|
3
|
+
|
4
|
+
<div class="column-block">
|
5
|
+
<% if @subscription.product_category == 'ADD_ON' %>
|
6
|
+
<h1>Add new add-on</h1>
|
7
|
+
<% else %>
|
8
|
+
<h1>Add new base subscription</h1>
|
9
|
+
<% end %>
|
11
10
|
|
12
|
-
<%= render 'form' %>
|
11
|
+
<%= render 'form' %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -1,18 +1,21 @@
|
|
1
|
-
<%= form_for
|
1
|
+
<%= form_for @tag_definition, :html => {:class => 'form-horizontal'} do |f| %>
|
2
2
|
<%= f.hidden_field :id %>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
|
4
|
+
<div class='form-group'>
|
5
|
+
<%= f.label :name, 'Name', :class => 'col-sm-2 control-label' %>
|
6
|
+
<div class='col-sm-10'>
|
7
|
+
<%= f.text_field :name, :class => 'form-control' %>
|
7
8
|
</div>
|
8
9
|
</div>
|
9
|
-
<div class='
|
10
|
-
<%= f.label :description, 'Description
|
11
|
-
<div class='
|
12
|
-
<%= f.text_field :description, :class => '
|
10
|
+
<div class='form-group'>
|
11
|
+
<%= f.label :description, 'Description', :class => 'col-sm-2 control-label' %>
|
12
|
+
<div class='col-sm-10'>
|
13
|
+
<%= f.text_field :description, :class => 'form-control' %>
|
13
14
|
</div>
|
14
15
|
</div>
|
15
|
-
<div class=
|
16
|
-
|
16
|
+
<div class="form-group">
|
17
|
+
<div class="col-sm-offset-2 col-sm-10">
|
18
|
+
<%= submit_tag 'Save', :class => 'btn btn-default' %>
|
19
|
+
</div>
|
17
20
|
</div>
|
18
21
|
<% end %>
|
@@ -1,34 +1,60 @@
|
|
1
|
-
<
|
1
|
+
<div class="search">
|
2
2
|
|
3
|
-
<
|
4
|
-
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<
|
13
|
-
</tr>
|
14
|
-
</thead>
|
15
|
-
<tbody>
|
16
|
-
<% @tag_definitions.each do |tag_definition| %>
|
3
|
+
<div class="column-block">
|
4
|
+
|
5
|
+
<h1>Tag Definitions
|
6
|
+
<% if can? :create_tag_definition, Kaui::Tag %>
|
7
|
+
<%= link_to ' <i class="fa fa-plus-square"></i>'.html_safe, kaui_engine.new_tag_definition_path %>
|
8
|
+
<% end %>
|
9
|
+
</h1>
|
10
|
+
|
11
|
+
<table id='tag_definitions-table' class='table table-condensed mobile-data'>
|
12
|
+
<thead>
|
17
13
|
<tr>
|
18
|
-
<
|
19
|
-
<
|
20
|
-
<
|
21
|
-
<
|
22
|
-
<
|
23
|
-
<
|
24
|
-
<td>
|
25
|
-
<% unless tag_definition.is_system_tag? %>
|
26
|
-
<%= link_to 'Destroy', kaui_engine.tag_definition_path(tag_definition.id), :confirm => 'Are you sure?', :method => :delete %>
|
27
|
-
<% end %>
|
28
|
-
</td>
|
14
|
+
<th>Id</th>
|
15
|
+
<th>Name</th>
|
16
|
+
<th>Description</th>
|
17
|
+
<th>System tag?</th>
|
18
|
+
<th>Applicable types</th>
|
19
|
+
<th></th>
|
29
20
|
</tr>
|
30
|
-
|
31
|
-
|
32
|
-
|
21
|
+
</thead>
|
22
|
+
<tbody>
|
23
|
+
<% @tag_definitions.each do |tag_definition| %>
|
24
|
+
<tr>
|
25
|
+
<td><%= truncate_uuid(tag_definition.id) %></td>
|
26
|
+
<td><%= tag_definition.name %></td>
|
27
|
+
<td><%= tag_definition.description %></td>
|
28
|
+
<td><%= tag_definition.is_system_tag? %></td>
|
29
|
+
<td><%= tag_definition.pretty_applicable_object_types %></td>
|
30
|
+
<td>
|
31
|
+
<% unless tag_definition.is_system_tag? %>
|
32
|
+
<%= link_to 'Destroy', kaui_engine.tag_definition_path(tag_definition.id), :confirm => 'Are you sure?', :method => :delete %>
|
33
|
+
<% end %>
|
34
|
+
</td>
|
35
|
+
</tr>
|
36
|
+
<% end %>
|
37
|
+
</tbody>
|
38
|
+
</table>
|
39
|
+
|
40
|
+
</div>
|
41
|
+
|
42
|
+
</div>
|
33
43
|
|
34
|
-
|
44
|
+
<%= javascript_tag do %>
|
45
|
+
$(document).ready(function() {
|
46
|
+
$('#tag_definitions-table').dataTable({
|
47
|
+
"dom": "t",
|
48
|
+
"paging": "false",
|
49
|
+
"order": [],
|
50
|
+
"columns": [
|
51
|
+
null,
|
52
|
+
null,
|
53
|
+
null,
|
54
|
+
null,
|
55
|
+
null,
|
56
|
+
{ "orderable": false }
|
57
|
+
]
|
58
|
+
});
|
59
|
+
});
|
60
|
+
<% end %>
|
@@ -1,13 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<% if can? :add, Kaui::Tag or can? :remove, Kaui::Tag %>
|
2
|
+
<%= link_to 'Add/Remove', tags_url_or_path, :class => 'btn btn-xs' %>
|
3
|
+
<% end %>
|
4
|
+
<% if tags.present? %>
|
4
5
|
<% tags.each_with_index do |tag, idx| %>
|
5
|
-
|
6
|
+
<span><%= tag.tag_definition_name %>
|
7
|
+
<% if idx < tags.length - 1 %>, <% end %></span>
|
6
8
|
<% end %>
|
7
9
|
<br/>
|
8
|
-
|
9
|
-
<% if can? :add, Kaui::Tag or can? :remove, Kaui::Tag %>
|
10
|
-
<%= link_to 'Add/Remove', tags_url_or_path, :class => 'btn btn-xs' %>
|
11
|
-
<% end %>
|
12
|
-
<%= link_to 'Tags Audit', tags_show_path, :class => 'btn btn-xs' %>
|
13
|
-
</dd>
|
10
|
+
<% end %>
|
@@ -1,28 +1,37 @@
|
|
1
|
-
<
|
1
|
+
<div class="search">
|
2
2
|
|
3
|
-
<
|
4
|
-
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
<
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
3
|
+
<div class="column-block">
|
4
|
+
|
5
|
+
<h1>Tags</h1>
|
6
|
+
|
7
|
+
<table id="tags-table" class="table table-condensed mobile-data">
|
8
|
+
<thead>
|
9
|
+
<tr>
|
10
|
+
<th>Tag ID</th>
|
11
|
+
<th>Object ID</th>
|
12
|
+
<th>Object type</th>
|
13
|
+
<th>Tag definition name</th>
|
14
|
+
</tr>
|
15
|
+
</thead>
|
16
|
+
<tbody>
|
17
|
+
<tr>
|
18
|
+
<td colspan="1" class="dataTables_empty">Loading data from server</td>
|
19
|
+
</tr>
|
20
|
+
</tbody>
|
21
|
+
</table>
|
22
|
+
|
23
|
+
</div>
|
24
|
+
|
25
|
+
</div>
|
17
26
|
|
18
27
|
<%= javascript_tag do %>
|
19
28
|
$(document).ready(function() {
|
20
29
|
$('#tags-table').dataTable({
|
21
|
-
"
|
22
|
-
"
|
23
|
-
"
|
24
|
-
"
|
25
|
-
"
|
30
|
+
"dom": "<'row'<'col-md-6'l><'col-md-6'f>r>t<'row'<'col-md-6'i><'col-md-6'p>>",
|
31
|
+
"pagingType": "full_numbers",
|
32
|
+
"processing": true,
|
33
|
+
"serverSide": true,
|
34
|
+
"ajax": "<%= tags_pagination_path :format => :json %>"
|
26
35
|
});
|
27
36
|
});
|
28
37
|
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%= form_for :tenants, :url => {:action => :select_tenant}, :html => {:class => 'form-horizontal'} do |f| %>
|
2
|
+
<div class="form-group">
|
3
|
+
<%= label_tag :tenant_name, 'Tenant', :class => 'col-sm-2 control-label' %>
|
4
|
+
<div class="col-sm-10">
|
5
|
+
<%= select_tag :kb_tenant_id, options_for_select(@tenants.map { |t| [t.name || t.api_key, t.kb_tenant_id] }), :class => 'form-control' %>
|
6
|
+
</div>
|
7
|
+
</div>
|
8
|
+
<div class="form-group">
|
9
|
+
<div class="col-sm-offset-2 col-sm-10">
|
10
|
+
<%= f.submit 'Save', :class => 'btn btn-default' %>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
@@ -1,17 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<fieldset>
|
4
|
-
<div class="control-group">
|
5
|
-
<%= label_tag :tenant_name, "Available Tenants:", :class => "control-label" %>
|
6
|
-
<div class="controls">
|
7
|
-
<%= select_tag :kb_tenant_id, options_for_select(@tenants.map { |t| [t.name, t.kb_tenant_id] }) %>
|
8
|
-
</div>
|
9
|
-
</div>
|
10
|
-
<div class="form-actions">
|
11
|
-
<%= f.submit 'Chose Tenant', :class => 'btn btn-primary' %>
|
12
|
-
<%= link_to 'Back', :back, :class => 'btn' %>
|
13
|
-
</div>
|
1
|
+
<div class="register">
|
2
|
+
<div class="col-md-8 col-md-offset-2">
|
14
3
|
|
15
|
-
|
16
|
-
|
17
|
-
|
4
|
+
<div class="column-block">
|
5
|
+
<h1>Choose tenant</h1>
|
6
|
+
<%= render 'form' %>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
</div>
|
10
|
+
</div>
|
@@ -1,77 +1,57 @@
|
|
1
|
-
<%= form_for
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<% end %>
|
11
|
-
<% if @payment_method_id.present? %>
|
12
|
-
<div class="control-group">
|
13
|
-
<%= label_tag :payment_method_id, 'Payment method id:', :class => 'control-label' %>
|
14
|
-
<div class="controls">
|
15
|
-
<%= text_field_tag :payment_method_id, @payment_method_id, :class => 'input-xlarge disabled', :readonly => true %>
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
<% end %>
|
19
|
-
<% if @transaction.payment_id.present? %>
|
20
|
-
<div class="control-group">
|
21
|
-
<%= f.label :payment_id, 'Payment id:', :class => 'control-label' %>
|
22
|
-
<div class="controls">
|
23
|
-
<%= f.text_field :payment_id, :class => 'input-xlarge disabled', :readonly => true %>
|
24
|
-
</div>
|
25
|
-
</div>
|
26
|
-
<% end %>
|
27
|
-
<div class="control-group">
|
28
|
-
<%= f.label :transaction_type, 'Transaction type', :class => 'control-label' %>
|
29
|
-
<div class="controls">
|
30
|
-
<%= f.select :transaction_type, %w(AUTHORIZE CAPTURE CHARGEBACK CREDIT PURCHASE REFUND VOID), {}, :class => 'input-medium' %>
|
31
|
-
</div>
|
1
|
+
<%= form_for @transaction, :url => {:action => :create}, :html => {:class => 'form-horizontal'} do |f| %>
|
2
|
+
<%= f.hidden_field :payment_id %>
|
3
|
+
<%= hidden_field_tag :account_id, @account_id %>
|
4
|
+
<%= hidden_field_tag :payment_method_id, @payment_method_id %>
|
5
|
+
|
6
|
+
<div class="form-group">
|
7
|
+
<%= f.label :transaction_type, 'Transaction type', :class => 'col-sm-3 control-label' %>
|
8
|
+
<div class="col-sm-9">
|
9
|
+
<%= f.select :transaction_type, %w(AUTHORIZE CAPTURE CHARGEBACK CREDIT PURCHASE REFUND VOID), {}, :class => 'form-control' %>
|
32
10
|
</div>
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
11
|
+
</div>
|
12
|
+
<% unless @transaction.transaction_type == 'VOID' %>
|
13
|
+
<div class="form-group">
|
14
|
+
<%= f.label :amount, 'Amount', :class => 'col-sm-3 control-label' %>
|
15
|
+
<div class="col-sm-9">
|
16
|
+
<%= f.text_field :amount, :id => 'charge_amount', :class => 'form-control' %>
|
39
17
|
</div>
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
18
|
+
</div>
|
19
|
+
<div class="form-group">
|
20
|
+
<%= f.label :currency, 'Currency', :class => 'col-sm-3 control-label' %>
|
21
|
+
<div class="col-sm-9">
|
22
|
+
<%= f.select :currency, currencies, {}, :class => 'form-control' %>
|
45
23
|
</div>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
24
|
+
</div>
|
25
|
+
<% end %>
|
26
|
+
<% unless @transaction.payment_id.present? %>
|
27
|
+
<div class="form-group">
|
28
|
+
<%= f.label :payment_external_key, 'Payment key', :class => 'col-sm-3 control-label' %>
|
29
|
+
<div class="col-sm-9">
|
30
|
+
<%= f.text_field :payment_external_key, :class => 'form-control' %>
|
53
31
|
</div>
|
54
|
-
<% end %>
|
55
|
-
<div class="control-group">
|
56
|
-
<%= f.label :transaction_external_key, 'Transaction external key', :class => 'control-label' %>
|
57
|
-
<div class="controls">
|
58
|
-
<%= f.text_field :transaction_external_key, :class => 'input-medium' %>
|
59
32
|
</div>
|
33
|
+
<% end %>
|
34
|
+
<div class="form-group">
|
35
|
+
<%= f.label :transaction_external_key, 'Transaction key', :class => 'col-sm-3 control-label' %>
|
36
|
+
<div class="col-sm-9">
|
37
|
+
<%= f.text_field :transaction_external_key, :class => 'form-control' %>
|
60
38
|
</div>
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
39
|
+
</div>
|
40
|
+
<div class="form-group">
|
41
|
+
<%= label_tag :reason, 'Reason', :class => 'col-sm-3 control-label' %>
|
42
|
+
<div class="col-sm-9">
|
43
|
+
<%= select_tag :reason, options_for_select(Kaui::Payment::SAMPLE_REASON_CODES), :class => 'form-control' %>
|
66
44
|
</div>
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
45
|
+
</div>
|
46
|
+
<div class="form-group">
|
47
|
+
<%= label_tag :comment, 'Comment', :class => 'col-sm-3 control-label' %>
|
48
|
+
<div class="col-sm-9">
|
49
|
+
<%= text_area_tag :comment, nil, :rows => 3, :class => 'form-control' %>
|
72
50
|
</div>
|
73
|
-
|
74
|
-
|
51
|
+
</div>
|
52
|
+
<div class="form-group">
|
53
|
+
<div class="col-sm-offset-3 col-sm-9">
|
54
|
+
<%= submit_tag 'Save', :class => 'btn btn-default' %>
|
75
55
|
</div>
|
76
|
-
</
|
56
|
+
</div>
|
77
57
|
<% end %>
|