vyapari 0.1.4 → 0.1.5dev
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/vyapari/sample_stock_bundle.csv +1 -0
- data/app/controllers/vyapari/admin/base_controller.rb +10 -0
- data/app/controllers/vyapari/admin/brands_controller.rb +99 -0
- data/app/controllers/vyapari/admin/categories_controller.rb +115 -0
- data/app/controllers/vyapari/admin/countries_controller.rb +2 -2
- data/app/controllers/vyapari/admin/dashboard_controller.rb +3 -1
- data/app/controllers/vyapari/admin/exchange_rates_controller.rb +2 -2
- data/app/controllers/vyapari/admin/products_controller.rb +79 -0
- data/app/controllers/vyapari/admin/regions_controller.rb +1 -1
- data/app/controllers/vyapari/admin/resource_controller.rb +1 -0
- data/app/controllers/vyapari/admin/stores_controller.rb +67 -0
- data/app/controllers/vyapari/admin/suppliers_controller.rb +67 -0
- data/app/controllers/vyapari/admin/terminals_controller.rb +150 -0
- data/app/controllers/vyapari/application_controller.rb +12 -0
- data/app/controllers/vyapari/store_manager/base_controller.rb +28 -0
- data/app/controllers/vyapari/store_manager/dashboard_controller.rb +30 -0
- data/app/controllers/vyapari/store_manager/resource_controller.rb +17 -0
- data/app/controllers/vyapari/store_manager/stock_bundles_controller.rb +206 -0
- data/app/controllers/vyapari/store_manager/stock_entries_controller.rb +161 -0
- data/app/controllers/vyapari/terminal_staff/base_controller.rb +29 -0
- data/app/controllers/vyapari/terminal_staff/dashboard_controller.rb +29 -0
- data/app/controllers/vyapari/terminal_staff/invoices_controller.rb +138 -0
- data/app/controllers/vyapari/terminal_staff/line_items_controller.rb +123 -0
- data/app/controllers/vyapari/terminal_staff/resource_controller.rb +17 -0
- data/app/controllers/vyapari/user_dashboard_controller.rb +31 -0
- data/app/models/brand.rb +63 -10
- data/app/models/category.rb +60 -16
- data/app/models/country.rb +27 -5
- data/app/models/exchange_rate.rb +31 -6
- data/app/models/image/brand_image.rb +3 -0
- data/app/models/image/category_image.rb +3 -0
- data/app/models/image/product_image.rb +3 -0
- data/app/models/invoice.rb +223 -0
- data/app/models/line_item.rb +206 -0
- data/app/models/product.rb +67 -13
- data/app/models/region.rb +26 -3
- data/app/models/stock_bundle.rb +249 -0
- data/app/models/stock_entry.rb +271 -0
- data/app/models/store.rb +216 -0
- data/app/models/supplier.rb +85 -0
- data/app/models/terminal.rb +158 -0
- data/app/models/vyapari/application_record.rb +4 -0
- data/app/uploaders/brand_image_uploader.rb +14 -0
- data/app/uploaders/category_image_uploader.rb +14 -0
- data/app/uploaders/product_image_uploader.rb +14 -0
- data/app/uploaders/stock_bundle_uploader.rb +10 -0
- data/app/views/layouts/kuppayam/_footer.html.erb +1 -1
- data/app/views/layouts/kuppayam/_sidebar.html.erb +45 -44
- data/app/views/layouts/vyapari/_store_manager_menu.html.erb +107 -0
- data/app/views/layouts/vyapari/_terminal_staff_menu.html.erb +103 -0
- data/app/views/layouts/vyapari/store_manager.html.erb +112 -0
- data/app/views/layouts/vyapari/terminal_staff.html.erb +116 -0
- data/app/views/vyapari/admin/brands/_form.html.erb +23 -0
- data/app/views/vyapari/admin/brands/_index.html.erb +89 -0
- data/app/views/vyapari/admin/brands/_row.html.erb +63 -0
- data/app/views/vyapari/admin/brands/_show.html.erb +104 -0
- data/app/views/vyapari/admin/brands/index.html.erb +48 -0
- data/app/views/vyapari/admin/categories/_form.html.erb +28 -0
- data/app/views/vyapari/admin/categories/_index.html.erb +101 -0
- data/app/views/vyapari/admin/categories/_row.html.erb +69 -0
- data/app/views/vyapari/admin/categories/_show.html.erb +115 -0
- data/app/views/vyapari/admin/{users → categories}/index.html.erb +8 -24
- data/app/views/vyapari/admin/countries/_index.html.erb +1 -1
- data/app/views/vyapari/admin/countries/index.html.erb +19 -3
- data/app/views/vyapari/admin/exchange_rates/_form.html.erb +3 -4
- data/app/views/vyapari/admin/exchange_rates/_index.html.erb +7 -7
- data/app/views/vyapari/admin/exchange_rates/_row.html.erb +3 -3
- data/app/views/vyapari/admin/exchange_rates/_show.html.erb +1 -0
- data/app/views/vyapari/admin/exchange_rates/index.html.erb +19 -3
- data/app/views/vyapari/admin/products/_form.html.erb +32 -0
- data/app/views/vyapari/admin/products/_index.html.erb +58 -0
- data/app/views/vyapari/admin/products/_row.html.erb +30 -0
- data/app/views/vyapari/admin/products/_show.html.erb +81 -0
- data/app/views/vyapari/admin/products/index.html.erb +48 -0
- data/app/views/vyapari/admin/regions/_index.html.erb +1 -1
- data/app/views/vyapari/admin/regions/index.html.erb +19 -3
- data/app/views/vyapari/admin/stores/_form.html.erb +37 -0
- data/app/views/vyapari/admin/stores/_index.html.erb +84 -0
- data/app/views/vyapari/admin/stores/_row.html.erb +55 -0
- data/app/views/vyapari/admin/stores/_show.html.erb +110 -0
- data/app/views/vyapari/admin/stores/index.html.erb +48 -0
- data/app/views/vyapari/admin/suppliers/_form.html.erb +32 -0
- data/app/views/vyapari/admin/suppliers/_index.html.erb +58 -0
- data/app/views/vyapari/admin/suppliers/_row.html.erb +30 -0
- data/app/views/vyapari/admin/suppliers/_show.html.erb +81 -0
- data/app/views/vyapari/admin/suppliers/index.html.erb +48 -0
- data/app/views/vyapari/admin/terminals/_form.html.erb +24 -0
- data/app/views/vyapari/admin/terminals/_index.html.erb +75 -0
- data/app/views/vyapari/admin/terminals/_row.html.erb +49 -0
- data/app/views/vyapari/admin/terminals/_show.html.erb +74 -0
- data/app/views/vyapari/store_manager/dashboard/index.html.erb +93 -0
- data/app/views/vyapari/store_manager/stock_bundles/_form.html.erb +99 -0
- data/app/views/vyapari/store_manager/stock_bundles/_index.html.erb +74 -0
- data/app/views/vyapari/store_manager/stock_bundles/_row.html.erb +44 -0
- data/app/views/vyapari/store_manager/stock_bundles/_show.html.erb +110 -0
- data/app/views/vyapari/store_manager/stock_bundles/create.html.erb +57 -0
- data/app/views/vyapari/store_manager/stock_bundles/index.html.erb +36 -0
- data/app/views/vyapari/store_manager/stock_bundles/update.html.erb +57 -0
- data/app/views/vyapari/store_manager/stock_entries/_form.html.erb +50 -0
- data/app/views/vyapari/store_manager/stock_entries/_index.html.erb +80 -0
- data/app/views/vyapari/store_manager/stock_entries/_row.html.erb +33 -0
- data/app/views/vyapari/store_manager/stock_entries/_show.html.erb +110 -0
- data/app/views/vyapari/store_manager/stock_entries/_stock_bundle.html.erb +61 -0
- data/app/views/vyapari/store_manager/stock_entries/index.html.erb +45 -0
- data/app/views/vyapari/terminal_staff/dashboard/_counts.html.erb +88 -0
- data/app/views/vyapari/terminal_staff/dashboard/_invoices.html.erb +37 -0
- data/app/views/vyapari/terminal_staff/dashboard/index.html.erb +36 -0
- data/app/views/vyapari/terminal_staff/invoices/_draft.html.erb +62 -0
- data/app/views/vyapari/terminal_staff/invoices/_form.html.erb +120 -0
- data/app/views/vyapari/terminal_staff/invoices/_index.html.erb +64 -0
- data/app/views/vyapari/terminal_staff/invoices/_row.html.erb +33 -0
- data/app/views/vyapari/terminal_staff/invoices/_show.html.erb +171 -0
- data/app/views/vyapari/terminal_staff/invoices/index.html.erb +37 -0
- data/app/views/vyapari/terminal_staff/invoices/new.js.erb +13 -0
- data/app/views/vyapari/terminal_staff/invoices/show.html.erb +1 -0
- data/app/views/vyapari/terminal_staff/line_items/_form.html.erb +40 -0
- data/app/views/vyapari/terminal_staff/line_items/_index.html.erb +94 -0
- data/app/views/vyapari/terminal_staff/line_items/create.js.erb +34 -0
- data/app/views/vyapari/terminal_staff/line_items/destroy.js.erb +25 -0
- data/app/views/vyapari/terminal_staff/stores/index.html.erb +24 -0
- data/app/views/vyapari/user_dashboard/index.html.erb +51 -0
- data/config/routes.rb +62 -5
- data/db/import_data/brands.csv +7 -0
- data/db/import_data/categories.csv +12 -0
- data/db/import_data/countries.csv +1 -0
- data/db/import_data/dummy/brands.csv +7 -0
- data/db/import_data/dummy/categories.csv +12 -0
- data/db/import_data/dummy/countries.csv +1 -0
- data/db/import_data/dummy/exchange_rates.csv +5 -0
- data/db/import_data/dummy/products-copy.csv +1 -0
- data/db/import_data/dummy/products.csv +1 -0
- data/db/import_data/dummy/products.xlsx +0 -0
- data/db/import_data/dummy/regions.csv +13 -0
- data/db/import_data/dummy/stores.csv +10 -0
- data/db/import_data/dummy/suppliers.csv +14 -0
- data/db/import_data/dummy/terminals.csv +11 -0
- data/db/import_data/exchange_rates.csv +5 -0
- data/db/import_data/regions.csv +13 -0
- data/db/import_data/stores.csv +3 -0
- data/db/import_data/suppliers.csv +14 -0
- data/db/import_data/terminals.csv +3 -0
- data/db/migrate/20170000000200_create_exchange_rates.rb +3 -2
- data/db/migrate/20170000000203_create_contacts.rb +22 -0
- data/db/migrate/20170000000204_create_bank_accounts.rb +21 -0
- data/db/migrate/20170000000205_create_suppliers.rb +18 -0
- data/db/migrate/20170000000206_create_stores.rb +21 -0
- data/db/migrate/20170000000207_create_terminals.rb +18 -0
- data/db/migrate/20170000000210_create_brands.rb +14 -0
- data/db/migrate/20170000000211_create_categories.rb +22 -0
- data/db/migrate/20170000000212_create_products.rb +29 -0
- data/db/migrate/20170000000213_create_invoices.rb +58 -0
- data/db/migrate/20170000000215_create_stock_bundles.rb +17 -0
- data/db/migrate/20170000000216_create_stock_entries.rb +20 -0
- data/db/sample_reports/products.xlsx +0 -0
- data/lib/tasks/vyapari/all.rake +73 -0
- data/lib/vyapari/version.rb +1 -1
- metadata +150 -15
- data/app/controllers/vyapari/admin/users_controller.rb +0 -130
- data/app/views/vyapari/admin/users/_form.html.erb +0 -39
- data/app/views/vyapari/admin/users/_index.html.erb +0 -101
- data/app/views/vyapari/admin/users/_row.html.erb +0 -72
- data/app/views/vyapari/admin/users/_show.html.erb +0 -199
- data/lib/tasks/vyapari_tasks.rake +0 -4
@@ -0,0 +1,104 @@
|
|
1
|
+
<div id="div_brand_show">
|
2
|
+
<% status_hash = {published: "success", unpublished: "default", removed: "danger"} %>
|
3
|
+
|
4
|
+
<div class="row">
|
5
|
+
|
6
|
+
<div class="col-md-7 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
|
7
|
+
|
8
|
+
<%= edit_image(@brand,
|
9
|
+
"brand_image.image.large.url",
|
10
|
+
upload_image_link(@brand, :brand_image, nil ),
|
11
|
+
remove_image_link(@brand, :brand_image, nil ),
|
12
|
+
image_options: {assoc_name: :brand_image }) %>
|
13
|
+
|
14
|
+
<div class="visible-sm visible-xs mt-50"></div>
|
15
|
+
|
16
|
+
<%= clear_tag(10) %>
|
17
|
+
|
18
|
+
<%= theme_panel_heading(@brand.name) %>
|
19
|
+
|
20
|
+
<%= clear_tag(10) %>
|
21
|
+
|
22
|
+
<span class="ml-5 mt-5 label label-<%= status_hash[@brand.status.to_sym] %>"><%= @brand.status.titleize %></span>
|
23
|
+
|
24
|
+
<% if @brand.featured? %>
|
25
|
+
<span class="mr-10 mt-5 label label-info">Featured</span>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<%= clear_tag(10) %>
|
29
|
+
|
30
|
+
<div class="visible-sm visible-xs mb-50"></div>
|
31
|
+
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<div class="col-md-5 col-sm-12 col-xs-12">
|
35
|
+
|
36
|
+
<% edit_link = edit_admin_brand_path(id: @brand.id) %>
|
37
|
+
<% delete_link = admin_brand_path(id: @brand.id) %>
|
38
|
+
|
39
|
+
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit User"), edit_link, :remote=>true, class: "btn btn-block btn-success" if @brand.can_be_edited? %>
|
40
|
+
|
41
|
+
<%= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, role: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "btn btn-block btn-danger btn-only-hover" if @brand.can_be_deleted? && (@current_brand != @brand) %>
|
42
|
+
|
43
|
+
<!-- Publish -->
|
44
|
+
<%= link_to raw("<i class=\"fa fa-circle-o mr-5\"></i> Publish"), update_status_admin_brand_path(:id =>@brand.id, :status =>'published'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-success btn-only-hover" if @brand.can_be_published? %>
|
45
|
+
|
46
|
+
<!-- Unpublish -->
|
47
|
+
<%= link_to raw("<i class=\"fa fa-circle mr-5\"></i> Un-Publish"), update_status_admin_brand_path(:id =>@brand.id, :status =>'unpublished'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-gray btn-only-hover" if @brand.can_be_unpublished? %>
|
48
|
+
|
49
|
+
<!-- Remove -->
|
50
|
+
<%= link_to raw("<i class=\"fa fa-edit mr-5\"></i> Remove"), update_status_admin_brand_path(:id =>@brand.id, :status =>'removed'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-danger btn-only-hover" if @brand.can_be_removed? %>
|
51
|
+
|
52
|
+
<!-- Feature -->
|
53
|
+
<%= link_to raw("<i class=\"fa fa-edit mr-5\"></i> Mark as Feature"), mark_as_featured_admin_brand_path(:id =>@brand.id), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-danger btn-only-hover" unless @brand.featured? %>
|
54
|
+
|
55
|
+
<!-- Remove from Featuring -->
|
56
|
+
<%= link_to raw("<i class=\"fa fa-edit mr-5\"></i> Remove from Featuring"), remove_from_featured_admin_brand_path(:id =>@brand.id), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-danger btn-only-hover" if @brand.featured? %>
|
57
|
+
|
58
|
+
<div class="visible-sm visible-xs mb-50"></div>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<%= clear_tag(50) %>
|
65
|
+
|
66
|
+
<ul class="nav nav-pills">
|
67
|
+
<li class="active">
|
68
|
+
<a href="#technical_details" data-toggle="tab" aria-expanded="false">
|
69
|
+
<span class="visible-xs"><i class="fa-database"></i></span>
|
70
|
+
<span class="hidden-xs">Technical Details</span>
|
71
|
+
</a>
|
72
|
+
</li>
|
73
|
+
</ul>
|
74
|
+
|
75
|
+
<div class="tab-content">
|
76
|
+
<div class="tab-pane active" id="technical_details">
|
77
|
+
|
78
|
+
<%= clear_tag(20) %>
|
79
|
+
|
80
|
+
<div class="table-responsive">
|
81
|
+
<table class="table table-striped table-condensed table-bordered mb-30">
|
82
|
+
<tbody>
|
83
|
+
|
84
|
+
<tr>
|
85
|
+
<th>ID</th><td colspan="3"><%= @brand.id %></td>
|
86
|
+
</tr>
|
87
|
+
|
88
|
+
<tr>
|
89
|
+
<th>Created At</th><td><%= @brand.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @brand.created_at %></td>
|
90
|
+
<th>Updated At</th><td><%= @brand.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @brand.updated_at %></td>
|
91
|
+
</tr>
|
92
|
+
|
93
|
+
</tbody>
|
94
|
+
</table>
|
95
|
+
|
96
|
+
</div>
|
97
|
+
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
|
101
|
+
<%= link_to "Close", "#", onclick: "closeGenericModal();", class: "btn btn-primary pull-right" %>
|
102
|
+
|
103
|
+
<%= clear_tag %>
|
104
|
+
</div>
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<div class="row">
|
2
|
+
|
3
|
+
<div class="col-md-12">
|
4
|
+
|
5
|
+
<ul class="nav nav-tabs">
|
6
|
+
</ul>
|
7
|
+
<div class="tab-content">
|
8
|
+
<div class="tab-pane active">
|
9
|
+
|
10
|
+
<div id="div_brand_action_buttons">
|
11
|
+
<div class="row">
|
12
|
+
<div class="col-md-6">
|
13
|
+
|
14
|
+
<%= theme_button('Add a Brand', 'plus', new_admin_brand_path(), classes: "pull-left", btn_type: "success") %>
|
15
|
+
|
16
|
+
<%= theme_button('Refresh', 'refresh', admin_brands_path(), classes: "pull-left ml-10", btn_type: "white") %>
|
17
|
+
|
18
|
+
<!-- Single button -->
|
19
|
+
<div class="ml-10 btn-group hidden">
|
20
|
+
<button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
21
|
+
More Actions <span class="caret"></span>
|
22
|
+
</button>
|
23
|
+
<ul class="dropdown-menu">
|
24
|
+
<li><a href="#">Import Users</a></li>
|
25
|
+
<li><a href="#">Import History</a></li>
|
26
|
+
<li role="separator" class="divider"></li>
|
27
|
+
<li><a href="#">Export Users</a></li>
|
28
|
+
</ul>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
<div class="col-md-6">
|
32
|
+
<%= search_form_kuppayam(Brand, admin_brands_path, text: @filters[:query]) %>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
<%= clear_tag(10) %>
|
37
|
+
|
38
|
+
<div id="div_brand_index">
|
39
|
+
<%= render :partial=>"vyapari/admin/brands/index" %>
|
40
|
+
</div>
|
41
|
+
<%= clear_tag(10) %>
|
42
|
+
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
</div>
|
47
|
+
|
48
|
+
</div>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<%= form_for([:admin, @category], :html => {:id=>"form_category", :class=>"mb-0 form-horizontal", :category => "form", :method => (@category.new_record? ? :post : :put), :remote=>true}) do |f| %>
|
2
|
+
|
3
|
+
<div id="category_form_error">
|
4
|
+
<%= @category.errors[:base].to_sentence %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="form-inputs mb-30 mt-30">
|
8
|
+
<%= theme_form_field(@category, :name) %>
|
9
|
+
<%= theme_form_field(@category, :one_liner) %>
|
10
|
+
<%= theme_form_field(@category, :priority) %>
|
11
|
+
|
12
|
+
<% options = {assoc_collection: Category.where("id != ?", @category.id).select("id, name").order("name ASC").all, required: true, editable: true, assoc_display_method: :name} %>
|
13
|
+
<%= theme_form_assoc_group(@category, :parent_id, **options) %>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<div>
|
17
|
+
|
18
|
+
<%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
|
19
|
+
|
20
|
+
<%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeGenericModal();", class: "pull-right ml-10 btn btn-white" %>
|
21
|
+
|
22
|
+
</div>
|
23
|
+
<%= clear_tag(10) %>
|
24
|
+
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<% end %>
|
28
|
+
|
@@ -0,0 +1,101 @@
|
|
1
|
+
<div class="table-responsive">
|
2
|
+
<table class="table table-hover members-table middle-align">
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<th style="text-align: center;width:60px">#</th>
|
6
|
+
<th>Name</th>
|
7
|
+
<th>Parent Category</th>
|
8
|
+
<th>Top Category</th>
|
9
|
+
<th>Priority</th>
|
10
|
+
<th>Featured</th>
|
11
|
+
<th>Status</th>
|
12
|
+
<th style="text-align: center;" colspan="3">Actions</th>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
|
16
|
+
<tbody>
|
17
|
+
<% @categories.each_with_index do |category, i| %>
|
18
|
+
|
19
|
+
<% edit_link = edit_admin_category_path(id: category.id) %>
|
20
|
+
<% delete_link = admin_category_path(id: category.id) %>
|
21
|
+
|
22
|
+
<tr id="tr_category_<%= category.id %>">
|
23
|
+
|
24
|
+
<th scope="row" style="text-align: center;">
|
25
|
+
<% if i < 0 %>
|
26
|
+
<i class="fa fa-check text-success"></i>
|
27
|
+
<% else %>
|
28
|
+
<%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
|
29
|
+
<% end %>
|
30
|
+
</th>
|
31
|
+
|
32
|
+
<td class="category-name"><%= link_to category.name, admin_category_path(category), remote: true %></td>
|
33
|
+
|
34
|
+
<td class="category-name"><%= link_to category.parent.name, admin_category_path(category), remote: true if category.parent %></td>
|
35
|
+
|
36
|
+
<td class="category-name"><%= link_to category.top_parent.name, admin_category_path(category), remote: true if category.top_parent %></td>
|
37
|
+
|
38
|
+
<td class="category-name"><%= category.priority%></td>
|
39
|
+
|
40
|
+
<td class="hidden-xs hidden-sm">
|
41
|
+
<% if category.featured? %>
|
42
|
+
<span class="mr-10 mt-5 label label-warning">Featured</span>
|
43
|
+
<% end %>
|
44
|
+
</td>
|
45
|
+
|
46
|
+
<td>
|
47
|
+
<% if category.unpublished? %>
|
48
|
+
<span class="ml-5 mt-5 label label-default">Un-Published</span>
|
49
|
+
<% elsif category.published? %>
|
50
|
+
<span class="ml-5 mt-5 label label-success">Published</span>
|
51
|
+
<% elsif category.removed? %>
|
52
|
+
<span class="ml-5 mt-5 label label-danger">Removed</span>
|
53
|
+
<% end %>
|
54
|
+
</td>
|
55
|
+
|
56
|
+
<td class="action-links" style="width:10%">
|
57
|
+
|
58
|
+
<!-- Mark as Featured -->
|
59
|
+
<%= link_to raw("<i class=\"fa fa-circle-o mr-5\"></i> Mark as Featured"), mark_as_featured_admin_category_path(:id =>category.id, :status =>'published'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"edit" unless category.featured? %>
|
60
|
+
|
61
|
+
<!-- Remove from Featured -->
|
62
|
+
<%= link_to raw("<i class=\"fa fa-circle mr-5\"></i> Remove from Featured"), remove_from_featured_admin_category_path(:id =>category.id, :status =>'unpublished'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"" if category.featured? %>
|
63
|
+
|
64
|
+
<!-- Make Parent -->
|
65
|
+
<%= link_to raw("<i class=\"fa fa-circle mr-5\"></i> Make Parent"), make_parent_admin_category_path(:id =>category.id, :status =>'unpublished'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"" unless category.parent.blank? %>
|
66
|
+
|
67
|
+
</td>
|
68
|
+
|
69
|
+
<td class="action-links" style="width:10%">
|
70
|
+
|
71
|
+
<!-- Publish -->
|
72
|
+
<%= link_to raw("<i class=\"fa fa-circle-o mr-5\"></i> Publish"), update_status_admin_category_path(:id =>category.id, :status =>'published'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"edit" if category.can_be_published? %>
|
73
|
+
|
74
|
+
<!-- Un-Publish -->
|
75
|
+
<%= link_to raw("<i class=\"fa fa-circle mr-5\"></i> Un-Publish"), update_status_admin_category_path(:id =>category.id, :status =>'unpublished'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"" if category.can_be_unpublished? %>
|
76
|
+
|
77
|
+
<!-- Remove -->
|
78
|
+
<%= link_to raw("<i class=\"fa fa-edit mr-5\"></i> Remove"), update_status_admin_category_path(:id =>category.id, :status =>'removed'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"delete" if category.can_be_removed? %>
|
79
|
+
|
80
|
+
</td>
|
81
|
+
|
82
|
+
<td class="action-links" style="width:10%">
|
83
|
+
|
84
|
+
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit Brand"), edit_link, :remote=>true, class: "edit" if category.can_be_edited? %>
|
85
|
+
|
86
|
+
<%= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, category: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" if category.can_be_deleted? %>
|
87
|
+
|
88
|
+
</td>
|
89
|
+
|
90
|
+
</tr>
|
91
|
+
<% end %>
|
92
|
+
</tbody>
|
93
|
+
</table>
|
94
|
+
</div>
|
95
|
+
|
96
|
+
<div class="row">
|
97
|
+
<div class="col-sm-12">
|
98
|
+
<%= paginate_kuppayam(@categories) %>
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
|
@@ -0,0 +1,69 @@
|
|
1
|
+
<% edit_link = edit_admin_category_path(id: category.id) %>
|
2
|
+
<% delete_link = admin_category_path(id: category.id) %>
|
3
|
+
|
4
|
+
<tr id="tr_category_<%= category.id %>">
|
5
|
+
|
6
|
+
<th scope="row" style="text-align: center;">
|
7
|
+
<% if i < 0 %>
|
8
|
+
<i class="fa fa-check text-success"></i>
|
9
|
+
<% else %>
|
10
|
+
<%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
|
11
|
+
<% end %>
|
12
|
+
</th>
|
13
|
+
|
14
|
+
<td class="category-name"><%= link_to category.name, admin_category_path(category), remote: true %></td>
|
15
|
+
|
16
|
+
<td class="category-name"><%= link_to category.parent.name, admin_category_path(category), remote: true if category.parent %></td>
|
17
|
+
|
18
|
+
<td class="category-name"><%= link_to category.top_parent.name, admin_category_path(category), remote: true if category.top_parent %></td>
|
19
|
+
|
20
|
+
<td class="category-name"><%= category.priority%></td>
|
21
|
+
|
22
|
+
<td class="hidden-xs hidden-sm">
|
23
|
+
<% if category.featured? %>
|
24
|
+
<span class="mr-10 mt-5 label label-warning">Featured</span>
|
25
|
+
<% end %>
|
26
|
+
</td>
|
27
|
+
|
28
|
+
<td>
|
29
|
+
<% if category.unpublished? %>
|
30
|
+
<span class="ml-5 mt-5 label label-default">Un-Published</span>
|
31
|
+
<% elsif category.published? %>
|
32
|
+
<span class="ml-5 mt-5 label label-success">Published</span>
|
33
|
+
<% elsif category.removed? %>
|
34
|
+
<span class="ml-5 mt-5 label label-danger">Removed</span>
|
35
|
+
<% end %>
|
36
|
+
</td>
|
37
|
+
|
38
|
+
<td class="action-links" style="width:10%">
|
39
|
+
|
40
|
+
<!-- Mark as Featured -->
|
41
|
+
<%= link_to raw("<i class=\"fa fa-circle-o mr-5\"></i> Mark as Featured"), mark_as_featured_admin_category_path(:id =>category.id, :status =>'published'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"edit" unless category.featured? %>
|
42
|
+
|
43
|
+
<!-- Remove from Featured -->
|
44
|
+
<%= link_to raw("<i class=\"fa fa-circle mr-5\"></i> Remove from Featured"), remove_from_featured_admin_category_path(:id =>category.id, :status =>'unpublished'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"" if category.featured? %>
|
45
|
+
|
46
|
+
</td>
|
47
|
+
|
48
|
+
<td class="action-links" style="width:10%">
|
49
|
+
|
50
|
+
<!-- Publish -->
|
51
|
+
<%= link_to raw("<i class=\"fa fa-circle-o mr-5\"></i> Publish"), update_status_admin_category_path(:id =>category.id, :status =>'published'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"edit" if category.can_be_published? %>
|
52
|
+
|
53
|
+
<!-- Un-Publish -->
|
54
|
+
<%= link_to raw("<i class=\"fa fa-circle mr-5\"></i> Un-Publish"), update_status_admin_category_path(:id =>category.id, :status =>'unpublished'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"" if category.can_be_unpublished? %>
|
55
|
+
|
56
|
+
<!-- Remove -->
|
57
|
+
<%= link_to raw("<i class=\"fa fa-edit mr-5\"></i> Remove"), update_status_admin_category_path(:id =>category.id, :status =>'removed'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"delete" if category.can_be_removed? %>
|
58
|
+
|
59
|
+
</td>
|
60
|
+
|
61
|
+
<td class="action-links" style="width:10%">
|
62
|
+
|
63
|
+
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit Brand"), edit_link, :remote=>true, class: "edit" if category.can_be_edited? %>
|
64
|
+
|
65
|
+
<%= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, category: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" if category.can_be_deleted? %>
|
66
|
+
|
67
|
+
</td>
|
68
|
+
|
69
|
+
</tr>
|
@@ -0,0 +1,115 @@
|
|
1
|
+
<div id="div_category_show">
|
2
|
+
<% status_hash = {published: "success", unpublished: "default", removed: "danger"} %>
|
3
|
+
|
4
|
+
<div class="row">
|
5
|
+
|
6
|
+
<div class="col-md-7 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
|
7
|
+
|
8
|
+
<%= edit_image(@category,
|
9
|
+
"category_image.image.large.url",
|
10
|
+
upload_image_link(@category, :category_image, nil ),
|
11
|
+
remove_image_link(@category, :category_image, nil ),
|
12
|
+
image_options: {assoc_name: :category_image }) %>
|
13
|
+
|
14
|
+
<div class="visible-sm visible-xs mt-50"></div>
|
15
|
+
|
16
|
+
<%= clear_tag(10) %>
|
17
|
+
|
18
|
+
<%= theme_panel_heading(@category.name) %>
|
19
|
+
<%= theme_panel_sub_heading(@category.parent.name, "#") if @category.parent %>
|
20
|
+
<%= theme_panel_sub_heading(@category.top_parent.name, "#") if @category.top_parent %>
|
21
|
+
|
22
|
+
<%= clear_tag(10) %>
|
23
|
+
|
24
|
+
<span class="ml-5 mt-5 label label-<%= status_hash[@category.status.to_sym] %>"><%= @category.status.titleize %></span>
|
25
|
+
|
26
|
+
<% if @category.featured? %>
|
27
|
+
<span class="mr-10 mt-5 label label-info">Featured</span>
|
28
|
+
<% end %>
|
29
|
+
|
30
|
+
<%= clear_tag(10) %>
|
31
|
+
|
32
|
+
<div class="mt-20" style="max-width: 100%;overflow: auto;max-height: 500px;">
|
33
|
+
<%= raw(@category.one_liner) %>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<%= clear_tag(10) %>
|
37
|
+
|
38
|
+
<div class="visible-sm visible-xs mb-50"></div>
|
39
|
+
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<div class="col-md-5 col-sm-12 col-xs-12">
|
43
|
+
|
44
|
+
<% edit_link = edit_admin_category_path(id: @category.id) %>
|
45
|
+
<% delete_link = admin_category_path(id: @category.id) %>
|
46
|
+
|
47
|
+
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit User"), edit_link, :remote=>true, class: "btn btn-block btn-success" if @category.can_be_edited? %>
|
48
|
+
|
49
|
+
<%= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, role: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "btn btn-block btn-danger btn-only-hover" if @category.can_be_deleted? && (@current_category != @category) %>
|
50
|
+
|
51
|
+
<!-- Publish -->
|
52
|
+
<%= link_to raw("<i class=\"fa fa-circle-o mr-5\"></i> Publish"), update_status_admin_category_path(:id =>@category.id, :status =>'published'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-success btn-only-hover" if @category.can_be_published? %>
|
53
|
+
|
54
|
+
<!-- Unpublish -->
|
55
|
+
<%= link_to raw("<i class=\"fa fa-circle mr-5\"></i> Un-Publish"), update_status_admin_category_path(:id =>@category.id, :status =>'unpublished'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-gray btn-only-hover" if @category.can_be_unpublished? %>
|
56
|
+
|
57
|
+
<!-- Remove -->
|
58
|
+
<%= link_to raw("<i class=\"fa fa-edit mr-5\"></i> Remove"), update_status_admin_category_path(:id =>@category.id, :status =>'removed'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-danger btn-only-hover" if @category.can_be_removed? %>
|
59
|
+
|
60
|
+
<!-- Feature -->
|
61
|
+
<%= link_to raw("<i class=\"fa fa-edit mr-5\"></i> Mark as Feature"), mark_as_featured_admin_category_path(:id =>@category.id), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-danger btn-only-hover" unless @category.featured? %>
|
62
|
+
|
63
|
+
<!-- Remove from Featuring -->
|
64
|
+
<%= link_to raw("<i class=\"fa fa-edit mr-5\"></i> Remove from Featuring"), remove_from_featured_admin_category_path(:id =>@category.id), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-danger btn-only-hover" if @category.featured? %>
|
65
|
+
|
66
|
+
<!-- Make Parent -->
|
67
|
+
<%= link_to raw("<i class=\"fa fa-edit mr-5\"></i> Make Parent"), make_parent_admin_category_path(:id =>@category.id), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-success btn-only-hover" unless @category.parent.blank? %>
|
68
|
+
|
69
|
+
<div class="visible-sm visible-xs mb-50"></div>
|
70
|
+
|
71
|
+
</div>
|
72
|
+
|
73
|
+
</div>
|
74
|
+
|
75
|
+
<%= clear_tag(50) %>
|
76
|
+
|
77
|
+
<ul class="nav nav-pills">
|
78
|
+
<li class="active">
|
79
|
+
<a href="#technical_details" data-toggle="tab" aria-expanded="false">
|
80
|
+
<span class="visible-xs"><i class="fa-database"></i></span>
|
81
|
+
<span class="hidden-xs">Technical Details</span>
|
82
|
+
</a>
|
83
|
+
</li>
|
84
|
+
</ul>
|
85
|
+
|
86
|
+
<div class="tab-content">
|
87
|
+
<div class="tab-pane active" id="technical_details">
|
88
|
+
|
89
|
+
<%= clear_tag(20) %>
|
90
|
+
|
91
|
+
<div class="table-responsive">
|
92
|
+
<table class="table table-striped table-condensed table-bordered mb-30">
|
93
|
+
<tbody>
|
94
|
+
|
95
|
+
<tr>
|
96
|
+
<th>ID</th><td colspan="3"><%= @category.id %></td>
|
97
|
+
</tr>
|
98
|
+
|
99
|
+
<tr>
|
100
|
+
<th>Created At</th><td><%= @category.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @category.created_at %></td>
|
101
|
+
<th>Updated At</th><td><%= @category.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @category.updated_at %></td>
|
102
|
+
</tr>
|
103
|
+
|
104
|
+
</tbody>
|
105
|
+
</table>
|
106
|
+
|
107
|
+
</div>
|
108
|
+
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
|
112
|
+
<%= link_to "Close", "#", onclick: "closeGenericModal();", class: "btn btn-primary pull-right" %>
|
113
|
+
|
114
|
+
<%= clear_tag %>
|
115
|
+
</div>
|
@@ -1,37 +1,22 @@
|
|
1
1
|
<div class="row">
|
2
2
|
|
3
3
|
<div class="col-md-12">
|
4
|
+
|
4
5
|
<ul class="nav nav-tabs">
|
5
|
-
|
6
|
-
<%# Show Admin tab only for admins %>
|
7
|
-
<% if @current_user.is_super_admin? %>
|
8
|
-
<li class="<%= @super_admin == false ? 'active' : '' %>">
|
9
|
-
<%= link_to "Users", admin_users_path(sa: '0') %>
|
10
|
-
</li>
|
11
|
-
<li class="<%= @super_admin == true ? 'active' : '' %>">
|
12
|
-
<%= link_to "Administrators", admin_users_path(sa: '1') %>
|
13
|
-
</li>
|
14
|
-
<% else %>
|
15
|
-
<li class="active">
|
16
|
-
<%= link_to "Users", admin_users_path(sa: '0') %>
|
17
|
-
</li>
|
18
|
-
<% end %>
|
19
|
-
|
20
6
|
</ul>
|
21
|
-
|
22
7
|
<div class="tab-content">
|
23
8
|
<div class="tab-pane active">
|
24
9
|
|
25
|
-
<div id="
|
10
|
+
<div id="div_category_action_buttons">
|
26
11
|
<div class="row">
|
27
12
|
<div class="col-md-6">
|
28
13
|
|
29
|
-
<%= theme_button('Add a
|
14
|
+
<%= theme_button('Add a Category', 'plus', new_admin_category_path(), classes: "pull-left", btn_type: "success") %>
|
30
15
|
|
31
|
-
<%= theme_button('Refresh', 'refresh',
|
16
|
+
<%= theme_button('Refresh', 'refresh', admin_categories_path(), classes: "pull-left ml-10", btn_type: "white") %>
|
32
17
|
|
33
18
|
<!-- Single button -->
|
34
|
-
<div class="ml-10 btn-group">
|
19
|
+
<div class="ml-10 btn-group hidden">
|
35
20
|
<button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
36
21
|
More Actions <span class="caret"></span>
|
37
22
|
</button>
|
@@ -42,17 +27,16 @@
|
|
42
27
|
<li><a href="#">Export Users</a></li>
|
43
28
|
</ul>
|
44
29
|
</div>
|
45
|
-
|
46
30
|
</div>
|
47
31
|
<div class="col-md-6">
|
48
|
-
<%= search_form_kuppayam(
|
32
|
+
<%= search_form_kuppayam(Category, admin_categories_path, text: @filters[:query]) %>
|
49
33
|
</div>
|
50
34
|
</div>
|
51
35
|
</div>
|
52
36
|
<%= clear_tag(10) %>
|
53
37
|
|
54
|
-
<div id="
|
55
|
-
<%= render :partial=>"
|
38
|
+
<div id="div_category_index">
|
39
|
+
<%= render :partial=>"vyapari/admin/categories/index" %>
|
56
40
|
</div>
|
57
41
|
<%= clear_tag(10) %>
|
58
42
|
|
@@ -9,10 +9,26 @@
|
|
9
9
|
|
10
10
|
<div id="div_country_action_buttons">
|
11
11
|
<div class="row">
|
12
|
-
<div class="col-md-
|
13
|
-
|
12
|
+
<div class="col-md-6">
|
13
|
+
|
14
|
+
<%= theme_button('Add a Country', 'plus', new_admin_country_path(), classes: "pull-left", btn_type: "success") %>
|
15
|
+
|
16
|
+
<%= theme_button('Refresh', 'refresh', admin_countries_path(), classes: "pull-left ml-10", btn_type: "white") %>
|
17
|
+
|
18
|
+
<!-- Single button -->
|
19
|
+
<div class="ml-10 btn-group hidden">
|
20
|
+
<button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
21
|
+
More Actions <span class="caret"></span>
|
22
|
+
</button>
|
23
|
+
<ul class="dropdown-menu">
|
24
|
+
<li><a href="#">Import Users</a></li>
|
25
|
+
<li><a href="#">Import History</a></li>
|
26
|
+
<li role="separator" class="divider"></li>
|
27
|
+
<li><a href="#">Export Users</a></li>
|
28
|
+
</ul>
|
29
|
+
</div>
|
14
30
|
</div>
|
15
|
-
<div class="col-md-
|
31
|
+
<div class="col-md-6">
|
16
32
|
<%= search_form_kuppayam(Country, admin_countries_path, text: @filters[:query]) %>
|
17
33
|
</div>
|
18
34
|
</div>
|
@@ -5,12 +5,11 @@
|
|
5
5
|
</div>
|
6
6
|
|
7
7
|
<div class="form-inputs mb-30 mt-30">
|
8
|
-
<%= theme_form_field(@exchange_rate, :
|
8
|
+
<%= theme_form_field(@exchange_rate, :base_currency) %>
|
9
|
+
<%= theme_form_field(@exchange_rate, :counter_currency) %>
|
9
10
|
<%= theme_form_field(@exchange_rate, :value) %>
|
10
11
|
<%= theme_form_field(@exchange_rate, :effective_date, html_options: {type: :date}) %>
|
11
|
-
|
12
|
-
<% options = {assoc_collection: Country.select("id, name").order("name ASC").all, required: true, editable: true, assoc_display_method: :name} %>
|
13
|
-
<%= theme_form_assoc_group(@exchange_rate, :country_id, **options) %>
|
12
|
+
|
14
13
|
</div>
|
15
14
|
|
16
15
|
<div>
|
@@ -2,9 +2,9 @@
|
|
2
2
|
<table class="table table-hover members-table middle-align">
|
3
3
|
<thead>
|
4
4
|
<tr>
|
5
|
-
<th style="text-align: center;width:
|
6
|
-
<th>Currency
|
7
|
-
<th>
|
5
|
+
<th style="text-align: center;width:60px">#</th>
|
6
|
+
<th>Base Currency</th>
|
7
|
+
<th>Counter Currency</th>
|
8
8
|
<th style="width:10%">Value</th>
|
9
9
|
<th style="width:20%">Effective Date</th>
|
10
10
|
<th style="text-align: center;">Actions</th>
|
@@ -27,17 +27,17 @@
|
|
27
27
|
<% end %>
|
28
28
|
</th>
|
29
29
|
|
30
|
-
<td class="exchange_rate-name"><%= link_to exchange_rate.
|
30
|
+
<td class="exchange_rate-name"><%= link_to exchange_rate.base_currency, admin_exchange_rate_path(exchange_rate), remote: true %></td>
|
31
31
|
|
32
|
-
<td
|
32
|
+
<td class="exchange_rate-name"><%= link_to exchange_rate.counter_currency, admin_exchange_rate_path(exchange_rate), remote: true %></td>
|
33
33
|
|
34
|
-
|
34
|
+
<td><%= number_with_precision(exchange_rate.value, :precision => 2) %></td>
|
35
35
|
|
36
36
|
<td><%= exchange_rate.effective_date.strftime("%m/%d/%Y") %></td>
|
37
37
|
|
38
38
|
<td class="action-links" style="width:10%">
|
39
39
|
|
40
|
-
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit
|
40
|
+
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit"), edit_link, :remote=>true, class: "edit" %>
|
41
41
|
|
42
42
|
<%= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, exchange_rate: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" %>
|
43
43
|
|
@@ -11,9 +11,9 @@
|
|
11
11
|
<% end %>
|
12
12
|
</th>
|
13
13
|
|
14
|
-
<td class="exchange_rate-name"><%= link_to exchange_rate.
|
14
|
+
<td class="exchange_rate-name"><%= link_to exchange_rate.base_currency, admin_exchange_rate_path(exchange_rate), remote: true %></td>
|
15
15
|
|
16
|
-
<td
|
16
|
+
<td class="exchange_rate-name"><%= link_to exchange_rate.counter_currency, admin_exchange_rate_path(exchange_rate), remote: true %></td>
|
17
17
|
|
18
18
|
<td><%= number_with_precision(exchange_rate.value, :precision => 2) %></td>
|
19
19
|
|
@@ -21,7 +21,7 @@
|
|
21
21
|
|
22
22
|
<td class="action-links" style="width:10%">
|
23
23
|
|
24
|
-
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit
|
24
|
+
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit"), edit_link, :remote=>true, class: "edit" %>
|
25
25
|
|
26
26
|
<%= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, exchange_rate: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" %>
|
27
27
|
|