dorsale 3.3.0 → 3.4.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/CHANGELOG.md +9 -0
- data/app/assets/stylesheets/dorsale/engines/flyboy.sass +0 -7
- data/app/controllers/dorsale/alexandrie/attachments_controller.rb +7 -0
- data/app/controllers/dorsale/application_controller.rb +1 -0
- data/app/controllers/dorsale/billing_machine/invoices_controller.rb +2 -0
- data/app/controllers/dorsale/billing_machine/quotations_controller.rb +2 -0
- data/app/controllers/dorsale/customer_vault/application_controller.rb +0 -4
- data/app/controllers/dorsale/customer_vault/people_controller.rb +0 -2
- data/app/controllers/dorsale/expense_gun/expenses_controller.rb +2 -2
- data/app/controllers/dorsale/flyboy/application_controller.rb +0 -3
- data/app/controllers/dorsale/flyboy/tasks_controller.rb +2 -8
- data/app/helpers/dorsale/all_helpers.rb +1 -0
- data/app/helpers/dorsale/flyboy/application_helper.rb +3 -12
- data/app/helpers/dorsale/link_helper.rb +10 -0
- data/app/helpers/dorsale/sorting_helper.rb +48 -0
- data/app/mailers/dorsale/billing_machine/invoice_mailer.rb +1 -1
- data/app/models/concerns/dorsale/model_i18n.rb +25 -0
- data/app/models/concerns/dorsale/model_to_s.rb +9 -0
- data/{lib → app/models/concerns}/dorsale/polymorphic_id.rb +1 -3
- data/app/models/concerns/dorsale/search.rb +30 -0
- data/app/models/dorsale/alexandrie/attachment.rb +7 -6
- data/app/models/dorsale/application_record.rb +6 -0
- data/app/models/dorsale/billing_machine/invoice.rb +2 -6
- data/app/models/dorsale/billing_machine/quotation.rb +4 -4
- data/app/models/dorsale/customer_vault/person.rb +0 -2
- data/app/models/dorsale/expense_gun/expense.rb +8 -8
- data/app/models/dorsale/flyboy/task.rb +5 -16
- data/app/pdfs/concerns/dorsale/alexandrie/prawn/render_with_attachments.rb +13 -0
- data/app/pdfs/dorsale/billing_machine/invoice_single_vat_pdf.rb +6 -1
- data/app/pdfs/dorsale/billing_machine/quotation_pdf_common_methods.rb +0 -18
- data/app/policies/dorsale/expense_gun/expense_policy_helper.rb +1 -1
- data/app/policies/dorsale/flyboy/task_policy_helper.rb +0 -10
- data/app/policies/dorsale/policy_checker.rb +0 -1
- data/app/services/dorsale/billing_machine/pdf_file_generator.rb +37 -0
- data/app/services/dorsale/expense_gun/expense/copy.rb +1 -1
- data/app/uploaders/dorsale/pdf_uploader.rb +5 -0
- data/app/views/dorsale/billing_machine/invoices/_details.html.slim +1 -1
- data/app/views/dorsale/billing_machine/invoices/_list.html.slim +1 -2
- data/app/views/dorsale/billing_machine/invoices/index.pdf.ruby +2 -2
- data/app/views/dorsale/billing_machine/invoices/show.pdf.ruby +1 -1
- data/app/views/dorsale/billing_machine/quotations/_list.html.slim +1 -2
- data/app/views/dorsale/billing_machine/quotations/show.pdf.ruby +1 -1
- data/app/views/dorsale/comments/_comment.html.slim +1 -1
- data/app/views/dorsale/customer_vault/links/new.html.slim +1 -1
- data/app/views/dorsale/customer_vault/people/_list_item.html.slim +1 -1
- data/app/views/dorsale/flyboy/tasks/_form.html.slim +3 -0
- data/app/views/dorsale/flyboy/tasks/_index_actions.html.slim +3 -0
- data/app/views/dorsale/flyboy/tasks/_list.html.slim +6 -12
- data/app/views/dorsale/flyboy/tasks/_summary_list.html.slim +2 -3
- data/app/views/dorsale/flyboy/tasks/_taskable_context.html.slim +1 -1
- data/app/views/dorsale/flyboy/tasks/index.xlsx.ruby +2 -4
- data/config/locales/billing_machine.en.yml +1 -0
- data/config/locales/billing_machine.fr.yml +1 -0
- data/config/locales/common.en.yml +3 -3
- data/config/locales/expense_gun.fr.yml +12 -12
- data/config/locales/flyboy.en.yml +1 -28
- data/config/locales/flyboy.fr.yml +1 -28
- data/config/routes.rb +0 -7
- data/db/migrate/20170127131537_delete_folders.rb +10 -0
- data/db/migrate/20170127151610_fix_expense_state.rb +6 -0
- data/db/migrate/20170127155636_billing_machine_add_pdf_file.rb +16 -0
- data/features/expense_gun_expenses.feature +3 -3
- data/features/flyboy_task_comments.feature +1 -1
- data/features/flyboy_tasks.feature +3 -4
- data/features/flyboy_tasks_summary.feature +0 -1
- data/features/step_definitions/billing_machine_invoices_steps.rb +1 -0
- data/features/step_definitions/expense_gun_expenses_steps.rb +2 -2
- data/features/step_definitions/flyboy_tasks_steps.rb +2 -3
- data/features/step_definitions/tasks_summary_steps.rb +3 -3
- data/lib/dorsale/active_record_comma_type_cast.rb +12 -0
- data/lib/dorsale/core_and_rails_ext.rb +3 -0
- data/lib/dorsale/engine.rb +6 -10
- data/lib/dorsale/form_back_url.rb +3 -1
- data/lib/dorsale/version.rb +1 -1
- data/spec/controllers/dorsale/billing_machine/invoices_controller_spec.rb +4 -1
- data/spec/controllers/dorsale/flyboy/tasks_controller_spec.rb +7 -30
- data/spec/factories/flyboy_tasks.rb +0 -2
- data/spec/helpers/dorsale/flyboy/application_helper_spec.rb +0 -64
- data/spec/helpers/dorsale/sorting_helper_spec.rb +74 -0
- data/spec/libs/{active_record_comma_type_cast_spec.rb → dorsale/active_record_comma_type_cast_spec.rb} +1 -1
- data/spec/libs/dorsale/polymorphic_id_spec.rb +8 -7
- data/spec/models/{dorsale → concerns/dorsale}/model_i18n_spec.rb +0 -0
- data/spec/models/dorsale/expense_gun/expense_spec.rb +19 -19
- data/spec/models/dorsale/flyboy/task_spec.rb +2 -1
- data/spec/pdfs/dorsale/billing_machine/invoice_multiple_vat_pdf_spec.rb +18 -13
- data/spec/pdfs/dorsale/billing_machine/invoice_single_vat_pdf_spec.rb +18 -13
- data/spec/pdfs/dorsale/billing_machine/quotation_multiple_vat_pdf_spec.rb +18 -13
- data/spec/pdfs/dorsale/billing_machine/quotation_single_vat_pdf_spec.rb +25 -19
- data/spec/services/dorsale/expense_gun/expense/copy_spec.rb +1 -1
- metadata +21 -52
- data/app/controllers/dorsale/flyboy/folders_controller.rb +0 -140
- data/app/filters/dorsale/flyboy/small_data/filter_for_folders.rb +0 -5
- data/app/filters/dorsale/flyboy/small_data/filter_strategy_by_status.rb +0 -9
- data/app/models/dorsale/flyboy/folder.rb +0 -72
- data/app/policies/dorsale/flyboy/folder_policy_helper.rb +0 -26
- data/app/views/dorsale/flyboy/folders/_context.html.slim +0 -18
- data/app/views/dorsale/flyboy/folders/_context_actions.html.slim +0 -10
- data/app/views/dorsale/flyboy/folders/_form.html.slim +0 -17
- data/app/views/dorsale/flyboy/folders/_index_actions.html.slim +0 -2
- data/app/views/dorsale/flyboy/folders/_list.html.slim +0 -41
- data/app/views/dorsale/flyboy/folders/edit.html.slim +0 -8
- data/app/views/dorsale/flyboy/folders/index.html.slim +0 -22
- data/app/views/dorsale/flyboy/folders/new.html.slim +0 -2
- data/app/views/dorsale/flyboy/folders/show.html.slim +0 -14
- data/features/flyboy_folders.feature +0 -109
- data/features/step_definitions/flyboy_folders_steps.rb +0 -170
- data/lib/active_record_comma_type_cast.rb +0 -12
- data/lib/dorsale/alexandrie/prawn.rb +0 -17
- data/lib/dorsale/model_i18n.rb +0 -30
- data/lib/dorsale/model_to_s.rb +0 -13
- data/lib/dorsale/search.rb +0 -34
- data/spec/controllers/dorsale/flyboy/folders_controller_spec.rb +0 -113
- data/spec/factories/flyboy_folders.rb +0 -7
- data/spec/models/dorsale/flyboy/folder_spec.rb +0 -103
- data/spec/routing/dorsale/flyboy/folders_routing_spec.rb +0 -44
|
@@ -20,6 +20,8 @@ class Dorsale::BillingMachine::Quotation < ::Dorsale::ApplicationRecord
|
|
|
20
20
|
|
|
21
21
|
polymorphic_id_for :customer
|
|
22
22
|
|
|
23
|
+
mount_uploader :pdf_file, ::Dorsale::PdfUploader
|
|
24
|
+
|
|
23
25
|
validates :id_card, presence: true
|
|
24
26
|
validates :date, presence: true
|
|
25
27
|
validates :state, presence: true, inclusion: {in: proc { STATES } }
|
|
@@ -117,9 +119,7 @@ class Dorsale::BillingMachine::Quotation < ::Dorsale::ApplicationRecord
|
|
|
117
119
|
end
|
|
118
120
|
end
|
|
119
121
|
|
|
120
|
-
def
|
|
121
|
-
|
|
122
|
-
.tap(&:build)
|
|
123
|
-
.render_with_attachments
|
|
122
|
+
def after_attachments_changes
|
|
123
|
+
Dorsale::BillingMachine::PdfFileGenerator.(self)
|
|
124
124
|
end
|
|
125
125
|
end
|
|
@@ -47,31 +47,31 @@ class Dorsale::ExpenseGun::Expense < ::Dorsale::ApplicationRecord
|
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
aasm(column: :state, whiny_transitions: false) do
|
|
50
|
-
state :
|
|
51
|
-
state :
|
|
50
|
+
state :draft, initial: true
|
|
51
|
+
state :submitted
|
|
52
52
|
state :accepted
|
|
53
53
|
state :refused
|
|
54
54
|
state :canceled
|
|
55
55
|
|
|
56
|
-
event :
|
|
57
|
-
transitions from: :
|
|
56
|
+
event :go_to_submitted do
|
|
57
|
+
transitions from: :draft, to: :submitted
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
event :go_to_accepted do
|
|
61
|
-
transitions from: :
|
|
61
|
+
transitions from: :submitted, to: :accepted
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
event :go_to_refused do
|
|
65
|
-
transitions from: :
|
|
65
|
+
transitions from: :submitted, to: :refused
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
event :go_to_canceled do
|
|
69
|
-
transitions from: [:
|
|
69
|
+
transitions from: [:draft, :submitted, :accepted], to: :canceled
|
|
70
70
|
end
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
def may_edit?
|
|
74
|
-
current_state == :
|
|
74
|
+
current_state == :draft
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
end
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
require "dorsale/search"
|
|
2
|
-
require "dorsale/polymorphic_id"
|
|
3
|
-
|
|
4
1
|
class Dorsale::Flyboy::Task < ::Dorsale::ApplicationRecord
|
|
5
2
|
self.table_name = "dorsale_flyboy_tasks"
|
|
6
3
|
|
|
@@ -8,15 +5,16 @@ class Dorsale::Flyboy::Task < ::Dorsale::ApplicationRecord
|
|
|
8
5
|
|
|
9
6
|
paginates_per 50
|
|
10
7
|
|
|
11
|
-
belongs_to :taskable, polymorphic: true
|
|
8
|
+
belongs_to :taskable, polymorphic: true, required: false
|
|
12
9
|
belongs_to :owner, polymorphic: true
|
|
13
10
|
has_many :comments, class_name: ::Dorsale::Flyboy::TaskComment, inverse_of: :task, dependent: :destroy
|
|
11
|
+
|
|
14
12
|
polymorphic_id_for :taskable
|
|
15
13
|
polymorphic_id_for :owner
|
|
16
14
|
|
|
17
|
-
scope :delayed, -> { where(done: false).where("term < ?", Time.zone.now.to_date)
|
|
18
|
-
scope :today, -> { where(done: false).where("term = ?", Time.zone.now.to_date)
|
|
19
|
-
scope :tomorrow, -> { where(done: false).where("term = ?", Date.tomorrow)
|
|
15
|
+
scope :delayed, -> { where(done: false).where("term < ?", Time.zone.now.to_date) }
|
|
16
|
+
scope :today, -> { where(done: false).where("term = ?", Time.zone.now.to_date) }
|
|
17
|
+
scope :tomorrow, -> { where(done: false).where("term = ?", Date.tomorrow) }
|
|
20
18
|
|
|
21
19
|
scope :this_week, -> {
|
|
22
20
|
min = Date.tomorrow
|
|
@@ -37,7 +35,6 @@ class Dorsale::Flyboy::Task < ::Dorsale::ApplicationRecord
|
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
|
|
40
|
-
validates :taskable, presence: true
|
|
41
38
|
validates :name, presence: true
|
|
42
39
|
validates :term, presence: true
|
|
43
40
|
validates :reminder, presence: true
|
|
@@ -46,7 +43,6 @@ class Dorsale::Flyboy::Task < ::Dorsale::ApplicationRecord
|
|
|
46
43
|
|
|
47
44
|
def validates_reminder_and_term
|
|
48
45
|
if reminder && term && reminder > term
|
|
49
|
-
# errors.add(:reminder, "La date de relance doit être antérieure ou égale à la date d'échéance")
|
|
50
46
|
errors.add(:reminder, :less_than, count: term)
|
|
51
47
|
end
|
|
52
48
|
end
|
|
@@ -58,13 +54,6 @@ class Dorsale::Flyboy::Task < ::Dorsale::ApplicationRecord
|
|
|
58
54
|
assign_default :term, Time.zone.now.to_date + snooze_default_term
|
|
59
55
|
end
|
|
60
56
|
|
|
61
|
-
after_save :update_taskable_progress!
|
|
62
|
-
after_destroy :update_taskable_progress!
|
|
63
|
-
|
|
64
|
-
def update_taskable_progress!
|
|
65
|
-
taskable.try(:update_progress!)
|
|
66
|
-
end
|
|
67
|
-
|
|
68
57
|
def snooze
|
|
69
58
|
if term_not_passed_yet
|
|
70
59
|
if self.reminder + snooze_default_reminder > Time.zone.now.to_date
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Dorsale::Alexandrie::Prawn::RenderWithAttachments
|
|
2
|
+
def render_with_attachments
|
|
3
|
+
final_pdf = ::CombinePDF.parse(self.render)
|
|
4
|
+
|
|
5
|
+
attachments.each do |attachment|
|
|
6
|
+
next unless File.extname(attachment.file.path) == ".pdf"
|
|
7
|
+
|
|
8
|
+
final_pdf << ::CombinePDF.load(attachment.file.path)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
final_pdf.to_pdf
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
require "prawn/measurement_extensions"
|
|
2
2
|
|
|
3
3
|
class Dorsale::BillingMachine::InvoiceSingleVatPdf < Prawn::Document
|
|
4
|
-
include Dorsale::Alexandrie::Prawn
|
|
4
|
+
include Dorsale::Alexandrie::Prawn::RenderWithAttachments
|
|
5
5
|
include Dorsale::AllHelpers
|
|
6
6
|
include ActionView::Helpers::NumberHelper
|
|
7
|
+
|
|
8
|
+
def attachments
|
|
9
|
+
@main_document.try(:attachments) || []
|
|
10
|
+
end
|
|
11
|
+
|
|
7
12
|
DEBUG = false
|
|
8
13
|
|
|
9
14
|
GREY = "808080"
|
|
@@ -1,22 +1,4 @@
|
|
|
1
1
|
module Dorsale::BillingMachine::QuotationPdfCommonMethods
|
|
2
|
-
def build
|
|
3
|
-
super
|
|
4
|
-
build_attachments
|
|
5
|
-
end
|
|
6
|
-
|
|
7
|
-
def build_attachments
|
|
8
|
-
main_document.attachments.each do |attachment|
|
|
9
|
-
next unless File.extname(attachment.file.path) == ".pdf"
|
|
10
|
-
|
|
11
|
-
file = attachment.file.path
|
|
12
|
-
nb_pages = ::CombinePDF.load(file).pages.count
|
|
13
|
-
|
|
14
|
-
nb_pages.times do |i|
|
|
15
|
-
start_new_page template: file, template_page: (i+1)
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
|
|
20
2
|
def build_bank_informations
|
|
21
3
|
end
|
|
22
4
|
|
|
@@ -11,18 +11,15 @@ module Dorsale::Flyboy::TaskPolicyHelper
|
|
|
11
11
|
]
|
|
12
12
|
|
|
13
13
|
def create?
|
|
14
|
-
return false if folder_is_closed?
|
|
15
14
|
return false if cannot_read_taskable?
|
|
16
15
|
super
|
|
17
16
|
end
|
|
18
17
|
|
|
19
18
|
def update?
|
|
20
|
-
return false if folder_is_closed?
|
|
21
19
|
super
|
|
22
20
|
end
|
|
23
21
|
|
|
24
22
|
def delete?
|
|
25
|
-
return false if folder_is_closed?
|
|
26
23
|
super
|
|
27
24
|
end
|
|
28
25
|
|
|
@@ -38,13 +35,6 @@ module Dorsale::Flyboy::TaskPolicyHelper
|
|
|
38
35
|
|
|
39
36
|
private
|
|
40
37
|
|
|
41
|
-
def folder_is_closed?
|
|
42
|
-
return false unless task.is_a?(::Dorsale::Flyboy::Task)
|
|
43
|
-
return false unless task.taskable.is_a?(::Dorsale::Flyboy::Folder)
|
|
44
|
-
|
|
45
|
-
task.taskable.closed?
|
|
46
|
-
end
|
|
47
|
-
|
|
48
38
|
def cannot_read_taskable?
|
|
49
39
|
return false unless task.is_a?(::Dorsale::Flyboy::Task)
|
|
50
40
|
return false unless task.taskable.present?
|
|
@@ -17,7 +17,6 @@ class Dorsale::PolicyChecker
|
|
|
17
17
|
check_policy! "Dorsale::CustomerVault::LinkPolicy"
|
|
18
18
|
check_policy! "Dorsale::ExpenseGun::CategoryPolicy"
|
|
19
19
|
check_policy! "Dorsale::ExpenseGun::ExpensePolicy"
|
|
20
|
-
check_policy! "Dorsale::Flyboy::FolderPolicy"
|
|
21
20
|
check_policy! "Dorsale::Flyboy::TaskPolicy"
|
|
22
21
|
check_policy! "UserPolicy"
|
|
23
22
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
class Dorsale::BillingMachine::PdfFileGenerator < Dorsale::Service
|
|
2
|
+
attr_reader :document
|
|
3
|
+
|
|
4
|
+
def initialize(document)
|
|
5
|
+
# I have no idea why I need to do that,
|
|
6
|
+
# if I don't do that, CarrierWare do not stores the file.
|
|
7
|
+
# The reload() method don't work either.
|
|
8
|
+
# The problem appears only on server, not in console.
|
|
9
|
+
# I think CarrierWave do not work anymore after first save.
|
|
10
|
+
@document = document.class.find(document.id)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def call
|
|
14
|
+
document.update!(pdf_file: file)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
private
|
|
18
|
+
|
|
19
|
+
def pdf_klass
|
|
20
|
+
return ::Dorsale::BillingMachine.invoice_pdf_model if document.is_a?(::Dorsale::BillingMachine::Invoice)
|
|
21
|
+
return ::Dorsale::BillingMachine.quotation_pdf_model if document.is_a?(::Dorsale::BillingMachine::Quotation)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def pdf_data
|
|
25
|
+
@pdf_data ||= pdf_klass.new(document).tap(&:build).render_with_attachments
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def file
|
|
29
|
+
@file ||= StringIO.new(pdf_data)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
class StringIO < ::StringIO
|
|
33
|
+
def original_filename
|
|
34
|
+
@original_filename ||= "#{SecureRandom.uuid}.pdf"
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -29,8 +29,7 @@ table.default.invoices
|
|
|
29
29
|
= invoice.tracking_id
|
|
30
30
|
|
|
31
31
|
td.customer_name
|
|
32
|
-
|
|
33
|
-
= link_to invoice.customer, invoice.customer
|
|
32
|
+
= link_to_object(invoice.customer)
|
|
34
33
|
|
|
35
34
|
td.total_excluding_taxes
|
|
36
35
|
= bm_currency invoice.total_excluding_taxes
|
|
@@ -32,8 +32,7 @@ table.default.quotations
|
|
|
32
32
|
= quotation.tracking_id
|
|
33
33
|
|
|
34
34
|
td.customer_name
|
|
35
|
-
|
|
36
|
-
= link_to quotation.customer, quotation.customer
|
|
35
|
+
= link_to_object(quotation.customer)
|
|
37
36
|
|
|
38
37
|
td.total_excluding_taxes
|
|
39
38
|
= bm_currency quotation.total_excluding_taxes
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
.panel-body
|
|
7
7
|
= horizontal_form_for @link, as: :link, url: customer_vault_link_form_path do |f|
|
|
8
|
-
= f.association :bob, label: ::Dorsale::CustomerVault::Person.t
|
|
8
|
+
= f.association :bob, label: ::Dorsale::CustomerVault::Person.t, collection: @people
|
|
9
9
|
|
|
10
10
|
= f.input :title
|
|
11
11
|
= form_buttons
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
.panel-body
|
|
14
14
|
= horizontal_form_for @task, as: :task do |f|
|
|
15
|
+
- if @task.taskable
|
|
16
|
+
= f.input :taskable, as: :string, input_html: {value: @task.taskable.to_s, disabled: true}
|
|
17
|
+
|
|
15
18
|
= f.input :name
|
|
16
19
|
= f.input :description
|
|
17
20
|
= f.input :reminder, html5: true
|
|
@@ -4,17 +4,17 @@ table#tasks-list
|
|
|
4
4
|
th.task-status
|
|
5
5
|
th.task-snooze
|
|
6
6
|
th.task-progress.hidden-xs
|
|
7
|
-
= sortable_column Dorsale::Flyboy::Task.t(:progress),
|
|
7
|
+
= sortable_column Dorsale::Flyboy::Task.t(:progress), :progress
|
|
8
8
|
|
|
9
9
|
th.task-name
|
|
10
|
-
= sortable_column Dorsale::Flyboy::Task.t,
|
|
10
|
+
= sortable_column Dorsale::Flyboy::Task.t, :name
|
|
11
11
|
|
|
12
12
|
- unless nested
|
|
13
13
|
th.taskable-name.hidden-xs
|
|
14
|
-
= sortable_column Dorsale::Flyboy::Task.t(:taskable),
|
|
14
|
+
= sortable_column Dorsale::Flyboy::Task.t(:taskable), :taskable
|
|
15
15
|
|
|
16
16
|
th.task-term.hidden-xs
|
|
17
|
-
= sortable_column Dorsale::Flyboy::Task.t(:term),
|
|
17
|
+
= sortable_column Dorsale::Flyboy::Task.t(:term), :term
|
|
18
18
|
|
|
19
19
|
tbody
|
|
20
20
|
- tasks.each do |task|
|
|
@@ -51,17 +51,11 @@ table#tasks-list
|
|
|
51
51
|
= progress_bar percentage: task.progress, label: true
|
|
52
52
|
|
|
53
53
|
td.task-name
|
|
54
|
-
|
|
55
|
-
= link_to task.to_s, dorsale.flyboy_task_path(task)
|
|
56
|
-
- else
|
|
57
|
-
= task.to_s
|
|
54
|
+
= link_to_object(task)
|
|
58
55
|
|
|
59
56
|
- unless nested
|
|
60
57
|
td.taskable-name.hidden-xs
|
|
61
|
-
|
|
62
|
-
= link_to task.taskable.to_s, engine_polymorphic_path(task.taskable)
|
|
63
|
-
- else
|
|
64
|
-
= task.taskable.to_s
|
|
58
|
+
= link_to_object(task.taskable)
|
|
65
59
|
|
|
66
60
|
td.task-term.hidden-xs
|
|
67
61
|
= date(task.term)
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
- tasks.each do |task|
|
|
12
12
|
tr
|
|
13
13
|
td.taskable
|
|
14
|
-
|
|
15
|
-
= task.taskable
|
|
14
|
+
= link_to_object(task.taskable)
|
|
16
15
|
|
|
17
16
|
td.name
|
|
18
17
|
- if task.owner.nil?
|
|
@@ -20,7 +19,7 @@
|
|
|
20
19
|
- else
|
|
21
20
|
= icon(:user)
|
|
22
21
|
|
|
23
|
-
=
|
|
22
|
+
= link_to_object(task)
|
|
24
23
|
|
|
25
24
|
td.date
|
|
26
25
|
.text-muted = date(task.term)
|