office_clerk 0.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/Gemfile.lock +11 -11
- data/README.md +26 -8
- data/Rakefile +2 -2
- data/app/controllers/admin_controller.rb +2 -6
- data/app/controllers/baskets_controller.rb +2 -2
- data/app/controllers/office_controller.rb +1 -0
- data/app/controllers/orders_controller.rb +1 -1
- data/app/controllers/sessions_controller.rb +5 -5
- data/app/helpers/office_helper.rb +0 -19
- data/app/views/addresses/show.html.haml +2 -2
- data/app/views/baskets/_small.html.haml +1 -1
- data/app/views/baskets/edit.html.haml +18 -17
- data/app/views/baskets/index.html.haml +19 -17
- data/app/views/baskets/show.html.haml +3 -3
- data/app/views/categories/_treeview.html.haml +1 -1
- data/app/views/categories/edit.html.haml +5 -5
- data/app/views/categories/index.html.haml +8 -7
- data/app/views/categories/show.html.haml +5 -4
- data/app/views/clerks/edit.html.haml +4 -4
- data/app/views/clerks/index.html.haml +7 -6
- data/app/views/clerks/show.html.haml +4 -3
- data/app/views/layouts/_admin_menu.html.haml +8 -8
- data/app/views/layouts/office_clerk.haml +3 -3
- data/app/views/manage/all.haml +2 -2
- data/app/views/orders/_payment.html.haml +11 -0
- data/app/views/orders/_shipment.html.haml +10 -0
- data/app/views/orders/index.html.haml +9 -8
- data/app/views/orders/shipment.haml +3 -1
- data/app/views/orders/show.html.haml +29 -47
- data/app/views/products/_head.haml +1 -1
- data/app/views/products/_line.html.haml +1 -1
- data/app/views/products/_triple.html.haml +1 -1
- data/app/views/products/edit.html.haml +6 -4
- data/app/views/products/index.html.haml +24 -22
- data/app/views/products/show.html.haml +15 -13
- data/app/views/purchases/index.html.haml +7 -6
- data/app/views/purchases/show.html.haml +8 -7
- data/app/views/suppliers/edit.html.haml +4 -3
- data/app/views/suppliers/index.html.haml +7 -6
- data/app/views/suppliers/show.html.haml +4 -3
- data/bin/rails +11 -3
- data/config/locales/en.yml +1 -1
- data/config/locales/fi.yml +1 -1
- data/db/migrate/20131226144316_baskets.rb +2 -2
- data/db/schema.rb +2 -2
- data/lib/office_clerk/engine.rb +3 -3
- data/lib/office_clerk/version.rb +1 -1
- data/test_app/app/controllers/application_controller.rb +1 -1
- data/test_app/config/application.rb +3 -0
- data/test_app/config/initializers/assets.rb +3 -1
- metadata +4 -9
- data/config/initializers/backtrace_silencers.rb +0 -7
- data/config/initializers/filter_parameter_logging.rb +0 -4
- data/config/initializers/inflections.rb +0 -16
- data/config/initializers/migrate.rb +0 -18
- data/config/initializers/mime_types.rb +0 -6
- data/config/initializers/session_store.rb +0 -3
- data/config/initializers/wrap_parameters.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf0d4457645c4d6b2b0b86b7fd46a8fdcf853a81
|
4
|
+
data.tar.gz: e8da9e8951cbdf8e609c4ccd3631b6aed885a478
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8eb6449dfcac5d356bb83d374e240bd52a5b3771860d18b60bddf5a7c750dfa7aba8d50829cb9aed0e0c5d7aeb4131d03fc251ddb552fa2a468b0a848d9b1968
|
7
|
+
data.tar.gz: 639b75f7698851d0907f37eb8a2e684f60852010585eb51506d53f07c30559cf98bbafa5eda6bd1e6b323d24f2706d5998f83a5733f89f4e92c6bd26f74d0f4d
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../
|
3
3
|
specs:
|
4
|
-
office_clerk (0.
|
4
|
+
office_clerk (1.0.0)
|
5
5
|
bcrypt-ruby (~> 3.1)
|
6
6
|
best_in_place (~> 3.0)
|
7
7
|
bootstrap-sass (~> 3.1)
|
@@ -99,9 +99,9 @@ GEM
|
|
99
99
|
codeclimate-test-reporter (0.4.1)
|
100
100
|
simplecov (>= 0.7.1, < 1.0.0)
|
101
101
|
coderay (1.1.0)
|
102
|
-
coffee-rails (4.1.
|
102
|
+
coffee-rails (4.1.1)
|
103
103
|
coffee-script (>= 2.2.0)
|
104
|
-
railties (>= 4.0.0, < 5.
|
104
|
+
railties (>= 4.0.0, < 5.1.x)
|
105
105
|
coffee-script (2.4.1)
|
106
106
|
coffee-script-source
|
107
107
|
execjs
|
@@ -234,7 +234,7 @@ GEM
|
|
234
234
|
rails-deprecated_sanitizer (>= 1.0.1)
|
235
235
|
rails-html-sanitizer (1.0.2)
|
236
236
|
loofah (~> 2.0)
|
237
|
-
rails-i18n (4.0.
|
237
|
+
rails-i18n (4.0.8)
|
238
238
|
i18n (~> 0.7)
|
239
239
|
railties (~> 4.0)
|
240
240
|
railties (4.2.5)
|
@@ -254,7 +254,7 @@ GEM
|
|
254
254
|
ffi (>= 0.5.0)
|
255
255
|
rb-readline (0.5.1)
|
256
256
|
ref (1.0.5)
|
257
|
-
request_store (1.
|
257
|
+
request_store (1.3.0)
|
258
258
|
rspec (3.1.0)
|
259
259
|
rspec-core (~> 3.1.0)
|
260
260
|
rspec-expectations (~> 3.1.0)
|
@@ -292,10 +292,10 @@ GEM
|
|
292
292
|
sprockets (3.5.2)
|
293
293
|
concurrent-ruby (~> 1.0)
|
294
294
|
rack (> 1, < 3)
|
295
|
-
sprockets-rails (
|
296
|
-
actionpack (>=
|
297
|
-
activesupport (>=
|
298
|
-
sprockets (>=
|
295
|
+
sprockets-rails (3.0.0)
|
296
|
+
actionpack (>= 4.0)
|
297
|
+
activesupport (>= 4.0)
|
298
|
+
sprockets (>= 3.0.0)
|
299
299
|
sqlite3 (1.3.10)
|
300
300
|
term-ansicolor (1.3.0)
|
301
301
|
tins (~> 1.0)
|
@@ -306,7 +306,7 @@ GEM
|
|
306
306
|
thor (0.19.1)
|
307
307
|
thread (0.1.4)
|
308
308
|
thread_safe (0.3.5)
|
309
|
-
tilt (2.0.
|
309
|
+
tilt (2.0.2)
|
310
310
|
timers (4.0.4)
|
311
311
|
hitimes
|
312
312
|
tins (1.3.3)
|
@@ -318,7 +318,7 @@ GEM
|
|
318
318
|
valid_email (0.0.11)
|
319
319
|
activemodel
|
320
320
|
mail (~> 2.6.1)
|
321
|
-
will_paginate (3.0
|
321
|
+
will_paginate (3.1.0)
|
322
322
|
will_paginate-bootstrap (1.0.1)
|
323
323
|
will_paginate (>= 3.0.3)
|
324
324
|
xpath (2.0.0)
|
data/README.md
CHANGED
@@ -10,20 +10,25 @@ Office Clerk is the back office helper, your accountant, storage manager, secret
|
|
10
10
|
|
11
11
|
#### Status
|
12
12
|
|
13
|
-
In production for 2
|
13
|
+
Version 1.0.0 (beginning 2016) In production for 2 years on sites with less than 10000 orders a year.
|
14
14
|
|
15
15
|
### Other clerks
|
16
16
|
|
17
|
-
The original plan
|
17
|
+
The original plan has been implemented: several extension "clerk" will be optional.
|
18
|
+
Below a list of what is available, and off course you should write your own.
|
18
19
|
|
19
20
|
### AccountantClerk
|
20
21
|
|
21
|
-
This
|
22
|
+
This currently does graphical sales reports. Purchase order creation is planned.
|
22
23
|
|
23
24
|
### Print Clerk
|
24
25
|
|
25
26
|
A invoice generator. Also barcode generation and receipt printing (for POS use).
|
26
27
|
|
28
|
+
### Stripe Clerk
|
29
|
+
|
30
|
+
Stripe Payment engine. (Only for client, ie shop)
|
31
|
+
|
27
32
|
### Sales Clerk
|
28
33
|
|
29
34
|
We have a shop [online](http://auringostaitaan.fi/), the best way to get started is to clone [it](https://github.com/rubyclerks/sales_clerk).
|
@@ -34,7 +39,7 @@ The easy way (tryout or new project):
|
|
34
39
|
|
35
40
|
- clone sales_clerk
|
36
41
|
- bundle and migrate it
|
37
|
-
- change the git/config
|
42
|
+
- change the git/config
|
38
43
|
- start editing
|
39
44
|
|
40
45
|
The longer route, adding to existing project
|
@@ -45,17 +50,30 @@ The longer route, adding to existing project
|
|
45
50
|
|
46
51
|
### Further
|
47
52
|
|
48
|
-
|
49
|
-
|
50
|
-
Check the [User Guide](http://rubyclerks.org/user_guide/01_index.html),
|
53
|
+
Check the [User Guide](http://rubyclerks.org/user_guide/01_index.html),
|
51
54
|
then the [Developer Guide](http://rubyclerks.org/developer_guide/01_index.html).
|
52
55
|
|
56
|
+
If you got this far and still have question , mail me, or mail the [list](https://groups.google.com/forum/#!forum/rubyclerks)
|
57
|
+
|
53
58
|
Fill issues if you find, or discuss with me for ideas.
|
54
59
|
|
60
|
+
### Release strategy
|
61
|
+
|
62
|
+
One of the things that got me started on this project was the effort i spent to keep up with
|
63
|
+
releases. I think for a working system one should not have to spend great effort just to keep it
|
64
|
+
working. In other words, i will try and resist change on the core.
|
65
|
+
|
66
|
+
1. patch releases will require no changes, should be safe to upgrade any time
|
67
|
+
2. minor releases may include html changes and possibly migrations that add things.
|
68
|
+
3. Only mayor releases would need actual non trivial work to upgrade. I am not looking for one of
|
69
|
+
those in the foreseeable future, stability is key.
|
70
|
+
|
71
|
+
That may sound a bit pragmatic and it is. But it applies to the core only. I do encourage you to
|
72
|
+
write extensions and am happy to add decent extensions to the organisation.
|
73
|
+
|
55
74
|
### Similar Projects
|
56
75
|
|
57
76
|
* "Spree":http:spreecommerce.com , the grandfather of the rails ecommerce has grown big and mighty
|
58
77
|
* "Ror-e":http://ror-e.com/ has some nice purchase features, and did great work to standardise rails usage
|
59
78
|
* "MarketStreet":https://github.com/alex-nexus/market_street/ has taken the ball from ror-e and is running strong with an impressive list of goals
|
60
79
|
* "TryShoppe":http://tryshoppe.com/ is new and lightweight. Very nice looking interface.
|
61
|
-
|
data/Rakefile
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
2
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
3
|
|
4
|
-
|
4
|
+
Bundler::GemHelper.install_tasks
|
5
5
|
|
6
|
-
require '
|
6
|
+
require File.expand_path('../test_app/config/application', __FILE__)
|
7
7
|
|
8
8
|
TestApp::Application.load_tasks
|
9
9
|
|
@@ -6,15 +6,11 @@ class AdminController < OfficeController
|
|
6
6
|
before_filter :clean_search , :only => [:index , :search]
|
7
7
|
|
8
8
|
before_filter :require_admin
|
9
|
-
|
9
|
+
|
10
10
|
def require_admin
|
11
11
|
clerk = current_clerk
|
12
12
|
return if clerk and clerk.admin
|
13
|
-
redirect_to
|
14
|
-
end
|
15
|
-
|
16
|
-
def sign_in
|
17
|
-
has_ssl? ? sign_in_path(:protocol => :https) : sign_in_url
|
13
|
+
redirect_to sign_in_url
|
18
14
|
end
|
19
15
|
|
20
16
|
def clean_search
|
@@ -98,7 +98,7 @@ class BasketsController < AdminController
|
|
98
98
|
return
|
99
99
|
end
|
100
100
|
end
|
101
|
-
redirect_to office.
|
101
|
+
redirect_to office.edit_basket_path(@basket)
|
102
102
|
end
|
103
103
|
|
104
104
|
def edit
|
@@ -146,7 +146,7 @@ class BasketsController < AdminController
|
|
146
146
|
def redirect_if_locked
|
147
147
|
if @basket.locked?
|
148
148
|
flash.notice = t('basket_locked')
|
149
|
-
redirect_to
|
149
|
+
redirect_to basket_path(@basket)
|
150
150
|
return true
|
151
151
|
end
|
152
152
|
return false
|
@@ -10,12 +10,12 @@ class SessionsController < OfficeController
|
|
10
10
|
if clerk && clerk.valid_password?(params[:password])
|
11
11
|
session[:clerk_email] = clerk.email
|
12
12
|
if clerk.admin
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
redirect_to baskets_url , :notice => I18n.t(:signed_in)
|
14
|
+
else
|
15
|
+
redirect_after_sign_up
|
16
|
+
end
|
17
17
|
else
|
18
|
-
redirect_to
|
18
|
+
redirect_to sign_in_url , :notice => I18n.t(:sign_in_invalid)
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -70,26 +70,7 @@ module OfficeHelper
|
|
70
70
|
def paginate(collection , options = {})
|
71
71
|
#options = options.merge defaults
|
72
72
|
options[:renderer] = BootstrapPagination::Rails
|
73
|
-
options[:params] = { :url_scope => :office }
|
74
73
|
will_paginate collection, options
|
75
74
|
end
|
76
75
|
|
77
76
|
end
|
78
|
-
|
79
|
-
require "bootstrap_pagination/version"
|
80
|
-
|
81
|
-
BootstrapPagination::Rails.class_eval do
|
82
|
-
def url(page)
|
83
|
-
@base_url_params ||= begin
|
84
|
-
url_params = merge_get_params(default_url_params)
|
85
|
-
url_params[:only_path] = true
|
86
|
-
merge_optional_params(url_params)
|
87
|
-
end
|
88
|
-
|
89
|
-
url_params = @base_url_params.dup
|
90
|
-
add_current_page_param(url_params, page)
|
91
|
-
|
92
|
-
OfficeClerk::Engine.routes.url_for(url_params)
|
93
|
-
end
|
94
|
-
|
95
|
-
end
|
@@ -19,5 +19,5 @@
|
|
19
19
|
%p
|
20
20
|
%b
|
21
21
|
= t(:country) + " : " + @address.country
|
22
|
-
= link_to t(:edit),
|
23
|
-
= link_to t(:back),
|
22
|
+
= link_to t(:edit), edit_address_path(@address), :class => "btn btn-success"
|
23
|
+
= link_to t(:back), addresses_path, :class => "btn btn-warning"
|
@@ -10,7 +10,7 @@
|
|
10
10
|
- basket.items.each do |item|
|
11
11
|
%tr{:class => "line-#{cycle("1","2")}"}
|
12
12
|
%td= image_tag item.product.main_picture.url(:thumb) if item.product
|
13
|
-
%td.name= link_to_if item.product, item.name ,
|
13
|
+
%td.name= link_to_if item.product, item.name , product_path(item.product)
|
14
14
|
%td= item.quantity
|
15
15
|
%td= euros item.price
|
16
16
|
%tr
|
@@ -1,4 +1,4 @@
|
|
1
|
-
.row
|
1
|
+
.row.basket_edit_start
|
2
2
|
.col-md-12
|
3
3
|
-if @basket.kori_type
|
4
4
|
%h2
|
@@ -6,15 +6,15 @@
|
|
6
6
|
.row
|
7
7
|
.col-md-8.ean_form
|
8
8
|
= label_tag :ean
|
9
|
-
= form_tag
|
9
|
+
= form_tag ean_basket_path(@basket) do |f|
|
10
10
|
= text_field_tag :ean , "" , :autofocus => true , :class => "ean_field" , :size => 45
|
11
11
|
= submit_tag t(:search) , :class => "btn btn-xs ean_submit"
|
12
12
|
.col-md-3
|
13
13
|
= t(:discount )
|
14
|
-
= form_tag
|
15
|
-
= select_tag("discount" , options_for_select( ["",0,5,10,15,20,25,30,35,40,50,60,70] ), :onchange => "window.location.href='#{
|
14
|
+
= form_tag edit_basket_path(@basket) , :method => :get do
|
15
|
+
= select_tag("discount" , options_for_select( ["",0,5,10,15,20,25,30,35,40,50,60,70] ), :onchange => "window.location.href='#{discount_basket_path(@basket)}?discount=' + this.value")
|
16
16
|
.row
|
17
|
-
= form_for(@basket
|
17
|
+
= form_for(@basket) do |f|
|
18
18
|
%table.table.table-hover.table-condensed
|
19
19
|
%thead
|
20
20
|
%tr
|
@@ -33,10 +33,10 @@
|
|
33
33
|
%td= iform.text_field :quantity , :label => false
|
34
34
|
%td= iform.text_field :price , :label => false
|
35
35
|
%td
|
36
|
-
= select_tag("discount" , options_for_select( [item.discount,0,5,10,15,20,25,30,35,40,50,60,70] ), :onchange => "window.location.href='#{
|
36
|
+
= select_tag("discount" , options_for_select( [item.discount,0,5,10,15,20,25,30,35,40,50,60,70] ), :onchange => "window.location.href='#{discount_basket_path(@basket)}?item=#{item.id}&discount=' + this.value" )
|
37
37
|
%td
|
38
|
-
= link_to t(:delete) ,
|
39
|
-
= link_to t(:add) ,
|
38
|
+
= link_to t(:delete) , edit_basket_path(:delete => item.product.id)
|
39
|
+
= link_to t(:add) , edit_basket_path(:add => item.product.id)
|
40
40
|
|
41
41
|
%tr
|
42
42
|
%td{:colspan => 4}
|
@@ -53,23 +53,24 @@
|
|
53
53
|
= f.submit :class => "btn btn-success commit"
|
54
54
|
- if @basket.kori_type.blank? and not @basket.empty?
|
55
55
|
.col-md-1
|
56
|
-
= link_to t(:make_order),
|
56
|
+
= link_to t(:make_order), order_basket_path(@basket), :class => "btn btn-primary make_order"
|
57
57
|
.col-md-2
|
58
|
-
= link_to t(:make_purchase),
|
58
|
+
= link_to t(:make_purchase), purchase_basket_path(@basket), :class => "btn btn-primary make_purchase"
|
59
59
|
.col-md-2
|
60
|
-
= link_to t(:checkout),
|
60
|
+
= link_to t(:checkout), checkout_basket_path(@basket) , :class => "btn btn-primary print_order"
|
61
61
|
- elsif @basket.isa(:order)
|
62
62
|
.col-md-2
|
63
|
-
= link_to t(:to_order),
|
63
|
+
= link_to t(:to_order), order_path(@basket.kori), :class => "btn btn-primary to_order"
|
64
64
|
.col-md-2
|
65
65
|
- if has_receipt?
|
66
|
-
= link_to t("receipt.header"),
|
66
|
+
= link_to t("receipt.header"), receipt_order_path(@basket.kori), :class => "btn btn-primary print_order"
|
67
67
|
- elsif @basket.isa(:purchase)
|
68
68
|
.col-md-2
|
69
|
-
= link_to t(:to_purchase),
|
69
|
+
= link_to t(:to_purchase), purchase_path(@basket.kori), :class => "btn btn-primary to_purchase"
|
70
70
|
.col-md-2
|
71
|
-
= link_to t(:destroy) ,
|
71
|
+
= link_to t(:destroy) , basket_path(@basket), :confirm => t(:are_you_sure ), :method => :delete, :title => t(:destroy) , :class => "btn btn-danger" unless @basket.locked? or @basket.kori
|
72
72
|
.col-md-2
|
73
|
-
= link_to t(:nolla) ,
|
73
|
+
= link_to t(:nolla) , zero_basket_path(@basket), :class => "btn btn-danger" unless @basket.locked?
|
74
74
|
.col-md-1
|
75
|
-
= link_to t(:new) + ' ' + t(:basket) ,
|
75
|
+
= link_to t(:new) + ' ' + t(:basket) , new_basket_path , :class => "btn btn-primary"
|
76
|
+
.basket_edit_end
|
@@ -1,11 +1,11 @@
|
|
1
|
-
.row
|
1
|
+
.row.basket_index_start
|
2
2
|
.col-md-9.baskets
|
3
3
|
.row
|
4
4
|
.col-md-10
|
5
5
|
%h2= t(:baskets)
|
6
6
|
= paginate @baskets
|
7
7
|
.col-md-2
|
8
|
-
= link_to t(:new) + ' ' + t(:basket) ,
|
8
|
+
= link_to t(:new) + ' ' + t(:basket) , new_basket_path , :class => "btn btn-primary"
|
9
9
|
.col-md-3
|
10
10
|
= image_tag "office_clerk/baskets.jpg" , :class => "img-responsive"
|
11
11
|
.row
|
@@ -22,28 +22,29 @@
|
|
22
22
|
= @basket_scope.length.to_s + " " + t("baskets")
|
23
23
|
%tbody
|
24
24
|
- @baskets.each do |basket|
|
25
|
-
|
26
|
-
%
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
25
|
+
- cache(basket) do
|
26
|
+
%tr{:class => "line-#{cycle("1","2")}"}
|
27
|
+
%td
|
28
|
+
= date(basket.created_at.to_date)
|
29
|
+
%td
|
30
|
+
= euros basket.total_price
|
31
|
+
%td
|
32
|
+
- basket.items.each do |item| #should break at 5 and do the rest as tooltip
|
33
|
+
= item.quantity
|
34
|
+
x
|
35
|
+
= item.name
|
36
|
+
%br
|
37
|
+
%td= basket_edit_link(basket)
|
37
38
|
= paginate @baskets
|
38
39
|
.col-md-3
|
39
|
-
= search_form_for @q
|
40
|
+
= search_form_for @q , :html => { :class => "form-horizontal" }, :method => :get do |f|
|
40
41
|
.form-group.row
|
41
42
|
.col-md-3
|
42
43
|
= f.label(:type)
|
43
44
|
.col-md-9
|
44
45
|
= f.select :kori_type_eq, [["",""] , [t(:order) , "Order"] , [t(:purchase),"Purchase"]] , {}, :class => "form-control"
|
45
46
|
.form-group
|
46
|
-
= f.text_field :
|
47
|
+
= f.text_field :items_name_cont , :class => "form-control" , :placeholder => t(:product) + " " +t(:name_contains)
|
47
48
|
.form-group.row
|
48
49
|
.col-md-4
|
49
50
|
= f.label(:total_price)
|
@@ -60,4 +61,5 @@
|
|
60
61
|
.form-group.col-md-4
|
61
62
|
= f.search_field :created_at_lteq , :class => "form-control datepicker" , :value => sort_date(:created_at_lteq)
|
62
63
|
= f.submit t(:filter), :class => "btn btn-success"
|
63
|
-
= link_to t(:cancel),
|
64
|
+
= link_to t(:cancel), baskets_path, :class => "btn btn-warning"
|
65
|
+
.basket_index_end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
%h2
|
1
|
+
%h2.basket_show_start
|
2
2
|
= t(:basket) + " : "
|
3
3
|
= t(:order) + " " + @basket.kori.number.to_s if @basket.isa(:order)
|
4
4
|
.col-md-4
|
@@ -13,5 +13,5 @@
|
|
13
13
|
= render "small" , :basket => @basket
|
14
14
|
|
15
15
|
.col-md-12.basket_show_end
|
16
|
-
= link_to t(:back),
|
17
|
-
= link_to t(:destroy) ,
|
16
|
+
= link_to t(:back), orders_path, :class => "btn btn-warning"
|
17
|
+
= link_to t(:destroy) , basket_path(@basket), :data => { :confirm => t(:are_you_sure) }, :method => :delete, :title => t(:destroy) , :class => "btn btn-danger" if @basket.locked.blank?
|
@@ -1,5 +1,5 @@
|
|
1
1
|
%li
|
2
|
-
= link_to "#{group.name} (#{group.products.length})" ,
|
2
|
+
= link_to "#{group.name} (#{group.products.length})" , category_path(group), :title => t(:edit) , :class => group.online && "online"
|
3
3
|
- ar = group.categories
|
4
4
|
-if ar.length > 0
|
5
5
|
%ul.subcat
|