dorsale 3.2.0 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/app/assets/javascripts/dorsale/common/forms.coffee +3 -14
- data/app/assets/stylesheets/dorsale/common/contexts.sass +0 -23
- data/app/assets/stylesheets/dorsale/common/styles.sass +5 -0
- data/app/assets/stylesheets/dorsale/engines/billing_machine.sass +3 -0
- data/app/assets/stylesheets/dorsale/print.sass +1 -0
- data/app/helpers/dorsale/button_helper.rb +18 -0
- data/app/helpers/dorsale/context_helper.rb +2 -6
- data/app/views/dorsale/_page.html.slim +40 -0
- data/app/views/dorsale/billing_machine/id_cards/_index_actions.html.slim +2 -0
- data/app/views/dorsale/billing_machine/id_cards/index.html.slim +2 -3
- data/app/views/dorsale/billing_machine/invoices/_details.html.slim +0 -14
- data/app/views/dorsale/billing_machine/invoices/_index_actions.html.slim +6 -0
- data/app/views/dorsale/billing_machine/invoices/_show_title.html.slim +12 -0
- data/app/views/dorsale/billing_machine/invoices/index.html.slim +2 -6
- data/app/views/dorsale/billing_machine/invoices/index.pdf.ruby +5 -0
- data/app/views/dorsale/billing_machine/invoices/show.html.slim +7 -3
- data/app/views/dorsale/billing_machine/payment_terms/_index_actions.html.slim +2 -0
- data/app/views/dorsale/billing_machine/payment_terms/index.html.slim +2 -3
- data/app/views/dorsale/billing_machine/quotations/_details.html.slim +1 -0
- data/app/views/dorsale/billing_machine/quotations/_index_actions.html.slim +2 -0
- data/app/views/dorsale/billing_machine/quotations/_show_title.html.slim +1 -0
- data/app/views/dorsale/billing_machine/quotations/index.html.slim +2 -3
- data/app/views/dorsale/billing_machine/quotations/show.html.slim +7 -4
- data/app/views/dorsale/customer_vault/links/edit.html.slim +1 -1
- data/app/views/dorsale/customer_vault/links/index.html.slim +6 -7
- data/app/views/dorsale/customer_vault/links/new.html.slim +1 -1
- data/app/views/dorsale/customer_vault/people/{_actions.html.slim → _index_actions.html.slim} +1 -1
- data/app/views/dorsale/customer_vault/people/_show_layout.html.slim +3 -4
- data/app/views/dorsale/customer_vault/people/_show_tabs.html.slim +26 -0
- data/app/views/dorsale/customer_vault/people/activity.slim +3 -3
- data/app/views/dorsale/customer_vault/people/edit.html.slim +2 -2
- data/app/views/dorsale/customer_vault/people/index.html.slim +2 -2
- data/app/views/dorsale/customer_vault/people/invoices.html.slim +2 -3
- data/app/views/dorsale/customer_vault/people/new.html.slim +2 -2
- data/app/views/dorsale/customer_vault/people/show.html.slim +1 -1
- data/app/views/dorsale/customer_vault/people/tasks.html.slim +4 -3
- data/app/views/dorsale/expense_gun/categories/_index_actions.html.slim +2 -0
- data/app/views/dorsale/expense_gun/categories/index.html.slim +2 -3
- data/app/views/dorsale/expense_gun/expenses/_index_actions.html.slim +2 -0
- data/app/views/dorsale/expense_gun/expenses/_show_actions.html.slim +19 -0
- data/app/views/dorsale/expense_gun/expenses/index.html.slim +2 -3
- data/app/views/dorsale/expense_gun/expenses/show.html.slim +36 -49
- data/app/views/dorsale/flyboy/folders/_context.html.slim +1 -1
- data/app/views/dorsale/flyboy/folders/{_actions.html.slim → _context_actions.html.slim} +0 -0
- data/app/views/dorsale/flyboy/folders/_index_actions.html.slim +2 -0
- data/app/views/dorsale/flyboy/folders/edit.html.slim +3 -3
- data/app/views/dorsale/flyboy/folders/index.html.slim +2 -3
- data/app/views/dorsale/flyboy/folders/show.html.slim +8 -3
- data/app/views/dorsale/flyboy/tasks/_index_actions.html.slim +2 -0
- data/app/views/dorsale/flyboy/tasks/_tasks_for_taskable.html.slim +4 -3
- data/app/views/dorsale/flyboy/tasks/edit.html.slim +3 -3
- data/app/views/dorsale/flyboy/tasks/index.html.slim +2 -3
- data/app/views/dorsale/flyboy/tasks/new.html.slim +3 -3
- data/app/views/dorsale/flyboy/tasks/show.html.slim +3 -3
- data/app/views/dorsale/users/_index_actions.html.slim +2 -0
- data/app/views/dorsale/users/index.html.slim +2 -3
- data/config/locales/common.en.yml +5 -0
- data/config/locales/common.fr.yml +5 -9
- data/config/locales/customer_vault.fr.yml +1 -1
- data/config/locales/expense_gun.fr.yml +0 -4
- data/lib/dorsale/version.rb +1 -1
- data/spec/controllers/dorsale/billing_machine/invoices_controller_spec.rb +10 -0
- data/spec/models/dorsale/i18n_spec.rb +3 -5
- metadata +20 -8
- data/app/views/dorsale/_contextual.html.slim +0 -11
- data/app/views/dorsale/_index.html.slim +0 -24
- data/app/views/dorsale/customer_vault/people/_tabs.html.slim +0 -24
- data/app/views/dorsale/flyboy/tasks/_actions.html.slim +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d434a4d088da9d112016b8b105a585e3c6ab6d5d
|
4
|
+
data.tar.gz: 8e168b8193bba3d7ed57847a461feebd36b3e0d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7ab336441e22590d30bc06da433455fddfed6579cce0ab693f59bb243e073ebfd1ec29afdb631373abcea83b3cd650edb05c0a4f0dbc8e99742a03702d380d5
|
7
|
+
data.tar.gz: 8d4c15c6f3adf0c3a0375f451e03643f8a0b415ab33195e0dd862a7da9ae89ed8ba961b9c2bdfcfd7f5fb57fdc9c4241270cd93513aac610ece2d7f8ca14b72d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Next version
|
4
|
+
|
5
|
+
Nothing.
|
6
|
+
|
7
|
+
## 3.3.0
|
8
|
+
|
9
|
+
- Add download of all invoices in pdf
|
10
|
+
- Rename `render_dorsale_index` to `render_dorsale_page`
|
11
|
+
- Replace `render_contextual` by `render_dorsale_page`
|
12
|
+
- Change some view/partial names
|
13
|
+
- Fix js reset button
|
14
|
+
- Print CSS add flash
|
15
|
+
|
3
16
|
## 3.2.0
|
4
17
|
|
5
18
|
- Add print CSS
|
@@ -27,20 +27,9 @@ window.setupUploadInputs = (scope = document) ->
|
|
27
27
|
$(document).on "turbolinks:load", ->
|
28
28
|
$("button.reset").click ->
|
29
29
|
form = $(this).parents("form")
|
30
|
-
|
31
|
-
|
32
|
-
this.
|
33
|
-
|
34
|
-
form.find("input").map ->
|
35
|
-
return if this.type.match(/submit|hidden|button/)
|
36
|
-
this.value = $(this).data("default-value") || ""
|
37
|
-
|
38
|
-
form.find("textarea").map ->
|
39
|
-
this.value = $(this).data("default-value") || ""
|
40
|
-
|
41
|
-
form.find("select").map ->
|
42
|
-
this.selectize.clear() if this.selectize
|
43
|
-
$(this).val("").trigger("change")
|
30
|
+
form.find("input, textarea, select").map ->
|
31
|
+
return if String(this.type).match(/submit|hidden|button/)
|
32
|
+
$(this).val String($(this).data("default-value") || "")
|
44
33
|
|
45
34
|
# Referer with anchor
|
46
35
|
$("form").submit ->
|
@@ -27,28 +27,5 @@
|
|
27
27
|
margin-right: auto
|
28
28
|
padding: 0 0.25em
|
29
29
|
|
30
|
-
|
31
|
-
.actions.top
|
32
|
-
text-align: right
|
33
|
-
margin: 1em 0
|
34
|
-
|
35
|
-
.btn
|
36
|
-
@extend .btn
|
37
|
-
|
38
|
-
a.btn[href*='/new']
|
39
|
-
@extend .btn-success
|
40
|
-
|
41
|
-
.btn-primary
|
42
|
-
@extend .btn-primary
|
43
|
-
|
44
|
-
.btn-success
|
45
|
-
@extend .btn-success
|
46
|
-
|
47
|
-
.btn-danger
|
48
|
-
@extend .btn-danger
|
49
|
-
|
50
|
-
.btn-warning
|
51
|
-
@extend .btn-warning
|
52
|
-
|
53
30
|
form.search
|
54
31
|
margin: 1em 0
|
@@ -65,6 +65,24 @@ module Dorsale::ButtonHelper
|
|
65
65
|
dorsale_button(url, options)
|
66
66
|
end
|
67
67
|
|
68
|
+
def export_button(url, options = {})
|
69
|
+
ext = url.split(".").last
|
70
|
+
|
71
|
+
if ext.length <= 4
|
72
|
+
action = :"export_#{ext}"
|
73
|
+
else
|
74
|
+
action = :export
|
75
|
+
end
|
76
|
+
|
77
|
+
options = {
|
78
|
+
:icon => "cloud-download",
|
79
|
+
:action => action,
|
80
|
+
:download => url,
|
81
|
+
}.merge(options)
|
82
|
+
|
83
|
+
dorsale_button(url, options)
|
84
|
+
end
|
85
|
+
|
68
86
|
def update_button(url, options = {})
|
69
87
|
options = {
|
70
88
|
:icon => :pencil,
|
@@ -0,0 +1,40 @@
|
|
1
|
+
#page_header = content_for(:page_header)
|
2
|
+
|
3
|
+
- if content_for(:search)
|
4
|
+
.row
|
5
|
+
.col-md-8
|
6
|
+
.col-md-4
|
7
|
+
= content_for(:search)
|
8
|
+
|
9
|
+
= content_for(:filters)
|
10
|
+
|
11
|
+
- content_for(:main)
|
12
|
+
= content_for(:tabs)
|
13
|
+
|
14
|
+
- unless content_for?(:title)
|
15
|
+
p.text-right = content_for(:actions)
|
16
|
+
|
17
|
+
- if content_for?(:title) || content_for?(:table)
|
18
|
+
.panel.panel-default
|
19
|
+
- if content_for?(:title)
|
20
|
+
.panel-heading: .panel-title
|
21
|
+
= content_for(:title)
|
22
|
+
.pull-right = content_for(:actions)
|
23
|
+
|
24
|
+
= content_for(:table)
|
25
|
+
|
26
|
+
= content_for(:page_body)
|
27
|
+
|
28
|
+
- if content_for?(:context)
|
29
|
+
.row
|
30
|
+
aside#context.col-sm-4.col-xs-12
|
31
|
+
= content_for(:context)
|
32
|
+
#context-main.col-sm-8.col-xs-12
|
33
|
+
= content_for(:main)
|
34
|
+
- else
|
35
|
+
= content_for(:main)
|
36
|
+
|
37
|
+
|
38
|
+
= content_for(:pagination)
|
39
|
+
|
40
|
+
#page_footer = content_for(:page_footer)
|
@@ -3,10 +3,9 @@
|
|
3
3
|
= ::Dorsale::BillingMachine::IdCard.ts
|
4
4
|
|
5
5
|
- content_for :actions
|
6
|
-
|
7
|
-
= create_button new_billing_machine_id_card_path, action: :create
|
6
|
+
= render "dorsale/billing_machine/id_cards/index_actions"
|
8
7
|
|
9
8
|
- content_for :table
|
10
9
|
= render "dorsale/billing_machine/id_cards/list", id_cards: @id_cards
|
11
10
|
|
12
|
-
=
|
11
|
+
= render_dorsale_page
|
@@ -2,20 +2,6 @@
|
|
2
2
|
- document_type = document.class.to_s.split("::").last.downcase.to_sym
|
3
3
|
|
4
4
|
#billing_machine-show
|
5
|
-
h1
|
6
|
-
= document.t
|
7
|
-
- if document.tracking_id.present?
|
8
|
-
= " n° "
|
9
|
-
= document.tracking_id
|
10
|
-
|
11
|
-
- if document_type == :invoice
|
12
|
-
.label class="invoice #{document.payment_status}"
|
13
|
-
= document.t("payment_status.#{document.payment_status}")
|
14
|
-
|
15
|
-
- if document_type == :quotation
|
16
|
-
.label class="quotation #{quotation_state_classes(document)}"
|
17
|
-
= document.t("state.#{document.state}")
|
18
|
-
|
19
5
|
.row
|
20
6
|
.col-md-6
|
21
7
|
.well
|
@@ -0,0 +1,6 @@
|
|
1
|
+
- if policy(::Dorsale::BillingMachine::Invoice).create?
|
2
|
+
= create_button dorsale.new_billing_machine_invoice_path
|
3
|
+
|
4
|
+
- if policy(::Dorsale::BillingMachine::Invoice).export?
|
5
|
+
= export_button dorsale.billing_machine_invoices_path(format: :xlsx), download: "#{model.ts}.xlsx"
|
6
|
+
= export_button dorsale.billing_machine_invoices_path(format: :pdf), download: "#{model.ts}.pdf"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
= document.t
|
2
|
+
- if document.tracking_id.present?
|
3
|
+
= " n° "
|
4
|
+
= document.tracking_id
|
5
|
+
|
6
|
+
- if document.is_a?(Dorsale::BillingMachine::Invoice)
|
7
|
+
.label class="invoice #{document.payment_status}"
|
8
|
+
= document.t("payment_status.#{document.payment_status}")
|
9
|
+
|
10
|
+
- if document.is_a?(Dorsale::BillingMachine::Quotation)
|
11
|
+
.label class="quotation #{quotation_state_classes(document)}"
|
12
|
+
= document.t("state.#{document.state}")
|
@@ -11,11 +11,7 @@
|
|
11
11
|
= Dorsale::BillingMachine::Invoice.ts
|
12
12
|
|
13
13
|
- content_for :actions
|
14
|
-
|
15
|
-
= create_button dorsale.new_billing_machine_invoice_path
|
16
|
-
|
17
|
-
- if policy(::Dorsale::BillingMachine::Invoice).export?
|
18
|
-
= download_button dorsale.billing_machine_invoices_path(format: :xlsx), download: "#{model.ts}.xlsx"
|
14
|
+
= render "dorsale/billing_machine/invoices/index_actions"
|
19
15
|
|
20
16
|
- content_for :table
|
21
17
|
= render "dorsale/billing_machine/invoices/list", invoices: @invoices
|
@@ -23,4 +19,4 @@
|
|
23
19
|
- content_for :pagination
|
24
20
|
= paginate @invoices
|
25
21
|
|
26
|
-
=
|
22
|
+
= render_dorsale_page
|
@@ -1,7 +1,11 @@
|
|
1
1
|
.billing_machine
|
2
|
-
|
2
|
+
- content_for :title
|
3
|
+
= render "dorsale/billing_machine/invoices/show_title", document: @invoice
|
4
|
+
|
5
|
+
- content_for :actions
|
3
6
|
= render "dorsale/billing_machine/invoices/show_actions"
|
4
7
|
|
5
|
-
|
8
|
+
- content_for :page_body
|
9
|
+
= render "dorsale/billing_machine/invoices/details", document: @invoice
|
6
10
|
|
7
|
-
=
|
11
|
+
= render_dorsale_page
|
@@ -3,10 +3,9 @@
|
|
3
3
|
= ::Dorsale::BillingMachine::PaymentTerm.ts
|
4
4
|
|
5
5
|
- content_for :actions
|
6
|
-
|
7
|
-
= create_button new_billing_machine_payment_term_path, action: :create
|
6
|
+
= render "dorsale/billing_machine/payment_terms/index_actions"
|
8
7
|
|
9
8
|
- content_for :table
|
10
9
|
= render "dorsale/billing_machine/payment_terms/list", payment_terms: @payment_terms
|
11
10
|
|
12
|
-
=
|
11
|
+
= render_dorsale_page
|
@@ -0,0 +1 @@
|
|
1
|
+
= render "dorsale/billing_machine/invoices/details", document: document
|
@@ -0,0 +1 @@
|
|
1
|
+
= render "dorsale/billing_machine/invoices/show_title", document: document
|
@@ -11,8 +11,7 @@
|
|
11
11
|
= Dorsale::BillingMachine::Quotation.ts
|
12
12
|
|
13
13
|
- content_for :actions
|
14
|
-
|
15
|
-
= create_button dorsale.new_billing_machine_quotation_path
|
14
|
+
= render "dorsale/billing_machine/quotations/index_actions"
|
16
15
|
|
17
16
|
- content_for :table
|
18
17
|
= render "dorsale/billing_machine/quotations/list", quotations: @quotations
|
@@ -20,4 +19,4 @@
|
|
20
19
|
- content_for :pagination
|
21
20
|
= paginate @quotations
|
22
21
|
|
23
|
-
=
|
22
|
+
= render_dorsale_page
|
@@ -1,8 +1,11 @@
|
|
1
1
|
.billing_machine
|
2
|
-
|
3
|
-
= render "dorsale/billing_machine/quotations/
|
2
|
+
- content_for :title
|
3
|
+
= render "dorsale/billing_machine/quotations/show_title", document: @quotation
|
4
4
|
|
5
|
-
|
5
|
+
- content_for :actions
|
6
|
+
= render "dorsale/billing_machine/quotations/show_actions"
|
6
7
|
|
7
|
-
|
8
|
+
- content_for :page_body
|
9
|
+
= render "dorsale/billing_machine/quotations/details", document: @quotation
|
8
10
|
|
11
|
+
= render_dorsale_page
|
@@ -1,10 +1,9 @@
|
|
1
|
-
- content_for :
|
2
|
-
.
|
3
|
-
|
4
|
-
= render "dorsale/customer_vault/people/list_item", person: link.other_person, link: link
|
1
|
+
- content_for :actions
|
2
|
+
- if policy(@person).update?
|
3
|
+
= create_button dorsale.new_customer_vault_person_link_path(@person), action: :new_link
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
- content_for :page_body
|
6
|
+
- @person.links.each do |link|
|
7
|
+
= render "dorsale/customer_vault/people/list_item", person: link.other_person, link: link
|
9
8
|
|
10
9
|
= render "dorsale/customer_vault/people/show_layout"
|
data/app/views/dorsale/customer_vault/people/{_actions.html.slim → _index_actions.html.slim}
RENAMED
@@ -3,4 +3,4 @@
|
|
3
3
|
= create_button dorsale.new_customer_vault_corporation_path, action: :new_corporation
|
4
4
|
|
5
5
|
- if @people_without_pagination && policy(model).export?
|
6
|
-
=
|
6
|
+
= export_button url_for(format: :xlsx), download: "#{model.ts}.xlsx"
|
@@ -3,8 +3,7 @@
|
|
3
3
|
= render "dorsale/customer_vault/people/context", person: @person
|
4
4
|
= render "dorsale/customer_vault/people/data_context", person: @person
|
5
5
|
|
6
|
-
- content_for :
|
7
|
-
= render "dorsale/customer_vault/people/
|
8
|
-
= content_for :person_page
|
6
|
+
- content_for :tabs
|
7
|
+
= render "dorsale/customer_vault/people/show_tabs"
|
9
8
|
|
10
|
-
=
|
9
|
+
= render_dorsale_page
|
@@ -0,0 +1,26 @@
|
|
1
|
+
.nav.nav-tabs#person-tabs
|
2
|
+
li class=("active" if request.path == dorsale.customer_vault_person_path(@person))
|
3
|
+
a href=dorsale.customer_vault_person_path(@person)
|
4
|
+
= t("customer_vault.activity")
|
5
|
+
= " "
|
6
|
+
span.badge = @person.comments.count
|
7
|
+
|
8
|
+
li class=("active" if request.path.start_with? dorsale.customer_vault_person_links_path(@person))
|
9
|
+
a href=dorsale.customer_vault_person_links_path(@person)
|
10
|
+
= Dorsale::CustomerVault::Link.ts
|
11
|
+
= " "
|
12
|
+
span.badge = @person.links.length
|
13
|
+
|
14
|
+
- if policy(Dorsale::Flyboy::Task).list?
|
15
|
+
li class=("active" if request.path == dorsale.tasks_customer_vault_person_path(@person))
|
16
|
+
a href=dorsale.tasks_customer_vault_person_path(@person)
|
17
|
+
= Dorsale::Flyboy::Task.ts
|
18
|
+
= " "
|
19
|
+
span.badge = @person.tasks.count
|
20
|
+
|
21
|
+
- if policy(Dorsale::BillingMachine::Invoice).list?
|
22
|
+
li class=("active" if request.path == dorsale.invoices_customer_vault_person_path(@person))
|
23
|
+
a href=dorsale.invoices_customer_vault_person_path(@person)
|
24
|
+
= Dorsale::BillingMachine::Invoice.ts
|
25
|
+
= " "
|
26
|
+
span.badge = @person.invoices.count
|
@@ -5,10 +5,10 @@
|
|
5
5
|
= t("customer_vault.activity")
|
6
6
|
|
7
7
|
- content_for :actions
|
8
|
-
= render "dorsale/customer_vault/people/
|
8
|
+
= render "dorsale/customer_vault/people/index_actions"
|
9
9
|
|
10
10
|
- content_for :page_header
|
11
|
-
|
11
|
+
= render "dorsale/customer_vault/people/index_tabs"
|
12
12
|
|
13
13
|
- content_for :page_body
|
14
14
|
- if @comments.empty?
|
@@ -21,4 +21,4 @@
|
|
21
21
|
- content_for :pagination
|
22
22
|
= paginate @comments
|
23
23
|
|
24
|
-
=
|
24
|
+
= render_dorsale_page
|