mechanize-store 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +58 -0
- data/Rakefile +32 -0
- data/app/assets/javascripts/mechanize_store/application.js +22 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/bootstrap.js +1951 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/custom.js +58 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/flot/excanvas.min.js +1 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/flot/jquery.flot.js +3137 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/flot/jquery.flot.pie.js +817 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/flot/main.js +20 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery-ui.js +2256 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/jquery.activity-indicator-1.0.0.min.js +223 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/dataTables/dataTables.bootstrap.js +245 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/dataTables/jquery.dataTables.js +14013 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/flot/excanvas.min.js +1 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/flot/jquery.flot.js +2599 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/flot/jquery.flot.pie.js +750 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/flot/jquery.flot.resize.js +60 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/flot/jquery.flot.tooltip.min.js +12 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/metisMenu/jquery.metisMenu.js +45 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/morris/morris.js +1888 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/plugins/morris/raphael-2.1.0.min.js +10 -0
- data/app/assets/javascripts/mechanize_store/sb-admin/sb-admin.js +18 -0
- data/app/assets/stylesheets/mechanize_store/application.css +199 -0
- data/app/assets/stylesheets/mechanize_store/sb-admin/bootstrap.css +5831 -0
- data/app/assets/stylesheets/mechanize_store/sb-admin/plugins/dataTables/dataTables.bootstrap.css +233 -0
- data/app/assets/stylesheets/mechanize_store/sb-admin/plugins/morris/morris-0.4.3.min.css +2 -0
- data/app/assets/stylesheets/mechanize_store/sb-admin/plugins/social-buttons/social-buttons.css +68 -0
- data/app/assets/stylesheets/mechanize_store/sb-admin/plugins/timeline/timeline.css +144 -0
- data/app/assets/stylesheets/mechanize_store/sb-admin/sb-admin.css +307 -0
- data/app/controllers/mechanize_store/application_controller.rb +4 -0
- data/app/controllers/mechanize_store/flags_controller.rb +77 -0
- data/app/controllers/mechanize_store/order_statuses_controller.rb +77 -0
- data/app/controllers/mechanize_store/orders_controller.rb +28 -0
- data/app/controllers/mechanize_store/payment_statuses_controller.rb +77 -0
- data/app/controllers/mechanize_store/payment_types_controller.rb +77 -0
- data/app/controllers/mechanize_store/product_categories_controller.rb +77 -0
- data/app/controllers/mechanize_store/products_controller.rb +77 -0
- data/app/helpers/mechanize_store/application_helper.rb +7 -0
- data/app/models/mechanize_store/flag.rb +4 -0
- data/app/models/mechanize_store/freight.rb +5 -0
- data/app/models/mechanize_store/order.rb +8 -0
- data/app/models/mechanize_store/order_status.rb +5 -0
- data/app/models/mechanize_store/payment.rb +6 -0
- data/app/models/mechanize_store/payment_status.rb +4 -0
- data/app/models/mechanize_store/payment_type.rb +4 -0
- data/app/models/mechanize_store/product.rb +5 -0
- data/app/models/mechanize_store/product_category.rb +5 -0
- data/app/models/mechanize_store/product_photo.rb +5 -0
- data/app/models/mechanize_store/store.rb +5 -0
- data/app/views/layouts/store/application.html.erb +93 -0
- data/app/views/mechanize_store/flags/_form.html.erb +11 -0
- data/app/views/mechanize_store/flags/edit.html.erb +12 -0
- data/app/views/mechanize_store/flags/index.html.erb +46 -0
- data/app/views/mechanize_store/flags/new.html.erb +9 -0
- data/app/views/mechanize_store/flags/show.html.erb +15 -0
- data/app/views/mechanize_store/order_statuses/_form.html.erb +11 -0
- data/app/views/mechanize_store/order_statuses/edit.html.erb +12 -0
- data/app/views/mechanize_store/order_statuses/index.html.erb +46 -0
- data/app/views/mechanize_store/order_statuses/new.html.erb +9 -0
- data/app/views/mechanize_store/order_statuses/show.html.erb +15 -0
- data/app/views/mechanize_store/orders/index.html.erb +84 -0
- data/app/views/mechanize_store/orders/show.html.erb +0 -0
- data/app/views/mechanize_store/payment_statuses/_form.html.erb +11 -0
- data/app/views/mechanize_store/payment_statuses/edit.html.erb +12 -0
- data/app/views/mechanize_store/payment_statuses/index.html.erb +46 -0
- data/app/views/mechanize_store/payment_statuses/new.html.erb +9 -0
- data/app/views/mechanize_store/payment_statuses/show.html.erb +15 -0
- data/app/views/mechanize_store/payment_types/_form.html.erb +11 -0
- data/app/views/mechanize_store/payment_types/edit.html.erb +12 -0
- data/app/views/mechanize_store/payment_types/index.html.erb +46 -0
- data/app/views/mechanize_store/payment_types/new.html.erb +9 -0
- data/app/views/mechanize_store/payment_types/show.html.erb +15 -0
- data/app/views/mechanize_store/product_categories/_form.html.erb +12 -0
- data/app/views/mechanize_store/product_categories/edit.html.erb +12 -0
- data/app/views/mechanize_store/product_categories/index.html.erb +48 -0
- data/app/views/mechanize_store/product_categories/new.html.erb +9 -0
- data/app/views/mechanize_store/product_categories/show.html.erb +19 -0
- data/app/views/mechanize_store/products/_form.html.erb +18 -0
- data/app/views/mechanize_store/products/edit.html.erb +12 -0
- data/app/views/mechanize_store/products/index.html.erb +50 -0
- data/app/views/mechanize_store/products/new.html.erb +9 -0
- data/app/views/mechanize_store/products/show.html.erb +43 -0
- data/app/views/shared/_flashes.html.erb +8 -0
- data/config/locales/store.pt-BR.yml +22 -0
- data/config/routes.rb +10 -0
- data/db/migrate/20140401203200_create_mechanize_store_freights.rb +12 -0
- data/db/migrate/20140401203246_create_mechanize_store_order_statuses.rb +9 -0
- data/db/migrate/20140402140318_create_mechanize_store_payment_statuses.rb +9 -0
- data/db/migrate/20140402140325_create_mechanize_store_payment_types.rb +9 -0
- data/db/migrate/20140402140539_create_mechanize_store_payments.rb +16 -0
- data/db/migrate/20140402140549_create_mechanize_store_flags.rb +9 -0
- data/db/migrate/20140402140832_create_mechanize_store_products.rb +16 -0
- data/db/migrate/20140402140942_create_mechanize_store_product_photos.rb +10 -0
- data/db/migrate/20140402141340_create_mechanize_store_stores.rb +12 -0
- data/db/migrate/20140402153139_create_mechanize_store_orders.rb +11 -0
- data/db/migrate/20140402192058_create_mechanize_store_product_categories.rb +10 -0
- data/lib/mechanize_store.rb +4 -0
- data/lib/mechanize_store/engine.rb +16 -0
- data/lib/mechanize_store/version.rb +3 -0
- data/lib/tasks/store_tasks.rake +4 -0
- data/lib/templates/erb/scaffold/_form.html.erb +13 -0
- data/lib/templates/erb/scaffold/edit.html.erb +12 -0
- data/lib/templates/erb/scaffold/index.html.erb +50 -0
- data/lib/templates/erb/scaffold/new.html.erb +9 -0
- data/lib/templates/erb/scaffold/show.html.erb +17 -0
- data/lib/templates/rails/scaffold_controller/controller.rb +79 -0
- metadata +265 -0
@@ -0,0 +1,12 @@
|
|
1
|
+
<%= title t(:editing, model: t("flag", scope: "activerecord.models")) %>
|
2
|
+
|
3
|
+
<% content_for :right do -%>
|
4
|
+
<li class="active">
|
5
|
+
<%= link_to t(:details), @flag %>
|
6
|
+
</li>
|
7
|
+
<li class="active">
|
8
|
+
<%= link_to t(:back), flags_path %>
|
9
|
+
</li>
|
10
|
+
<% end -%>
|
11
|
+
|
12
|
+
<%= render 'form' %>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<%= title t("flag", scope: "activerecord.models").pluralize %>
|
2
|
+
|
3
|
+
<% content_for :right do -%>
|
4
|
+
<li class="active">
|
5
|
+
<%= link_to t("new_flag"), new_flag_path %>
|
6
|
+
</li>
|
7
|
+
<% end -%>
|
8
|
+
|
9
|
+
<table class="table table-striped">
|
10
|
+
<thead>
|
11
|
+
<tr>
|
12
|
+
<th><%= sort_link @search, :id, t(:id, scope: "activerecord.attributes") %></th>
|
13
|
+
<th><%= sort_link @search, :name, t(:name, scope: "activerecord.attributes.flag") %></th>
|
14
|
+
<th colspan="3"></th>
|
15
|
+
</tr>
|
16
|
+
</thead>
|
17
|
+
|
18
|
+
<tbody>
|
19
|
+
|
20
|
+
<% @flags.each do |flag| %>
|
21
|
+
<tr>
|
22
|
+
<td><%= flag.id %></td>
|
23
|
+
<td><%= flag.name %></td>
|
24
|
+
<td>
|
25
|
+
<%= link_to flag do %>
|
26
|
+
<i class="fa fa-file"></i>
|
27
|
+
<% end -%>
|
28
|
+
</td>
|
29
|
+
<td>
|
30
|
+
<%= link_to edit_flag_path(flag) do %>
|
31
|
+
<i class="fa fa-edit"></i>
|
32
|
+
<% end -%>
|
33
|
+
</td>
|
34
|
+
<td>
|
35
|
+
<%= link_to flag, method: :delete, data: { confirm: t(:are_you_sure) } do %>
|
36
|
+
<i class="fa fa-trash"></i>
|
37
|
+
<% end -%>
|
38
|
+
</td>
|
39
|
+
</tr>
|
40
|
+
<% end %>
|
41
|
+
</tbody>
|
42
|
+
</table>
|
43
|
+
|
44
|
+
<br>
|
45
|
+
|
46
|
+
<%= will_paginate @flags %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= title t("flag") %>
|
2
|
+
|
3
|
+
<% content_for :right do -%>
|
4
|
+
<li class="active">
|
5
|
+
<%= link_to t(:edit), edit_flag_path(@flag) %>
|
6
|
+
</li>
|
7
|
+
<li class="active">
|
8
|
+
<%= link_to t(:back), flags_path %>
|
9
|
+
</li>
|
10
|
+
<% end -%>
|
11
|
+
|
12
|
+
<p>
|
13
|
+
<small><%= t(:name, scope: "activerecord.attributes.flag") %>:</small>
|
14
|
+
<h3><%= @flag.name %></h3>
|
15
|
+
</p>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%= title t(:editing, model: t("order_status", scope: "activerecord.models")) %>
|
2
|
+
|
3
|
+
<% content_for :right do -%>
|
4
|
+
<li class="active">
|
5
|
+
<%= link_to t(:details), @order_status %>
|
6
|
+
</li>
|
7
|
+
<li class="active">
|
8
|
+
<%= link_to t(:back), order_statuses_path %>
|
9
|
+
</li>
|
10
|
+
<% end -%>
|
11
|
+
|
12
|
+
<%= render 'form' %>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<%= title t("order_status", scope: "activerecord.models").pluralize %>
|
2
|
+
|
3
|
+
<% content_for :right do -%>
|
4
|
+
<li class="active">
|
5
|
+
<%= link_to t("new_order_status"), new_order_status_path %>
|
6
|
+
</li>
|
7
|
+
<% end -%>
|
8
|
+
|
9
|
+
<table class="table table-striped">
|
10
|
+
<thead>
|
11
|
+
<tr>
|
12
|
+
<th><%= sort_link @search, :id, t(:id, scope: "activerecord.attributes") %></th>
|
13
|
+
<th><%= sort_link @search, :name, t(:name, scope: "activerecord.attributes.order_status") %></th>
|
14
|
+
<th colspan="3"></th>
|
15
|
+
</tr>
|
16
|
+
</thead>
|
17
|
+
|
18
|
+
<tbody>
|
19
|
+
|
20
|
+
<% @order_statuses.each do |order_status| %>
|
21
|
+
<tr>
|
22
|
+
<td><%= order_status.id %></td>
|
23
|
+
<td><%= order_status.name %></td>
|
24
|
+
<td>
|
25
|
+
<%= link_to order_status do %>
|
26
|
+
<i class="fa fa-file"></i>
|
27
|
+
<% end -%>
|
28
|
+
</td>
|
29
|
+
<td>
|
30
|
+
<%= link_to edit_order_status_path(order_status) do %>
|
31
|
+
<i class="fa fa-edit"></i>
|
32
|
+
<% end -%>
|
33
|
+
</td>
|
34
|
+
<td>
|
35
|
+
<%= link_to order_status, method: :delete, data: { confirm: t(:are_you_sure) } do %>
|
36
|
+
<i class="fa fa-trash"></i>
|
37
|
+
<% end -%>
|
38
|
+
</td>
|
39
|
+
</tr>
|
40
|
+
<% end %>
|
41
|
+
</tbody>
|
42
|
+
</table>
|
43
|
+
|
44
|
+
<br>
|
45
|
+
|
46
|
+
<%= will_paginate @order_statuses %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= title t("order_status") %>
|
2
|
+
|
3
|
+
<% content_for :right do -%>
|
4
|
+
<li class="active">
|
5
|
+
<%= link_to t(:edit), edit_order_status_path(@order_status) %>
|
6
|
+
</li>
|
7
|
+
<li class="active">
|
8
|
+
<%= link_to t(:back), order_statuses_path %>
|
9
|
+
</li>
|
10
|
+
<% end -%>
|
11
|
+
|
12
|
+
<p>
|
13
|
+
<small><%= t(:name, scope: "activerecord.attributes.order_status") %>:</small>
|
14
|
+
<h3><%= @order_status.name %></h3>
|
15
|
+
</p>
|
@@ -0,0 +1,84 @@
|
|
1
|
+
<%= title t(:order, scope: "activerecord.models.mechanize_store").pluralize %>
|
2
|
+
|
3
|
+
<div class="well">
|
4
|
+
<%= search_form_for @search, :html => { :method => :get } do |f| %>
|
5
|
+
<div class="form-group">
|
6
|
+
<div class="row">
|
7
|
+
<div class="col-lg-2">
|
8
|
+
<%= f.select :order_status_id_eq, options_for_select(@order_statuses.collect{|c| [c.name, c.id]}, params[:q][:order_status_id_eq].to_i), { :include_blank => t(:order_status, scope: "activerecord.models.mechanize_store") }, { class: "form-control" } %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="col-lg-2">
|
12
|
+
<%= f.select :payment_payment_status_id_eq, options_for_select(@payment_statuses.collect{|c| [c.name, c.id]}, params[:q][:payment_payment_status_id_eq].to_i), { :include_blank => t(:payment_status, scope: "activerecord.models.mechanize_store") }, { class: "form-control" } %>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<div class="col-lg-2">
|
16
|
+
<div class="form-group">
|
17
|
+
<div class="input-group">
|
18
|
+
<%= f.text_field :created_at_gteq, alt: 'date', placeholder: t(:date_begin), value: params[:q][:created_at_gteq], as: :string, class: "datepicker form-control" %>
|
19
|
+
<span class="input-group-addon">
|
20
|
+
<i class="fa fa-calendar" data-time-icon="fa fa-time" data-date-icon="fa fa-calendar"></i>
|
21
|
+
</span>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div class="col-lg-2">
|
27
|
+
<div class="form-group">
|
28
|
+
<div class="input-group">
|
29
|
+
<%= f.text_field :created_at_lteq, alt: 'date', placeholder: t(:date_end), value: params[:q][:created_at_lteq], as: :string, class: "datepicker form-control" %>
|
30
|
+
<span class="input-group-addon">
|
31
|
+
<i class="fa fa-calendar" data-time-icon="fa fa-time" data-date-icon="fa fa-calendar"></i>
|
32
|
+
</span>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<%= f.submit t(:search), class: "btn btn-primary" %>
|
40
|
+
<% end -%>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div class="clearfix"></div>
|
44
|
+
<table class="table table-striped table-hover">
|
45
|
+
<thead>
|
46
|
+
<tr>
|
47
|
+
<th><%= sort_link(@search, :id, t(:id, scope: "activerecord.attributes") ) %></th>
|
48
|
+
<th><%= sort_link(@search, :order_status_id, t(:order_status_id, scope: "activerecord.attributes.mechanize_store.order") ) %></th>
|
49
|
+
<th>
|
50
|
+
<%= sort_link(@search, :order_payment_payment_status_name, t(:payment_status_id, scope: "activerecord.attributes.mechanize_store.payment") ) %>
|
51
|
+
</th>
|
52
|
+
<th><%= sort_link(@search, :generated_at, t(:generated_at, scope: "activerecord.attributes.mechanize_store.order") ) %></th>
|
53
|
+
<th><%= sort_link(@search, :delivery_date, t(:delivery_date, scope: "activerecord.attributes.mechanize_store.order") ) %></th>
|
54
|
+
<th><%= sort_link(@search, :created_at, t(:created_at, scope: "activerecord.attributes.mechanize_store.order") ) %></th>
|
55
|
+
<th><%= t(:options, scope: "activerecord.attributes.order") %></th>
|
56
|
+
</tr>
|
57
|
+
</thead>
|
58
|
+
<tbody>
|
59
|
+
<% @orders.each do |order| %>
|
60
|
+
<tr>
|
61
|
+
<td><%= order.id %></td>
|
62
|
+
<td><%= order.order_status.name %></td>
|
63
|
+
<td>
|
64
|
+
<span class="label label-<%= order.payment.payment_status.id == PaymentStatus::ACCOMPLISHED ? 'success' : 'danger' %>">
|
65
|
+
<%= order.payment.payment_status.name %>
|
66
|
+
</span>
|
67
|
+
</td>
|
68
|
+
<td><%= l(order.generated_at) unless order.generated_at.nil? %></td>
|
69
|
+
<td><%= l(order.delivery_date) unless order.generated_at.nil? %></td>
|
70
|
+
<td><%= l(order.created_at) unless order.created_at.nil? %></td>
|
71
|
+
<td>
|
72
|
+
<%= link_to admin_order_path(order) do %>
|
73
|
+
<i class="fa fa-file"></i>
|
74
|
+
<% end %>
|
75
|
+
</td>
|
76
|
+
</tr>
|
77
|
+
<% end %>
|
78
|
+
</tbody>
|
79
|
+
</table>
|
80
|
+
|
81
|
+
<% content_for :footer do %>
|
82
|
+
<%= will_paginate @orders, class: "pagination pull-right" %>
|
83
|
+
<div class="clearfix"></div>
|
84
|
+
<% end %>
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%= title t(:editing, model: t("payment_status", scope: "activerecord.models")) %>
|
2
|
+
|
3
|
+
<% content_for :right do -%>
|
4
|
+
<li class="active">
|
5
|
+
<%= link_to t(:details), @payment_status %>
|
6
|
+
</li>
|
7
|
+
<li class="active">
|
8
|
+
<%= link_to t(:back), payment_statuses_path %>
|
9
|
+
</li>
|
10
|
+
<% end -%>
|
11
|
+
|
12
|
+
<%= render 'form' %>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<%= title t("payment_status", scope: "activerecord.models").pluralize %>
|
2
|
+
|
3
|
+
<% content_for :right do -%>
|
4
|
+
<li class="active">
|
5
|
+
<%= link_to t("new_payment_status"), new_payment_status_path %>
|
6
|
+
</li>
|
7
|
+
<% end -%>
|
8
|
+
|
9
|
+
<table class="table table-striped">
|
10
|
+
<thead>
|
11
|
+
<tr>
|
12
|
+
<th><%= sort_link @search, :id, t(:id, scope: "activerecord.attributes") %></th>
|
13
|
+
<th><%= sort_link @search, :name, t(:name, scope: "activerecord.attributes.payment_status") %></th>
|
14
|
+
<th colspan="3"></th>
|
15
|
+
</tr>
|
16
|
+
</thead>
|
17
|
+
|
18
|
+
<tbody>
|
19
|
+
|
20
|
+
<% @payment_statuses.each do |payment_status| %>
|
21
|
+
<tr>
|
22
|
+
<td><%= payment_status.id %></td>
|
23
|
+
<td><%= payment_status.name %></td>
|
24
|
+
<td>
|
25
|
+
<%= link_to payment_status do %>
|
26
|
+
<i class="fa fa-file"></i>
|
27
|
+
<% end -%>
|
28
|
+
</td>
|
29
|
+
<td>
|
30
|
+
<%= link_to edit_payment_status_path(payment_status) do %>
|
31
|
+
<i class="fa fa-edit"></i>
|
32
|
+
<% end -%>
|
33
|
+
</td>
|
34
|
+
<td>
|
35
|
+
<%= link_to payment_status, method: :delete, data: { confirm: t(:are_you_sure) } do %>
|
36
|
+
<i class="fa fa-trash"></i>
|
37
|
+
<% end -%>
|
38
|
+
</td>
|
39
|
+
</tr>
|
40
|
+
<% end %>
|
41
|
+
</tbody>
|
42
|
+
</table>
|
43
|
+
|
44
|
+
<br>
|
45
|
+
|
46
|
+
<%= will_paginate @payment_statuses %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= title t("payment_status") %>
|
2
|
+
|
3
|
+
<% content_for :right do -%>
|
4
|
+
<li class="active">
|
5
|
+
<%= link_to t(:edit), edit_payment_status_path(@payment_status) %>
|
6
|
+
</li>
|
7
|
+
<li class="active">
|
8
|
+
<%= link_to t(:back), payment_statuses_path %>
|
9
|
+
</li>
|
10
|
+
<% end -%>
|
11
|
+
|
12
|
+
<p>
|
13
|
+
<small><%= t(:name, scope: "activerecord.attributes.payment_status") %>:</small>
|
14
|
+
<h3><%= @payment_status.name %></h3>
|
15
|
+
</p>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%= title t(:editing, model: t("payment_type", scope: "activerecord.models")) %>
|
2
|
+
|
3
|
+
<% content_for :right do -%>
|
4
|
+
<li class="active">
|
5
|
+
<%= link_to t(:details), @payment_type %>
|
6
|
+
</li>
|
7
|
+
<li class="active">
|
8
|
+
<%= link_to t(:back), payment_types_path %>
|
9
|
+
</li>
|
10
|
+
<% end -%>
|
11
|
+
|
12
|
+
<%= render 'form' %>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<%= title t("payment_type", scope: "activerecord.models").pluralize %>
|
2
|
+
|
3
|
+
<% content_for :right do -%>
|
4
|
+
<li class="active">
|
5
|
+
<%= link_to t("new_payment_type"), new_payment_type_path %>
|
6
|
+
</li>
|
7
|
+
<% end -%>
|
8
|
+
|
9
|
+
<table class="table table-striped">
|
10
|
+
<thead>
|
11
|
+
<tr>
|
12
|
+
<th><%= sort_link @search, :id, t(:id, scope: "activerecord.attributes") %></th>
|
13
|
+
<th><%= sort_link @search, :name, t(:name, scope: "activerecord.attributes.payment_type") %></th>
|
14
|
+
<th colspan="3"></th>
|
15
|
+
</tr>
|
16
|
+
</thead>
|
17
|
+
|
18
|
+
<tbody>
|
19
|
+
|
20
|
+
<% @payment_types.each do |payment_type| %>
|
21
|
+
<tr>
|
22
|
+
<td><%= payment_type.id %></td>
|
23
|
+
<td><%= payment_type.name %></td>
|
24
|
+
<td>
|
25
|
+
<%= link_to payment_type do %>
|
26
|
+
<i class="fa fa-file"></i>
|
27
|
+
<% end -%>
|
28
|
+
</td>
|
29
|
+
<td>
|
30
|
+
<%= link_to edit_payment_type_path(payment_type) do %>
|
31
|
+
<i class="fa fa-edit"></i>
|
32
|
+
<% end -%>
|
33
|
+
</td>
|
34
|
+
<td>
|
35
|
+
<%= link_to payment_type, method: :delete, data: { confirm: t(:are_you_sure) } do %>
|
36
|
+
<i class="fa fa-trash"></i>
|
37
|
+
<% end -%>
|
38
|
+
</td>
|
39
|
+
</tr>
|
40
|
+
<% end %>
|
41
|
+
</tbody>
|
42
|
+
</table>
|
43
|
+
|
44
|
+
<br>
|
45
|
+
|
46
|
+
<%= will_paginate @payment_types %>
|