kaui 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +27 -1
- data/app/controllers/kaui/account_tags_controller.rb +24 -9
- data/app/controllers/kaui/account_timelines_controller.rb +1 -1
- data/app/controllers/kaui/accounts_controller.rb +7 -5
- data/app/controllers/kaui/bundles_controller.rb +2 -2
- data/app/controllers/kaui/chargebacks_controller.rb +3 -2
- data/app/controllers/kaui/charges_controller.rb +32 -0
- data/app/controllers/kaui/credits_controller.rb +3 -4
- data/app/controllers/kaui/external_payments_controller.rb +0 -2
- data/app/controllers/kaui/invoice_items_controller.rb +44 -0
- data/app/controllers/kaui/invoices_controller.rb +4 -3
- data/app/controllers/kaui/payments_controller.rb +10 -13
- data/app/controllers/kaui/refunds_controller.rb +19 -8
- data/app/controllers/kaui/subscriptions_controller.rb +5 -1
- data/app/controllers/kaui/tag_definitions_controller.rb +85 -0
- data/app/helpers/kaui/date_helper.rb +1 -1
- data/app/helpers/kaui/killbill_helper.rb +160 -59
- data/app/models/kaui/account.rb +7 -1
- data/app/models/kaui/account_timeline.rb +0 -4
- data/app/models/kaui/audit_log.rb +9 -7
- data/app/models/kaui/base.rb +80 -1
- data/app/models/kaui/charge.rb +14 -0
- data/app/models/kaui/chargeback.rb +2 -10
- data/app/models/kaui/event.rb +2 -13
- data/app/models/kaui/invoice.rb +6 -7
- data/app/models/kaui/invoice_item.rb +9 -17
- data/app/models/kaui/payment.rb +6 -21
- data/app/models/kaui/payment_method.rb +1 -8
- data/app/models/kaui/plugin_info.rb +1 -5
- data/app/models/kaui/plugin_info_property.rb +0 -6
- data/app/models/kaui/refund.rb +5 -13
- data/app/models/kaui/tag.rb +10 -3
- data/app/models/kaui/tag_definition.rb +46 -0
- data/app/views/kaui/account_tags/edit.html.erb +17 -17
- data/app/views/kaui/account_timelines/show.html.erb +61 -39
- data/app/views/kaui/accounts/index.html.erb +1 -1
- data/app/views/kaui/accounts/show.html.erb +16 -2
- data/app/views/kaui/bundles/show.html.erb +2 -1
- data/app/views/kaui/chargebacks/new.html.erb +18 -2
- data/app/views/kaui/charges/new.html.erb +87 -0
- data/app/views/kaui/credits/new.html.erb +1 -1
- data/app/views/kaui/invoice_items/edit.html.erb +92 -0
- data/app/views/kaui/invoice_items/index.html.erb +20 -0
- data/app/views/kaui/invoice_items/show.html.erb +31 -0
- data/app/views/kaui/invoices/index.html.erb +1 -1
- data/app/views/kaui/invoices/show.html.erb +42 -24
- data/app/views/kaui/payments/_payments_table.html.erb +7 -5
- data/app/views/kaui/payments/new.html.erb +32 -12
- data/app/views/kaui/refunds/index.html.erb +3 -3
- data/app/views/kaui/refunds/new.html.erb +3 -3
- data/app/views/kaui/refunds/show.html.erb +27 -13
- data/app/views/kaui/subscriptions/edit.html.erb +8 -0
- data/app/views/kaui/tag_definitions/_form.html.erb +45 -0
- data/app/views/kaui/tag_definitions/edit.html.erb +3 -0
- data/app/views/kaui/tag_definitions/index.html.erb +34 -0
- data/app/views/kaui/tag_definitions/new.html.erb +3 -0
- data/app/views/kaui/tag_definitions/show.html.erb +12 -0
- data/app/views/kaui/tags/_tags_table.html.erb +3 -3
- data/config/locales/en.yml +3 -0
- data/config/locales/fr.yml +3 -0
- data/config/routes.rb +11 -1
- data/lib/kaui/version.rb +1 -1
- data/test/dummy/app/controllers/application_controller.rb +10 -0
- data/test/dummy/app/views/layouts/application.html.erb +44 -11
- data/test/dummy/config/application.rb +1 -0
- data/test/dummy/config/database.yml +5 -4
- data/test/dummy/config/environments/development.rb +2 -0
- data/test/dummy/config/routes.rb +1 -2
- data/test/dummy/log/development.log +2419 -0
- data/test/dummy/log/test.log +3265 -131
- data/test/dummy/test/fixtures/accounts.yml +32 -0
- data/test/dummy/test/fixtures/bundles.yml +4 -0
- data/test/dummy/test/fixtures/invoice_items.yml +13 -0
- data/test/dummy/test/fixtures/invoices.yml +11 -0
- data/test/dummy/test/fixtures/payment_methods.yml +5 -0
- data/test/dummy/test/fixtures/plugin_info_properties.yml +59 -0
- data/test/dummy/test/fixtures/plugin_infos.yml +2 -0
- data/test/dummy/test/fixtures/refunds.yml +8 -0
- data/test/dummy/test/fixtures/tag_definitions.yml +9 -0
- data/test/dummy/tmp/cache/assets/C8D/6D0/sprockets%2F0ce756f49d61795508c543a702955fc2 +0 -0
- data/test/dummy/tmp/cache/assets/C94/4E0/sprockets%2Fea1476dc10a3348303f74d111f70441a +0 -0
- data/test/dummy/tmp/cache/assets/CD0/9D0/sprockets%2F5c9508c21501c73fbe00473a09b1f5f4 +0 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/CEA/300/sprockets%2Fdf2ad5c9d0990441c2bf59883383d652 +0 -0
- data/test/dummy/tmp/cache/assets/D0E/370/sprockets%2F27630db2080819f67c8a0ed5e491b7cb +0 -0
- data/test/dummy/tmp/cache/assets/D32/200/sprockets%2Ffa467106e01bda5d6246baea72159d64 +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D39/5E0/sprockets%2F59fd338be48a81a17a2a785cbd1612b4 +0 -0
- data/test/dummy/tmp/cache/assets/D44/170/sprockets%2Fac15571bce3f926a498da7cd09322d97 +0 -0
- data/test/dummy/tmp/cache/assets/D4A/DD0/sprockets%2F0f813582283b7f56fd83fe3d52be7e2c +0 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/D6C/710/sprockets%2F1765773caead06c0a6a19ea9de2453f7 +0 -0
- data/test/dummy/tmp/cache/assets/D76/910/sprockets%2Ff99b4bdc434e11e8634e6af62fe805e0 +0 -0
- data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/DF1/1A0/sprockets%2F7f6b7bfea83401d3106b7fadac81ea4b +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/E20/230/sprockets%2F7d3b1348fdf74cf1b6ba2107fbbac5af +0 -0
- data/test/dummy/vendor/assets/images/img/glyphicons-halflings-white.png +0 -0
- data/test/dummy/vendor/assets/images/img/glyphicons-halflings.png +0 -0
- data/test/dummy/vendor/assets/javascripts/bootstrap.v2.0.4.min.js +6 -0
- data/test/dummy/vendor/assets/javascripts/jquery.dataTables.v1.9.3.min.js +156 -0
- data/test/dummy/vendor/assets/stylesheets/bootstrap.v2.0.4.min.css +9 -0
- data/test/functional/kaui/accounts_controller_test.rb +63 -0
- data/test/functional/kaui/bundles_controller_test.rb +18 -6
- data/test/functional/kaui/invoice_items_controller_test.rb +18 -0
- data/test/functional/kaui/invoices_controller_test.rb +18 -6
- data/test/functional/kaui/tag_definitions_controller_test.rb +60 -0
- data/test/test_helper.rb +143 -0
- data/test/unit/helpers/kaui/plugin_infos_helper_test.rb +20 -0
- data/test/unit/kaui/account_test.rb +42 -0
- data/test/unit/kaui/base_test.rb +39 -0
- data/test/unit/kaui/date_helper_test.rb +13 -0
- data/test/unit/kaui/invoice_item_test.rb +23 -0
- data/test/unit/kaui/invoice_test.rb +20 -0
- data/test/unit/kaui/payment_method_test.rb +26 -0
- data/test/unit/kaui/plugin_info_property_test.rb +20 -0
- data/test/unit/kaui/plugin_info_test.rb +19 -0
- data/test/unit/kaui/refund_test.rb +19 -0
- data/test/unit/kaui/tag_definition_test.rb +23 -0
- data/test/unit/model_test.rb +23 -23
- metadata +330 -226
@@ -9,6 +9,7 @@
|
|
9
9
|
<th>Total amount</th>
|
10
10
|
<th>Paid amount</th>
|
11
11
|
<th>Payment method</th>
|
12
|
+
<th>External payment id / Secondary payment id</th>
|
12
13
|
<th>Retry count</th>
|
13
14
|
<th>Status</th>
|
14
15
|
</tr>
|
@@ -17,13 +18,14 @@
|
|
17
18
|
<% if @payments.present? %>
|
18
19
|
<% @payments.each do |payment| %>
|
19
20
|
<tr>
|
20
|
-
<td><%= format_date(payment.
|
21
|
-
<td><%= format_date(payment.
|
22
|
-
<td><%= payment.amount %> <%=
|
23
|
-
<td><%= payment.paid_amount %> <%=
|
21
|
+
<td><%= format_date(payment.requested_date).html_safe if payment.requested_date.present? %></td>
|
22
|
+
<td><%= format_date(payment.effective_date).html_safe if payment.effective_date.present? %></td>
|
23
|
+
<td><%= payment.amount %> <%= payment.currency if payment.amount.present? %></td>
|
24
|
+
<td><%= payment.paid_amount %> <%= payment.currency if payment.paid_amount.present? %></td>
|
24
25
|
<td></td>
|
26
|
+
<td><%= payment.ext_first_payment_id_ref %> <%= " / " if payment.ext_second_payment_id_ref.present? %> <%= payment.ext_second_payment_id_ref %></td>
|
25
27
|
<td><%= payment.retry_count %></td>
|
26
|
-
<td><%= payment.status %></td>
|
28
|
+
<td><%= payment.status %> <%= payment.gateway_error_code unless payment.status == 'SUCCESS' %> <%= payment.gateway_error_msg %></td>
|
27
29
|
</tr>
|
28
30
|
<% end %>
|
29
31
|
<% end %>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<div class="page-header">
|
2
|
-
<h1>
|
2
|
+
<h1>Process Payment</h1>
|
3
3
|
</div>
|
4
4
|
<%= form_for(@payment, :url => { :action => :create }, :html => { :class => "form-horizontal" }) do |f| %>
|
5
|
-
<%=
|
6
|
-
<%= hidden_field_tag :
|
5
|
+
<%= f.hidden_field :account_id %>
|
6
|
+
<%= hidden_field_tag :external, params[:external] %>
|
7
7
|
<fieldset>
|
8
8
|
<div class="control-group">
|
9
9
|
<label class="control-label">Date</label>
|
@@ -13,14 +13,6 @@
|
|
13
13
|
</label>
|
14
14
|
</div>
|
15
15
|
</div>
|
16
|
-
<div class="control-group">
|
17
|
-
<label class="control-label">Invoice number</label>
|
18
|
-
<div class="controls">
|
19
|
-
<label class="checkbox">
|
20
|
-
<%= @invoice.invoice_number %><br/>
|
21
|
-
</label>
|
22
|
-
</div>
|
23
|
-
</div>
|
24
16
|
<div class="control-group">
|
25
17
|
<label class="control-label">Account name</label>
|
26
18
|
<div class="controls">
|
@@ -29,6 +21,34 @@
|
|
29
21
|
<%= @account.email %>
|
30
22
|
</label>
|
31
23
|
</div>
|
24
|
+
</div>
|
25
|
+
<% if @invoice.present? %>
|
26
|
+
<%= f.hidden_field :invoice_id %>
|
27
|
+
<div class="control-group">
|
28
|
+
<label class="control-label">Invoice number</label>
|
29
|
+
<div class="controls">
|
30
|
+
<label class="checkbox">
|
31
|
+
<%= @invoice.invoice_number %><br/>
|
32
|
+
</label>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
<div class="control-group">
|
36
|
+
<label class="control-label">Invoice amount</label>
|
37
|
+
<div class="controls">
|
38
|
+
<label class="checkbox">
|
39
|
+
<%= @invoice.amount %> <%= @account.currency %>
|
40
|
+
</label>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
<div class="control-group">
|
44
|
+
<label class="control-label">Balance</label>
|
45
|
+
<div class="controls">
|
46
|
+
<label class="checkbox">
|
47
|
+
<%= @invoice.balance.nil? ? "0.00" : @invoice.balance %> <%= @account.currency %>
|
48
|
+
</label>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
<% end %>
|
32
52
|
<div class="control-group">
|
33
53
|
<%= f.label :amount, "Amount", :class => "control-label" %>
|
34
54
|
<div class="controls">
|
@@ -49,7 +69,7 @@
|
|
49
69
|
</div>
|
50
70
|
</div>
|
51
71
|
<div class="form-actions">
|
52
|
-
<%= button_tag "
|
72
|
+
<%= button_tag "Process Payment", :class =>"btn btn-primary" %>
|
53
73
|
<%= link_to 'Back', :back, :class => 'btn' %>
|
54
74
|
</div>
|
55
75
|
</fieldset>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<%= form_tag refunds_path, :class => "form-horizontal", :method => :get do %>
|
2
2
|
<fieldset>
|
3
|
-
<legend>Please enter payment id</legend>
|
3
|
+
<legend>Please enter either a refund or payment id</legend>
|
4
4
|
<div class="control-group">
|
5
|
-
<label class="control-label" for="
|
5
|
+
<label class="control-label" for="refund_id">Refund or payment</label>
|
6
6
|
<div class="controls">
|
7
|
-
<%= text_field_tag
|
7
|
+
<%= text_field_tag "refund_id", nil, :class => "input-xlarge", :id => "refund_id" %>
|
8
8
|
</div>
|
9
9
|
</div>
|
10
10
|
<div class="form-actions">
|
@@ -42,7 +42,7 @@
|
|
42
42
|
<label class="control-label">Payment method</label>
|
43
43
|
<div class="controls">
|
44
44
|
<label class="checkbox">
|
45
|
-
<%= @
|
45
|
+
<%= @payment_method.type %> <%= @payment_method.card_type %> <%= @payment_method.mask_number %>
|
46
46
|
</label>
|
47
47
|
</div>
|
48
48
|
</div>
|
@@ -63,9 +63,9 @@
|
|
63
63
|
</div>
|
64
64
|
</div>
|
65
65
|
<div class="control-group">
|
66
|
-
<%= f.label :
|
66
|
+
<%= f.label :amount, "Refund amount", :class => "control-label" %>
|
67
67
|
<div class="controls">
|
68
|
-
<%= f.text_field :
|
68
|
+
<%= f.text_field :amount, :value => @payment.amount, :class => 'input-small' %>
|
69
69
|
<p class="help-inline"><%= @account.currency %></p>
|
70
70
|
</div>
|
71
71
|
</div>
|
@@ -1,19 +1,33 @@
|
|
1
|
-
<% if @
|
2
|
-
|
3
|
-
|
1
|
+
<% if @refunds.present? and @refunds.size > 0 %>
|
2
|
+
<div class="page-header">
|
3
|
+
<h2>Refunds</h2>
|
4
|
+
</div>
|
5
|
+
<table class="table table-condensed table-striped">
|
6
|
+
<thead>
|
7
|
+
<tr>
|
8
|
+
<th>Refund id</th>
|
9
|
+
<th>Payment id</th>
|
10
|
+
<th>Amount</th>
|
11
|
+
<th>Adjusted?</th>
|
12
|
+
<th>Requested date</th>
|
13
|
+
<th>Effective date</th>
|
14
|
+
<th>Adjustments</th>
|
15
|
+
</tr>
|
16
|
+
</thead>
|
17
|
+
<tbody>
|
18
|
+
<% @refunds.each do |refund| %>
|
4
19
|
<tr>
|
5
|
-
<
|
6
|
-
<
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<td><%= key %></td>
|
13
|
-
<td><%= @refund_info[key] %></td>
|
20
|
+
<td><%= refund.refund_id %></td>
|
21
|
+
<td><%= link_to refund.payment_id, payment_path(refund.payment_id) %></td>
|
22
|
+
<td><%= refund.amount %> <%= refund.currency %></td>
|
23
|
+
<td><%= refund.adjusted %></td>
|
24
|
+
<td><%= format_date(refund.requested_date).html_safe %></td>
|
25
|
+
<td><%= format_date(refund.effective_date).html_safe %></td>
|
26
|
+
<td><%= refund.adjustments %></td>
|
14
27
|
</tr>
|
15
28
|
<% end %>
|
16
|
-
</
|
29
|
+
</tbody>
|
30
|
+
</table>
|
17
31
|
<% else %>
|
18
32
|
<p>Refund info not found</p>
|
19
33
|
<% end %>
|
@@ -2,6 +2,14 @@
|
|
2
2
|
<%= form_for(@subscription, :url => subscription_path(@subscription.subscription_id), :html => { :method => :put, :class => "form-horizontal" }) do |f| %>
|
3
3
|
<%= f.hidden_field :subscription_id %>
|
4
4
|
<%= f.hidden_field :price_list %>
|
5
|
+
<div class="control-group">
|
6
|
+
<label class="control-label">Account timezone</label>
|
7
|
+
<div class="controls">
|
8
|
+
<label class="checkbox">
|
9
|
+
<%= @account.timezone %>
|
10
|
+
</label>
|
11
|
+
</div>
|
12
|
+
</div>
|
5
13
|
<div class="control-group">
|
6
14
|
<%= label_tag :current_plan, 'Current plan:', :class => "control-label" %>
|
7
15
|
<div class="controls">
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<%= form_for(@tag_definition) do |f| %>
|
2
|
+
<% if @tag_definition.errors.any? %>
|
3
|
+
<div class='alert alert-error'>
|
4
|
+
<h2><%= pluralize(@tag_definition.errors.count, 'error') %> prohibited this tag definition from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% @tag_definition.errors.full_messages.each do |msg| %>
|
8
|
+
<li><%= msg %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<% unless @tag_definition.new_record? %>
|
15
|
+
<div class='control-group'>
|
16
|
+
<%= f.label :id, 'Id:', :class => 'control-label' %>
|
17
|
+
<div class='controls'>
|
18
|
+
<%= f.text_field :id, :class => 'input-xlarge disabled', :readonly => true %>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
22
|
+
<div class='control-group'>
|
23
|
+
<%= f.label :name, 'Name:', :class => 'control-label' %>
|
24
|
+
<div class='controls'>
|
25
|
+
<% unless @tag_definition.new_record? %>
|
26
|
+
<%= f.text_field :name, :class => 'input-large disabled', :readonly => true %>
|
27
|
+
<% else %>
|
28
|
+
<%= f.text_field :name %>
|
29
|
+
<% end %>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
<div class='control-group'>
|
33
|
+
<%= f.label :description, 'Description:', :class => 'control-label' %>
|
34
|
+
<div class='controls'>
|
35
|
+
<%= f.text_field :description, :class => 'input-xxlarge' %>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
<div class='form-actions'>
|
39
|
+
<%= f.submit @tag_definition.new_record? ? 'Create' : 'Update', :class => 'btn btn-primary' %>
|
40
|
+
<% unless @tag_definition.new_record? %>
|
41
|
+
<%= link_to 'Show', @tag_definition, :class => 'btn' %>
|
42
|
+
<% end %>
|
43
|
+
<%= link_to 'Back', :back, :class => 'btn' %>
|
44
|
+
</div>
|
45
|
+
<% end %>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<h2>Tag definitions</h2>
|
2
|
+
|
3
|
+
<table id='invoice_table' class='table table-condensed data-table'>
|
4
|
+
<thead>
|
5
|
+
<tr>
|
6
|
+
<th style='width: 30%'>Id</th>
|
7
|
+
<th style='width: 20%'>Name</th>
|
8
|
+
<th style='width: 35%'>Description</th>
|
9
|
+
<th style='width: 5%'></th>
|
10
|
+
<!-- <th style='width: 5%'></th> -->
|
11
|
+
<th style='width: 5%'></th>
|
12
|
+
</tr>
|
13
|
+
</thead>
|
14
|
+
<tbody>
|
15
|
+
<% @tag_definitions.each do |tag_definition| %>
|
16
|
+
<tr>
|
17
|
+
<td><%= tag_definition.id %></td>
|
18
|
+
<td><%= tag_definition.name %></td>
|
19
|
+
<td><%= tag_definition.description %></td>
|
20
|
+
<td><%= link_to 'Show', tag_definition %></td>
|
21
|
+
<!-- ><td><%= link_to 'Edit', edit_tag_definition_path(tag_definition) %></td> -->
|
22
|
+
<td>
|
23
|
+
<% unless tag_definition.is_system_tag? %>
|
24
|
+
<%= link_to 'Destroy', tag_definition, confirm: 'Are you sure?', method: :delete %>
|
25
|
+
<% end %>
|
26
|
+
</td>
|
27
|
+
</tr>
|
28
|
+
<% end %>
|
29
|
+
</tbody>
|
30
|
+
</table>
|
31
|
+
|
32
|
+
<br />
|
33
|
+
|
34
|
+
<%= link_to 'New Tag definition', new_tag_definition_path, :class => 'btn btn-primary' %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<h2>Tag definition</h2>
|
2
|
+
<dl class='dl-horizontal'>
|
3
|
+
<dt>Id:</dt>
|
4
|
+
<dd><%= @tag_definition.id %> </dd>
|
5
|
+
<dt>Name:</dt>
|
6
|
+
<dd><%= @tag_definition.name %> </dd>
|
7
|
+
<dt>Description:</dt>
|
8
|
+
<dd><%= @tag_definition.description %> </dd>
|
9
|
+
</dl>
|
10
|
+
|
11
|
+
<!-- <%= link_to 'Edit', edit_tag_definition_path(@tag_definition), :class => 'btn btn-primary' %> -->
|
12
|
+
<%= link_to 'Back', tag_definitions_path, :class => 'btn' %>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<dt>Tags:</dt>
|
2
2
|
<dd>
|
3
3
|
<% if tags.present? %>
|
4
|
-
<% tags.
|
5
|
-
<span><%= tag %><% if idx < tags.length - 1 %>, <% end %></span>
|
4
|
+
<% tags.each_with_index do |tag, idx| %>
|
5
|
+
<span><%= tag.tag_definition_name %><% if idx < tags.length - 1 %>, <% end %></span>
|
6
6
|
<% end %>
|
7
7
|
<br/>
|
8
8
|
<% end %>
|
9
|
-
<%= link_to 'Add/Remove', tags_url_or_path, :class =>
|
9
|
+
<%= link_to 'Add/Remove', tags_url_or_path, :class => 'btn btn-mini' %>
|
10
10
|
</dd>
|
data/config/routes.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
Kaui::Engine.routes.draw do
|
2
|
+
resources :tag_definitions
|
3
|
+
|
2
4
|
root :to => "home#index"
|
3
5
|
|
4
6
|
resources :accounts, :only => [ :index, :show ] do
|
@@ -16,6 +18,8 @@ Kaui::Engine.routes.draw do
|
|
16
18
|
post :refunds, :as => "refunds"
|
17
19
|
post :chargebacks, :as => "chargebacks"
|
18
20
|
post :credits, :as => "credits"
|
21
|
+
post :payments, :as => "payments"
|
22
|
+
post :charges, :as => "charges"
|
19
23
|
end
|
20
24
|
end
|
21
25
|
|
@@ -23,11 +27,15 @@ Kaui::Engine.routes.draw do
|
|
23
27
|
|
24
28
|
resources :credits, :only => [ :create, :new ]
|
25
29
|
|
30
|
+
resources :charges, :only => [ :create, :new ]
|
31
|
+
|
26
32
|
resources :external_payments, :only => [ :create, :new ]
|
27
33
|
|
34
|
+
resources :payments, :only => [ :create, :new, :index, :show ]
|
35
|
+
|
28
36
|
resources :payment_methods, :only => [ :show, :destroy ]
|
29
37
|
|
30
|
-
resources :refunds, :only => [ :show, :create, :new ]
|
38
|
+
resources :refunds, :only => [ :index, :show, :create, :new ]
|
31
39
|
|
32
40
|
resources :invoices, :only => [ :index, :show ] do
|
33
41
|
member do
|
@@ -35,6 +43,8 @@ Kaui::Engine.routes.draw do
|
|
35
43
|
end
|
36
44
|
end
|
37
45
|
|
46
|
+
resources :invoice_items, :only => [ :index, :show, :edit, :update ]
|
47
|
+
|
38
48
|
resources :bundles, :only => [ :index, :show ] do
|
39
49
|
member do
|
40
50
|
put :do_transfer
|
data/lib/kaui/version.rb
CHANGED
@@ -1,14 +1,47 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
3
|
+
<head>
|
4
|
+
<title>Kaui Dummy app</title>
|
5
|
+
<%= stylesheet_link_tag "application", "bootstrap.v2.0.4.min.css", :media => "all" %>
|
6
|
+
<%= javascript_include_tag "application", "bootstrap.v2.0.4.min.js", "jquery.dataTables.v1.9.3.min.js" %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<div class="navbar">
|
11
|
+
<div class="navbar-inner">
|
12
|
+
<div class="container">
|
13
|
+
<ul class="nav">
|
14
|
+
<li <%= "class='active'" if params[:controller] == 'accounts' %>><%= link_to "Accounts", kaui_engine.accounts_path %></li>
|
15
|
+
<li <%= "class='active'" if params[:controller] == 'account_timelines' %>><%= link_to "Account timelines", kaui_engine.account_timelines_path %></li>
|
16
|
+
<li <%= "class='active'" if params[:controller] == 'bundles' %>><%= link_to "Bundles", kaui_engine.bundles_path %></li>
|
17
|
+
<li <%= "class='active'" if params[:controller] == 'subscriptions' %>><%= link_to "Subscriptions", kaui_engine.subscriptions_path %></li>
|
18
|
+
<li <%= "class='active'" if params[:controller] == 'chargebacks' %>><%= link_to "Chargebacks", kaui_engine.chargebacks_path %></li>
|
19
|
+
<li <%= "class='active'" if params[:controller] == 'credits' %>><%= link_to "Credits", kaui_engine.credits_path %></li>
|
20
|
+
<li <%= "class='active'" if params[:controller] == 'external_payments' %>><%= link_to "External payments", kaui_engine.external_payments_path %></li>
|
21
|
+
<li <%= "class='active'" if params[:controller] == 'refunds' %>><%= link_to "Refunds", kaui_engine.refunds_path %></li>
|
22
|
+
<li <%= "class='active'" if params[:controller] == 'invoices' %>><%= link_to "Invoices", kaui_engine.invoices_path %></li>
|
23
|
+
<li <%= "class='active'" if params[:controller] == 'invoice_items' %>><%= link_to "Invoice items", kaui_engine.invoice_items_path %></li>
|
24
|
+
<li <%= "class='active'" if params[:controller] == 'tag_definitions' %>><%= link_to "Tag definitions", kaui_engine.tag_definitions_path %></li>
|
25
|
+
</ul>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
<div class="container">
|
30
|
+
<% if flash[:error] %>
|
31
|
+
<div class="row-fluid">
|
32
|
+
<div class="span12">
|
33
|
+
<div class="alert alert-error"><%= flash[:error] %></div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
<% end %>
|
37
|
+
<% if flash[:notice] %>
|
38
|
+
<div class="row-fluid">
|
39
|
+
<div class="span12">
|
40
|
+
<div class="alert alert-info"><%= flash[:notice] %></div>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
<% end %>
|
44
|
+
<%= yield %>
|
45
|
+
</div>
|
46
|
+
</body>
|
14
47
|
</html>
|