vyapari 0.1.5dev10 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/vyapari/admin/base_controller.rb +0 -9
- data/app/controllers/vyapari/admin/countries_controller.rb +2 -2
- data/app/controllers/vyapari/admin/dashboard_controller.rb +1 -3
- data/app/controllers/vyapari/admin/exchange_rates_controller.rb +2 -2
- data/app/controllers/vyapari/admin/regions_controller.rb +1 -1
- data/app/controllers/vyapari/admin/resource_controller.rb +0 -1
- data/app/controllers/vyapari/admin/users_controller.rb +130 -0
- data/app/controllers/vyapari/application_controller.rb +0 -11
- data/app/models/brand.rb +19 -67
- data/app/models/category.rb +19 -63
- data/app/models/country.rb +7 -31
- data/app/models/exchange_rate.rb +7 -32
- data/app/models/product.rb +20 -75
- data/app/models/region.rb +20 -37
- data/app/models/vyapari/application_record.rb +0 -3
- data/app/views/layouts/kuppayam/_footer.html.erb +1 -1
- data/app/views/layouts/kuppayam/_sidebar.html.erb +44 -45
- data/app/views/vyapari/admin/countries/_index.html.erb +1 -1
- data/app/views/vyapari/admin/countries/index.html.erb +3 -19
- data/app/views/vyapari/admin/exchange_rates/_form.html.erb +4 -3
- 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 +0 -1
- data/app/views/vyapari/admin/exchange_rates/index.html.erb +3 -19
- data/app/views/vyapari/admin/regions/_index.html.erb +1 -1
- data/app/views/vyapari/admin/regions/index.html.erb +3 -19
- data/app/views/vyapari/admin/users/_form.html.erb +39 -0
- data/app/views/vyapari/admin/users/_index.html.erb +101 -0
- data/app/views/vyapari/admin/users/_row.html.erb +72 -0
- data/app/views/vyapari/admin/users/_show.html.erb +199 -0
- data/app/views/vyapari/admin/{categories → users}/index.html.erb +24 -8
- data/config/routes.rb +5 -66
- data/db/migrate/20170000000200_create_exchange_rates.rb +2 -3
- data/lib/tasks/vyapari_tasks.rake +4 -0
- data/lib/vyapari/version.rb +1 -1
- metadata +15 -167
- data/app/assets/images/vyapari/sample_stock_bundle.csv +0 -1
- data/app/controllers/vyapari/admin/brands_controller.rb +0 -99
- data/app/controllers/vyapari/admin/categories_controller.rb +0 -115
- data/app/controllers/vyapari/admin/products_controller.rb +0 -79
- data/app/controllers/vyapari/admin/stores_controller.rb +0 -67
- data/app/controllers/vyapari/admin/suppliers_controller.rb +0 -67
- data/app/controllers/vyapari/admin/terminals_controller.rb +0 -150
- data/app/controllers/vyapari/store_manager/base_controller.rb +0 -33
- data/app/controllers/vyapari/store_manager/dashboard_controller.rb +0 -31
- data/app/controllers/vyapari/store_manager/reports/invoices_controller.rb +0 -249
- data/app/controllers/vyapari/store_manager/reports/sales_controller.rb +0 -299
- data/app/controllers/vyapari/store_manager/reports/stock_controller.rb +0 -132
- data/app/controllers/vyapari/store_manager/resource_controller.rb +0 -17
- data/app/controllers/vyapari/store_manager/stock_bundles_controller.rb +0 -206
- data/app/controllers/vyapari/store_manager/stock_entries_controller.rb +0 -161
- data/app/controllers/vyapari/terminal_staff/base_controller.rb +0 -38
- data/app/controllers/vyapari/terminal_staff/dashboard_controller.rb +0 -35
- data/app/controllers/vyapari/terminal_staff/invoices_controller.rb +0 -147
- data/app/controllers/vyapari/terminal_staff/line_items_controller.rb +0 -139
- data/app/controllers/vyapari/terminal_staff/resource_controller.rb +0 -17
- data/app/controllers/vyapari/user_dashboard_controller.rb +0 -31
- data/app/models/bank_account.rb +0 -44
- data/app/models/contact.rb +0 -72
- data/app/models/image/brand_image.rb +0 -3
- data/app/models/image/category_image.rb +0 -3
- data/app/models/image/product_image.rb +0 -3
- data/app/models/invoice.rb +0 -256
- data/app/models/line_item.rb +0 -207
- data/app/models/stock_bundle.rb +0 -249
- data/app/models/stock_entry.rb +0 -275
- data/app/models/store.rb +0 -302
- data/app/models/supplier.rb +0 -79
- data/app/models/terminal.rb +0 -158
- data/app/uploaders/brand_image_uploader.rb +0 -14
- data/app/uploaders/category_image_uploader.rb +0 -14
- data/app/uploaders/product_image_uploader.rb +0 -14
- data/app/uploaders/stock_bundle_uploader.rb +0 -10
- data/app/views/layouts/vyapari/_store_manager_menu.html.erb +0 -126
- data/app/views/layouts/vyapari/_terminal_staff_menu.html.erb +0 -106
- data/app/views/layouts/vyapari/store_manager.html.erb +0 -112
- data/app/views/layouts/vyapari/terminal_staff.html.erb +0 -116
- data/app/views/vyapari/admin/brands/_form.html.erb +0 -23
- data/app/views/vyapari/admin/brands/_index.html.erb +0 -89
- data/app/views/vyapari/admin/brands/_row.html.erb +0 -63
- data/app/views/vyapari/admin/brands/_show.html.erb +0 -104
- data/app/views/vyapari/admin/brands/index.html.erb +0 -48
- data/app/views/vyapari/admin/categories/_form.html.erb +0 -28
- data/app/views/vyapari/admin/categories/_index.html.erb +0 -101
- data/app/views/vyapari/admin/categories/_row.html.erb +0 -69
- data/app/views/vyapari/admin/categories/_show.html.erb +0 -115
- data/app/views/vyapari/admin/products/_form.html.erb +0 -32
- data/app/views/vyapari/admin/products/_index.html.erb +0 -58
- data/app/views/vyapari/admin/products/_row.html.erb +0 -30
- data/app/views/vyapari/admin/products/_show.html.erb +0 -81
- data/app/views/vyapari/admin/products/index.html.erb +0 -48
- data/app/views/vyapari/admin/stores/_form.html.erb +0 -37
- data/app/views/vyapari/admin/stores/_index.html.erb +0 -84
- data/app/views/vyapari/admin/stores/_row.html.erb +0 -55
- data/app/views/vyapari/admin/stores/_show.html.erb +0 -110
- data/app/views/vyapari/admin/stores/index.html.erb +0 -48
- data/app/views/vyapari/admin/suppliers/_form.html.erb +0 -32
- data/app/views/vyapari/admin/suppliers/_index.html.erb +0 -58
- data/app/views/vyapari/admin/suppliers/_row.html.erb +0 -30
- data/app/views/vyapari/admin/suppliers/_show.html.erb +0 -81
- data/app/views/vyapari/admin/suppliers/index.html.erb +0 -48
- data/app/views/vyapari/admin/terminals/_form.html.erb +0 -24
- data/app/views/vyapari/admin/terminals/_index.html.erb +0 -75
- data/app/views/vyapari/admin/terminals/_row.html.erb +0 -49
- data/app/views/vyapari/admin/terminals/_show.html.erb +0 -74
- data/app/views/vyapari/store_manager/dashboard/_sales_counts.html.erb +0 -90
- data/app/views/vyapari/store_manager/dashboard/_stock_counts.html.erb +0 -63
- data/app/views/vyapari/store_manager/dashboard/_terminals.html.erb +0 -23
- data/app/views/vyapari/store_manager/dashboard/index.html.erb +0 -64
- data/app/views/vyapari/store_manager/reports/invoices/_index.html.erb +0 -65
- data/app/views/vyapari/store_manager/reports/invoices/index.html.erb +0 -105
- data/app/views/vyapari/store_manager/reports/sales/_index.html.erb +0 -64
- data/app/views/vyapari/store_manager/reports/sales/index.html.erb +0 -105
- data/app/views/vyapari/store_manager/reports/stock/_index.html.erb +0 -72
- data/app/views/vyapari/store_manager/reports/stock/index.html.erb +0 -32
- data/app/views/vyapari/store_manager/stock_bundles/_form.html.erb +0 -99
- data/app/views/vyapari/store_manager/stock_bundles/_index.html.erb +0 -74
- data/app/views/vyapari/store_manager/stock_bundles/_row.html.erb +0 -44
- data/app/views/vyapari/store_manager/stock_bundles/_show.html.erb +0 -110
- data/app/views/vyapari/store_manager/stock_bundles/create.html.erb +0 -57
- data/app/views/vyapari/store_manager/stock_bundles/index.html.erb +0 -36
- data/app/views/vyapari/store_manager/stock_bundles/update.html.erb +0 -57
- data/app/views/vyapari/store_manager/stock_entries/_form.html.erb +0 -50
- data/app/views/vyapari/store_manager/stock_entries/_index.html.erb +0 -80
- data/app/views/vyapari/store_manager/stock_entries/_row.html.erb +0 -33
- data/app/views/vyapari/store_manager/stock_entries/_show.html.erb +0 -110
- data/app/views/vyapari/store_manager/stock_entries/_stock_bundle.html.erb +0 -61
- data/app/views/vyapari/store_manager/stock_entries/index.html.erb +0 -45
- data/app/views/vyapari/terminal_staff/dashboard/_counts.html.erb +0 -131
- data/app/views/vyapari/terminal_staff/dashboard/_invoices.html.erb +0 -44
- data/app/views/vyapari/terminal_staff/dashboard/_search_form.html.erb +0 -6
- data/app/views/vyapari/terminal_staff/dashboard/_search_results.html.erb +0 -24
- data/app/views/vyapari/terminal_staff/dashboard/index.html.erb +0 -56
- data/app/views/vyapari/terminal_staff/dashboard/search.js.erb +0 -12
- data/app/views/vyapari/terminal_staff/invoices/_draft.html.erb +0 -62
- data/app/views/vyapari/terminal_staff/invoices/_form.html.erb +0 -134
- data/app/views/vyapari/terminal_staff/invoices/_index.html.erb +0 -70
- data/app/views/vyapari/terminal_staff/invoices/_row.html.erb +0 -33
- data/app/views/vyapari/terminal_staff/invoices/_show.html.erb +0 -204
- data/app/views/vyapari/terminal_staff/invoices/index.html.erb +0 -35
- data/app/views/vyapari/terminal_staff/invoices/new.js.erb +0 -18
- data/app/views/vyapari/terminal_staff/invoices/show.html.erb +0 -1
- data/app/views/vyapari/terminal_staff/invoices/show.js.erb +0 -13
- data/app/views/vyapari/terminal_staff/line_items/_form.html.erb +0 -40
- data/app/views/vyapari/terminal_staff/line_items/_index.html.erb +0 -96
- data/app/views/vyapari/terminal_staff/line_items/create.js.erb +0 -34
- data/app/views/vyapari/terminal_staff/line_items/destroy.js.erb +0 -25
- data/app/views/vyapari/user_dashboard/index.html.erb +0 -51
- data/db/import_data/brands.csv +0 -7
- data/db/import_data/categories.csv +0 -12
- data/db/import_data/countries.csv +0 -1
- data/db/import_data/dummy/brands.csv +0 -7
- data/db/import_data/dummy/categories.csv +0 -12
- data/db/import_data/dummy/countries.csv +0 -1
- data/db/import_data/dummy/exchange_rates.csv +0 -5
- data/db/import_data/dummy/products-copy.csv +0 -1
- data/db/import_data/dummy/products.csv +0 -1
- data/db/import_data/dummy/products.xlsx +0 -0
- data/db/import_data/dummy/regions.csv +0 -13
- data/db/import_data/dummy/stores.csv +0 -10
- data/db/import_data/dummy/suppliers.csv +0 -14
- data/db/import_data/dummy/terminals.csv +0 -11
- data/db/import_data/exchange_rates.csv +0 -5
- data/db/import_data/regions.csv +0 -13
- data/db/import_data/stores.csv +0 -3
- data/db/import_data/suppliers.csv +0 -14
- data/db/import_data/terminals.csv +0 -3
- data/db/migrate/20170000000203_create_contacts.rb +0 -22
- data/db/migrate/20170000000204_create_bank_accounts.rb +0 -21
- data/db/migrate/20170000000205_create_suppliers.rb +0 -18
- data/db/migrate/20170000000206_create_stores.rb +0 -21
- data/db/migrate/20170000000207_create_terminals.rb +0 -18
- data/db/migrate/20170000000210_create_brands.rb +0 -14
- data/db/migrate/20170000000211_create_categories.rb +0 -22
- data/db/migrate/20170000000212_create_products.rb +0 -29
- data/db/migrate/20170000000213_create_invoices.rb +0 -61
- data/db/migrate/20170000000215_create_stock_bundles.rb +0 -17
- data/db/migrate/20170000000216_create_stock_entries.rb +0 -20
- data/db/sample_reports/products.xlsx +0 -0
- data/lib/tasks/vyapari/all.rake +0 -73
@@ -1,23 +0,0 @@
|
|
1
|
-
<%= form_for([:admin, @brand], :html => {:id=>"form_brand", :class=>"mb-0 form-horizontal", :brand => "form", :method => (@brand.new_record? ? :post : :put), :remote=>true}) do |f| %>
|
2
|
-
|
3
|
-
<div id="brand_form_error">
|
4
|
-
<%= @brand.errors[:base].to_sentence %>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<div class="form-inputs mb-30 mt-30">
|
8
|
-
<%= theme_form_field(@brand, :name) %>
|
9
|
-
</div>
|
10
|
-
|
11
|
-
<div>
|
12
|
-
|
13
|
-
<%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
|
14
|
-
|
15
|
-
<%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeGenericModal();", class: "pull-right ml-10 btn btn-white" %>
|
16
|
-
|
17
|
-
</div>
|
18
|
-
<%= clear_tag(10) %>
|
19
|
-
|
20
|
-
</div>
|
21
|
-
|
22
|
-
<% end %>
|
23
|
-
|
@@ -1,89 +0,0 @@
|
|
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 style="width:50%">Name</th>
|
7
|
-
<th>Featured</th>
|
8
|
-
<th>Status</th>
|
9
|
-
<th style="text-align: center;" colspan="3">Actions</th>
|
10
|
-
</tr>
|
11
|
-
</thead>
|
12
|
-
|
13
|
-
<tbody>
|
14
|
-
<% @brands.each_with_index do |brand, i| %>
|
15
|
-
|
16
|
-
<% edit_link = edit_admin_brand_path(id: brand.id) %>
|
17
|
-
<% delete_link = admin_brand_path(id: brand.id) %>
|
18
|
-
|
19
|
-
<tr id="tr_brand_<%= brand.id %>">
|
20
|
-
|
21
|
-
<th scope="row" style="text-align: center;">
|
22
|
-
<% if i < 0 %>
|
23
|
-
<i class="fa fa-check text-success"></i>
|
24
|
-
<% else %>
|
25
|
-
<%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
|
26
|
-
<% end %>
|
27
|
-
</th>
|
28
|
-
|
29
|
-
<td class="brand-name"><%= link_to brand.name, admin_brand_path(brand), remote: true %></td>
|
30
|
-
|
31
|
-
<td class="hidden-xs hidden-sm">
|
32
|
-
<% if brand.featured? %>
|
33
|
-
<span class="mr-10 mt-5 label label-warning">Featured</span>
|
34
|
-
<% end %>
|
35
|
-
</td>
|
36
|
-
|
37
|
-
<td>
|
38
|
-
<% if brand.unpublished? %>
|
39
|
-
<span class="ml-5 mt-5 label label-default">Un-Published</span>
|
40
|
-
<% elsif brand.published? %>
|
41
|
-
<span class="ml-5 mt-5 label label-success">Published</span>
|
42
|
-
<% elsif brand.removed? %>
|
43
|
-
<span class="ml-5 mt-5 label label-danger">Removed</span>
|
44
|
-
<% end %>
|
45
|
-
</td>
|
46
|
-
|
47
|
-
<td class="action-links" style="width:10%">
|
48
|
-
|
49
|
-
<!-- Mark as Featured -->
|
50
|
-
<%= link_to raw("<i class=\"fa fa-circle-o mr-5\"></i> Mark as Featured"), mark_as_featured_admin_brand_path(:id =>brand.id, :status =>'published'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"edit" unless brand.featured? %>
|
51
|
-
|
52
|
-
<!-- Remove from Featured -->
|
53
|
-
<%= link_to raw("<i class=\"fa fa-circle mr-5\"></i> Remove from Featured"), remove_from_featured_admin_brand_path(:id =>brand.id, :status =>'unpublished'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"" if brand.featured? %>
|
54
|
-
|
55
|
-
</td>
|
56
|
-
|
57
|
-
<td class="action-links" style="width:10%">
|
58
|
-
|
59
|
-
<!-- Publish -->
|
60
|
-
<%= 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=>"edit" if brand.can_be_published? %>
|
61
|
-
|
62
|
-
<!-- Un-Publish -->
|
63
|
-
<%= 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=>"" if brand.can_be_unpublished? %>
|
64
|
-
|
65
|
-
<!-- Remove -->
|
66
|
-
<%= 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=>"delete" if brand.can_be_removed? %>
|
67
|
-
|
68
|
-
</td>
|
69
|
-
|
70
|
-
<td class="action-links" style="width:10%">
|
71
|
-
|
72
|
-
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit Brand"), edit_link, :remote=>true, class: "edit" if brand.can_be_edited? %>
|
73
|
-
|
74
|
-
<%= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, brand: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" if brand.can_be_deleted? %>
|
75
|
-
|
76
|
-
</td>
|
77
|
-
|
78
|
-
</tr>
|
79
|
-
<% end %>
|
80
|
-
</tbody>
|
81
|
-
</table>
|
82
|
-
</div>
|
83
|
-
|
84
|
-
<div class="row">
|
85
|
-
<div class="col-sm-12">
|
86
|
-
<%= paginate_kuppayam(@brands) %>
|
87
|
-
</div>
|
88
|
-
</div>
|
89
|
-
|
@@ -1,63 +0,0 @@
|
|
1
|
-
<% edit_link = edit_admin_brand_path(id: brand.id) %>
|
2
|
-
<% delete_link = admin_brand_path(id: brand.id) %>
|
3
|
-
|
4
|
-
<tr id="tr_brand_<%= brand.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="brand-name"><%= link_to brand.name, admin_brand_path(brand), remote: true %></td>
|
15
|
-
|
16
|
-
<td class="hidden-xs hidden-sm">
|
17
|
-
<% if brand.featured? %>
|
18
|
-
<span class="mr-10 mt-5 label label-warning">Featured</span>
|
19
|
-
<% end %>
|
20
|
-
</td>
|
21
|
-
|
22
|
-
<td>
|
23
|
-
<% if brand.unpublished? %>
|
24
|
-
<span class="ml-5 mt-5 label label-default">Un-Published</span>
|
25
|
-
<% elsif brand.published? %>
|
26
|
-
<span class="ml-5 mt-5 label label-success">Published</span>
|
27
|
-
<% elsif brand.removed? %>
|
28
|
-
<span class="ml-5 mt-5 label label-danger">Removed</span>
|
29
|
-
<% end %>
|
30
|
-
</td>
|
31
|
-
|
32
|
-
<td class="action-links" style="width:10%">
|
33
|
-
|
34
|
-
<!-- Mark as Featured -->
|
35
|
-
<%= link_to raw("<i class=\"fa fa-circle-o mr-5\"></i> Mark as Featured"), mark_as_featured_admin_brand_path(:id =>brand.id, :status =>'published'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"edit" unless brand.featured? %>
|
36
|
-
|
37
|
-
<!-- Remove from Featured -->
|
38
|
-
<%= link_to raw("<i class=\"fa fa-circle mr-5\"></i> Remove from Featured"), remove_from_featured_admin_brand_path(:id =>brand.id, :status =>'unpublished'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"" if brand.featured? %>
|
39
|
-
|
40
|
-
</td>
|
41
|
-
|
42
|
-
<td class="action-links" style="width:10%">
|
43
|
-
|
44
|
-
<!-- Publish -->
|
45
|
-
<%= 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=>"edit" if brand.can_be_published? %>
|
46
|
-
|
47
|
-
<!-- Un-Publish -->
|
48
|
-
<%= 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=>"" if brand.can_be_unpublished? %>
|
49
|
-
|
50
|
-
<!-- Remove -->
|
51
|
-
<%= 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=>"delete" if brand.can_be_removed? %>
|
52
|
-
|
53
|
-
</td>
|
54
|
-
|
55
|
-
<td class="action-links" style="width:10%">
|
56
|
-
|
57
|
-
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit Brand"), edit_link, :remote=>true, class: "edit" if brand.can_be_edited? %>
|
58
|
-
|
59
|
-
<%= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, brand: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" if brand.can_be_deleted? %>
|
60
|
-
|
61
|
-
</td>
|
62
|
-
|
63
|
-
</tr>
|
@@ -1,104 +0,0 @@
|
|
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>
|
@@ -1,48 +0,0 @@
|
|
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>
|
@@ -1,28 +0,0 @@
|
|
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
|
-
|
@@ -1,101 +0,0 @@
|
|
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
|
-
|