dorsale 3.4.0 → 3.5.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.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -2
  3. data/app/assets/javascripts/dorsale/common/upload.coffee +25 -0
  4. data/app/assets/javascripts/dorsale/dependencies.coffee +1 -0
  5. data/app/assets/stylesheets/dorsale/all.sass +0 -1
  6. data/app/assets/stylesheets/dorsale/common.sass +0 -4
  7. data/app/assets/stylesheets/dorsale/dependencies.sass +2 -1
  8. data/app/controllers/dorsale/application_controller.rb +2 -2
  9. data/app/controllers/dorsale/flyboy/tasks_controller.rb +3 -3
  10. data/app/filters/dorsale/billing_machine/small_data/filter_for_invoices.rb +5 -5
  11. data/app/filters/dorsale/billing_machine/small_data/filter_for_quotations.rb +5 -5
  12. data/app/filters/dorsale/billing_machine/small_data/filter_strategy_by_customer.rb +1 -1
  13. data/app/filters/dorsale/billing_machine/small_data/filter_strategy_by_payment_status.rb +1 -1
  14. data/app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb +1 -1
  15. data/app/filters/dorsale/customer_vault/small_data/filter_for_people.rb +3 -3
  16. data/app/filters/dorsale/expense_gun/small_data/filter_for_expenses.rb +3 -3
  17. data/app/filters/dorsale/flyboy/small_data/filter_for_tasks.rb +2 -2
  18. data/app/filters/dorsale/flyboy/small_data/filter_strategy_by_done.rb +1 -1
  19. data/app/helpers/dorsale/all_helpers.rb +2 -10
  20. data/app/helpers/dorsale/flyboy/application_helper.rb +2 -2
  21. data/app/models/dorsale/application_record.rb +7 -9
  22. data/app/models/dorsale/customer_vault/person.rb +1 -1
  23. data/app/models/dorsale/flyboy/task.rb +1 -1
  24. data/app/views/dorsale/billing_machine/invoices/_filters.html.slim +2 -2
  25. data/app/views/dorsale/billing_machine/invoices/_show_actions.html.slim +2 -2
  26. data/app/views/dorsale/billing_machine/invoices/index.xlsx.ruby +1 -1
  27. data/app/views/dorsale/billing_machine/quotations/_filters.html.slim +2 -2
  28. data/app/views/dorsale/billing_machine/quotations/_show_actions.html.slim +1 -1
  29. data/app/views/dorsale/customer_vault/people/index.xlsx.ruby +1 -1
  30. data/app/views/dorsale/expense_gun/expenses/_show_actions.html.slim +4 -4
  31. data/app/views/dorsale/flyboy/tasks/index.xlsx.ruby +1 -1
  32. data/config/locales/dorsale.en.yml +11 -1
  33. data/config/locales/dorsale.fr.yml +10 -0
  34. data/config/routes.rb +0 -6
  35. data/lib/dorsale/engine.rb +4 -1
  36. data/lib/dorsale/version.rb +1 -1
  37. metadata +17 -69
  38. data/app/assets/javascripts/dorsale/common/forms.coffee +0 -58
  39. data/app/assets/javascripts/dorsale/common/modals.coffee +0 -126
  40. data/app/assets/stylesheets/dorsale/common/filters.sass +0 -43
  41. data/app/assets/stylesheets/dorsale/common/flash.sass +0 -6
  42. data/app/assets/stylesheets/dorsale/common/modals.sass +0 -45
  43. data/app/assets/stylesheets/dorsale/common/pagination.sass +0 -8
  44. data/app/assets/stylesheets/dorsale/print.sass +0 -74
  45. data/app/controllers/concerns/dorsale/back_url_concern.rb +0 -18
  46. data/app/controllers/dorsale/small_data/filters_controller.rb +0 -36
  47. data/app/filters/dorsale/small_data/filter.rb +0 -68
  48. data/app/filters/dorsale/small_data/filter_strategy.rb +0 -5
  49. data/app/filters/dorsale/small_data/filter_strategy_by_date.rb +0 -6
  50. data/app/filters/dorsale/small_data/filter_strategy_by_date_begin.rb +0 -6
  51. data/app/filters/dorsale/small_data/filter_strategy_by_date_end.rb +0 -6
  52. data/app/filters/dorsale/small_data/filter_strategy_by_key_value.rb +0 -16
  53. data/app/filters/dorsale/small_data/filter_strategy_by_tags.rb +0 -11
  54. data/app/filters/dorsale/small_data/filter_strategy_by_time_period.rb +0 -37
  55. data/app/helpers/dorsale/bootstrap_helper.rb +0 -6
  56. data/app/helpers/dorsale/button_helper.rb +0 -161
  57. data/app/helpers/dorsale/filters_helper.rb +0 -68
  58. data/app/helpers/dorsale/form_helper.rb +0 -49
  59. data/app/helpers/dorsale/link_helper.rb +0 -52
  60. data/app/helpers/dorsale/pagination_helper.rb +0 -6
  61. data/app/helpers/dorsale/routes_helper.rb +0 -20
  62. data/app/helpers/dorsale/sorting_helper.rb +0 -48
  63. data/app/helpers/dorsale/text_helper.rb +0 -121
  64. data/app/libs/dorsale/sortable_uuid_generator.rb +0 -11
  65. data/app/models/concerns/dorsale/active_record_uuid_concern.rb +0 -15
  66. data/app/models/concerns/dorsale/default_values_concern.rb +0 -13
  67. data/app/models/concerns/dorsale/model_i18n.rb +0 -25
  68. data/app/models/concerns/dorsale/model_to_s.rb +0 -9
  69. data/app/models/concerns/dorsale/polymorphic_id.rb +0 -34
  70. data/app/models/concerns/dorsale/search.rb +0 -30
  71. data/app/models/dorsale/small_data.rb +0 -2
  72. data/app/serializers/dorsale/serializers.rb +0 -2
  73. data/app/serializers/dorsale/serializers/base.rb +0 -17
  74. data/app/serializers/dorsale/serializers/xlsx.rb +0 -36
  75. data/app/views/dorsale/search/_form.html.slim +0 -6
  76. data/config/locales/common.en.yml +0 -210
  77. data/config/locales/common.fr.yml +0 -220
  78. data/lib/dorsale/active_record_comma_type_cast.rb +0 -12
  79. data/lib/dorsale/core_and_rails_ext.rb +0 -3
  80. data/lib/dorsale/form_back_url.rb +0 -18
  81. data/spec/controllers/dorsale/small_data/filters_controller_spec.rb +0 -60
  82. data/spec/filters/dorsale/small_data/filter_spec.rb +0 -39
  83. data/spec/helpers/dorsale/form_helper_spec.rb +0 -11
  84. data/spec/helpers/dorsale/link_helper_spec.rb +0 -31
  85. data/spec/helpers/dorsale/sorting_helper_spec.rb +0 -74
  86. data/spec/helpers/dorsale/text_helper_spec.rb +0 -123
  87. data/spec/libs/dorsale/active_record_comma_type_cast_spec.rb +0 -44
  88. data/spec/libs/dorsale/polymorphic_id_spec.rb +0 -30
  89. data/spec/libs/dorsale/sortable_uuid_generator_spec.rb +0 -29
  90. data/spec/models/concerns/dorsale/model_i18n_spec.rb +0 -21
  91. data/spec/routing/dorsale/small_data_routing_spec.rb +0 -15
  92. data/spec/serializers/dorsale/serializers/xlsx_spec.rb +0 -33
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56df4e99e7f2c43e981701c129cb9f16cd795730
4
- data.tar.gz: bf0eccdda5b712abbf01deffc58ae3146daa0499
3
+ metadata.gz: 870af5f1c6e4514f3673393d9d6661f1e2102150
4
+ data.tar.gz: 20fdcbb567db8d19f31413f4e4e64864e6663eac
5
5
  SHA512:
6
- metadata.gz: 2471402877909fd94ad6bb27d0eba98cc362e6cb225c40e73e55e58a7a30654f36f67b2294919f02d3897aafab5a99742b541b733176ee6d66c4ce11d00cd0e4
7
- data.tar.gz: 52908cd5f86c3f8b757a6ecc644970e0e727746165cbe1c213d9c9ec5cf91af7f81eb2e7e7f76ef852ce67ad275b8c48f48a0de89a746735c072a84df20fae19
6
+ metadata.gz: 09af05b5ab27cc8d965a630c54fb8b266e12f16c09f2bafc855f6a0e88a531bb92e94d7f5d0ef11184772f8d172dd46b9550262ef4f3be1ce1065ffa1eb6ad64
7
+ data.tar.gz: eb03d2134bee5347d5959c3a7657af7460a93edd68c5d0f31eda8631e87d078fea0cb85e3f207d7b6eb21e1850d9326cdf34b91c445c838e367ba1303f337456
data/CHANGELOG.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # Changelog
2
2
 
3
- ## Next version
3
+ ## 3.5.0
4
4
 
5
- Nothing.
5
+ - Move helpers/i18n/... to agilibox gem
6
+ - rename `dorsale_button` helper to `bs_button`
7
+ - rename `dorsale_time_periods_for_select` helper to `agilibox_time_periods_for_select`
6
8
 
7
9
  ## 3.4.0
8
10
 
@@ -0,0 +1,25 @@
1
+ # Fake file input (bootstrap style)
2
+ window.setupUploadInputs = (scope = document) ->
3
+ $(scope).find(".form-control.upload").map ->
4
+ container = $(this)
5
+ form = container.parents("form")
6
+ input = container.find("[type=file]")
7
+ label = container.find("label")
8
+ submit = form.find("[type=submit]")
9
+ progress = form.find(".progress")
10
+
11
+ progress.hide() if not xhr2_available()
12
+
13
+ label.map ->
14
+ this.dataset.defaultValue = $(this).html()
15
+
16
+ input.change ->
17
+ if this.value == ""
18
+ submit.prop(disabled: true) if input.hasClass("required")
19
+ label_value = label.data("defaultValue")
20
+ else
21
+ submit.prop(disabled: false)
22
+ label_value = this.value.split("/").pop().split("\\").pop()
23
+
24
+ label.html(label_value)
25
+ input.change()
@@ -11,3 +11,4 @@
11
11
  //= require bootstrap-datepicker/locales/bootstrap-datepicker.fr
12
12
  //= require Chart.bundle
13
13
  //= require chartkick
14
+ //= require agilibox/all
@@ -1,4 +1,3 @@
1
1
  @import dorsale/dependencies
2
2
  @import dorsale/common
3
3
  @import dorsale/engines
4
- @import dorsale/print
@@ -1,10 +1,6 @@
1
1
  @import dorsale/common/comments
2
2
  @import dorsale/common/contexts
3
- @import dorsale/common/filters
4
- @import dorsale/common/flash
5
3
  @import dorsale/common/forms
6
- @import dorsale/common/modals
7
- @import dorsale/common/pagination
8
4
  @import dorsale/common/styles
9
5
  @import dorsale/common/tables
10
6
  @import dorsale/common/upload
@@ -3,6 +3,7 @@
3
3
  @import font-awesome-sprockets
4
4
  @import font-awesome
5
5
  @import bootstrap-datepicker3
6
-
7
6
  @import select2
8
7
  @import select2-bootstrap
8
+
9
+ @import agilibox/all
@@ -1,7 +1,7 @@
1
1
  class Dorsale::ApplicationController < ::ApplicationController
2
2
  include Pundit
3
- include Dorsale::BackUrlConcern
4
- include Dorsale::SortingHelper
3
+ include Agilibox::BackUrlConcern
4
+ include Agilibox::SortingHelper
5
5
 
6
6
  after_action :verify_authorized
7
7
  after_action :verify_policy_scoped
@@ -17,11 +17,11 @@ class Dorsale::Flyboy::TasksController < ::Dorsale::Flyboy::ApplicationControlle
17
17
 
18
18
  @order ||= sortable_column_order do |column, direction|
19
19
  case column
20
- when "name", "status"
20
+ when :name, :status
21
21
  %(LOWER(dorsale_flyboy_tasks.#{column}) #{direction})
22
- when "progress", "term"
22
+ when :progress, :term
23
23
  %(dorsale_flyboy_tasks.#{column} #{direction})
24
- when "taskable"
24
+ when :taskable
25
25
  if direction == :asc
26
26
  proc { |a, b| a.taskable.to_s.downcase <=> b.taskable.to_s.downcase }
27
27
  else
@@ -1,9 +1,9 @@
1
- class Dorsale::BillingMachine::SmallData::FilterForInvoices < ::Dorsale::SmallData::Filter
1
+ class Dorsale::BillingMachine::SmallData::FilterForInvoices < ::Agilibox::SmallData::Filter
2
2
  STRATEGIES = {
3
- "customer_guid" => ::Dorsale::BillingMachine::SmallData::FilterStrategyByCustomer.new,
4
- "bm_time_period" => ::Dorsale::SmallData::FilterStrategyByTimePeriod.new(:date),
5
- "bm_date_begin" => ::Dorsale::SmallData::FilterStrategyByDateBegin.new(:date),
6
- "bm_date_end" => ::Dorsale::SmallData::FilterStrategyByDateEnd.new(:date),
3
+ "bm_time_period" => ::Agilibox::SmallData::FilterStrategyByTimePeriod.new(:date),
4
+ "bm_date_begin" => ::Agilibox::SmallData::FilterStrategyByDateBegin.new(:date),
5
+ "bm_date_end" => ::Agilibox::SmallData::FilterStrategyByDateEnd.new(:date),
6
+ "bm_customer_guid" => ::Dorsale::BillingMachine::SmallData::FilterStrategyByCustomer.new,
7
7
  "bm_payment_status" => ::Dorsale::BillingMachine::SmallData::FilterStrategyByPaymentStatus.new,
8
8
  }
9
9
  end
@@ -1,9 +1,9 @@
1
- class Dorsale::BillingMachine::SmallData::FilterForQuotations < ::Dorsale::SmallData::Filter
1
+ class Dorsale::BillingMachine::SmallData::FilterForQuotations < ::Agilibox::SmallData::Filter
2
2
  STRATEGIES = {
3
- "customer_guid" => ::Dorsale::BillingMachine::SmallData::FilterStrategyByCustomer.new,
4
- "bm_time_period" => ::Dorsale::SmallData::FilterStrategyByTimePeriod.new(:date),
5
- "bm_date_begin" => ::Dorsale::SmallData::FilterStrategyByDateBegin.new(:date),
6
- "bm_date_end" => ::Dorsale::SmallData::FilterStrategyByDateEnd.new(:date),
3
+ "bm_time_period" => ::Agilibox::SmallData::FilterStrategyByTimePeriod.new(:date),
4
+ "bm_date_begin" => ::Agilibox::SmallData::FilterStrategyByDateBegin.new(:date),
5
+ "bm_date_end" => ::Agilibox::SmallData::FilterStrategyByDateEnd.new(:date),
6
+ "bm_customer_guid" => ::Dorsale::BillingMachine::SmallData::FilterStrategyByCustomer.new,
7
7
  "bm_quotation_state" => ::Dorsale::BillingMachine::SmallData::FilterStrategyByState.new,
8
8
  }
9
9
  end
@@ -1,4 +1,4 @@
1
- class Dorsale::BillingMachine::SmallData::FilterStrategyByCustomer < ::Dorsale::SmallData::FilterStrategy
1
+ class Dorsale::BillingMachine::SmallData::FilterStrategyByCustomer < ::Agilibox::SmallData::FilterStrategy
2
2
  def apply(query, value)
3
3
  type, id = value.split("-", 2)
4
4
  query.where(customer_type: type, customer_id: id)
@@ -1,4 +1,4 @@
1
- class Dorsale::BillingMachine::SmallData::FilterStrategyByPaymentStatus < ::Dorsale::SmallData::FilterStrategy
1
+ class Dorsale::BillingMachine::SmallData::FilterStrategyByPaymentStatus < ::Agilibox::SmallData::FilterStrategy
2
2
  def apply(query, value)
3
3
  table_name = query.model.table_name
4
4
 
@@ -1,4 +1,4 @@
1
- class Dorsale::BillingMachine::SmallData::FilterStrategyByState < ::Dorsale::SmallData::FilterStrategy
1
+ class Dorsale::BillingMachine::SmallData::FilterStrategyByState < ::Agilibox::SmallData::FilterStrategy
2
2
  def apply(query, value)
3
3
  if value.to_s.match(/not_(.+)/)
4
4
  query.where("state != ?", $~[1])
@@ -1,6 +1,6 @@
1
- class Dorsale::CustomerVault::SmallData::FilterForPeople < ::Dorsale::SmallData::Filter
1
+ class Dorsale::CustomerVault::SmallData::FilterForPeople < ::Agilibox::SmallData::Filter
2
2
  STRATEGIES = {
3
- "person_type" => ::Dorsale::SmallData::FilterStrategyByKeyValue.new(:type),
4
- "person_tags" => ::Dorsale::SmallData::FilterStrategyByTags.new,
3
+ "person_type" => ::Agilibox::SmallData::FilterStrategyByKeyValue.new(:type),
4
+ "person_tags" => ::Agilibox::SmallData::FilterStrategyByTags.new,
5
5
  }
6
6
  end
@@ -1,6 +1,6 @@
1
- class Dorsale::ExpenseGun::SmallData::FilterForExpenses < ::Dorsale::SmallData::Filter
1
+ class Dorsale::ExpenseGun::SmallData::FilterForExpenses < ::Agilibox::SmallData::Filter
2
2
  STRATEGIES = {
3
- "expense_state" => ::Dorsale::SmallData::FilterStrategyByKeyValue.new("state"),
4
- "expense_user_id" => ::Dorsale::SmallData::FilterStrategyByKeyValue.new("user_id"),
3
+ "expense_state" => ::Agilibox::SmallData::FilterStrategyByKeyValue.new("state"),
4
+ "expense_user_id" => ::Agilibox::SmallData::FilterStrategyByKeyValue.new("user_id"),
5
5
  }
6
6
  end
@@ -1,6 +1,6 @@
1
- class Dorsale::Flyboy::SmallData::FilterForTasks < ::Dorsale::SmallData::Filter
1
+ class Dorsale::Flyboy::SmallData::FilterForTasks < ::Agilibox::SmallData::Filter
2
2
  STRATEGIES = {
3
3
  "fb_status" => ::Dorsale::Flyboy::SmallData::FilterStrategyByDone.new,
4
- "fb_owner" => ::Dorsale::SmallData::FilterStrategyByKeyValue.new(:owner_id)
4
+ "fb_owner" => ::Agilibox::SmallData::FilterStrategyByKeyValue.new(:owner_id)
5
5
  }
6
6
  end
@@ -1,4 +1,4 @@
1
- class Dorsale::Flyboy::SmallData::FilterStrategyByDone < ::Dorsale::SmallData::FilterStrategy
1
+ class Dorsale::Flyboy::SmallData::FilterStrategyByDone < ::Agilibox::SmallData::FilterStrategy
2
2
  def apply(query, value)
3
3
  value = (value == "closed")
4
4
  query.where(done: value)
@@ -1,18 +1,10 @@
1
1
  module Dorsale::AllHelpers
2
2
  include ::ActionView::Helpers::NumberHelper
3
+ include ::Agilibox::AllHelpers
3
4
 
4
- include ::Dorsale::ButtonHelper
5
- include ::Dorsale::CommentsHelper
6
5
  include ::Dorsale::ContextHelper
7
- include ::Dorsale::FiltersHelper
8
- include ::Dorsale::FormHelper
9
- include ::Dorsale::LinkHelper
10
- include ::Dorsale::PaginationHelper
11
- include ::Dorsale::RoutesHelper
12
- include ::Dorsale::TextHelper
13
- include ::Dorsale::BootstrapHelper
14
- include ::Dorsale::SortingHelper
15
6
 
7
+ include ::Dorsale::CommentsHelper
16
8
  include ::Dorsale::Alexandrie::AttachmentsHelper
17
9
  include ::Dorsale::BillingMachine::ApplicationHelper
18
10
  include ::Dorsale::Flyboy::ApplicationHelper
@@ -4,9 +4,9 @@ module Dorsale::Flyboy::ApplicationHelper
4
4
 
5
5
  order ||= sortable_column_order do |column, direction|
6
6
  case column
7
- when "name", "status"
7
+ when :name, :status
8
8
  %(LOWER(dorsale_flyboy_tasks.#{column}) #{direction})
9
- when "progress", "term"
9
+ when :progress, :term
10
10
  %(dorsale_flyboy_tasks.#{column} #{direction})
11
11
  else
12
12
  params["sort"] = "term"
@@ -1,13 +1,11 @@
1
- require "dorsale/search"
2
-
3
1
  class Dorsale::ApplicationRecord < ActiveRecord::Base
4
2
  self.abstract_class = true
5
3
 
6
- include Dorsale::ActiveRecordUUIDConcern
7
- include Dorsale::DefaultValuesConcern
8
- include Dorsale::ModelToS
9
- include Dorsale::ModelI18n
10
- include Dorsale::PolymorphicId
4
+ include Agilibox::ActiveRecordUUIDConcern
5
+ include Agilibox::DefaultValuesConcern
6
+ include Agilibox::ModelToS
7
+ include Agilibox::ModelI18n
8
+ include Agilibox::PolymorphicId
11
9
 
12
10
  nilify_blanks
13
11
 
@@ -16,5 +14,5 @@ class Dorsale::ApplicationRecord < ActiveRecord::Base
16
14
  end
17
15
  end
18
16
 
19
- ActsAsTaggableOn::Tagging.send(:include, Dorsale::ActiveRecordUUIDConcern)
20
- ActsAsTaggableOn::Tag.send(:include, Dorsale::ActiveRecordUUIDConcern)
17
+ ActsAsTaggableOn::Tagging.send(:include, Agilibox::ActiveRecordUUIDConcern)
18
+ ActsAsTaggableOn::Tag.send(:include, Agilibox::ActiveRecordUUIDConcern)
@@ -2,7 +2,7 @@ class Dorsale::CustomerVault::Person < ::Dorsale::ApplicationRecord
2
2
  self.table_name = "dorsale_customer_vault_people"
3
3
 
4
4
  extend Forwardable
5
- include ::Dorsale::Search
5
+ include ::Agilibox::Search
6
6
  include ::Dorsale::Users::Avatar
7
7
 
8
8
  def self.policy_class
@@ -1,7 +1,7 @@
1
1
  class Dorsale::Flyboy::Task < ::Dorsale::ApplicationRecord
2
2
  self.table_name = "dorsale_flyboy_tasks"
3
3
 
4
- include ::Dorsale::Search
4
+ include ::Agilibox::Search
5
5
 
6
6
  paginates_per 50
7
7
 
@@ -1,11 +1,11 @@
1
1
  = filters_form do |f|
2
- = f.input(:customer_guid,
2
+ = f.input(:bm_customer_guid,
3
3
  :collection => @people.map { |p| [p.to_s, p.guid] },
4
4
  :include_blank => t("filters.all_customers"),
5
5
  )
6
6
 
7
7
  = f.input(:bm_time_period,
8
- :collection => dorsale_time_periods_for_select,
8
+ :collection => agilibox_time_periods_for_select,
9
9
  :include_blank => false,
10
10
  )
11
11
 
@@ -2,7 +2,7 @@
2
2
  = update_button dorsale.edit_billing_machine_invoice_path(@invoice)
3
3
 
4
4
  - unless @invoice.paid?
5
- = dorsale_button dorsale.pay_billing_machine_invoice_path(@invoice), icon: :check, action: :paid, method: :patch
5
+ = bs_button dorsale.pay_billing_machine_invoice_path(@invoice), icon: :check, action: :paid, method: :patch
6
6
 
7
7
  - if policy(@invoice).download?
8
8
  = download_button dorsale.billing_machine_invoice_path(@invoice, format: :pdf)
@@ -11,4 +11,4 @@
11
11
  = copy_button dorsale.copy_billing_machine_invoice_path(@invoice)
12
12
 
13
13
  - if policy(@invoice).email?
14
- = dorsale_button dorsale.email_billing_machine_invoice_path(@invoice), icon: :send, action: :email
14
+ = bs_button dorsale.email_billing_machine_invoice_path(@invoice), icon: :send, action: :email
@@ -38,4 +38,4 @@ data = [
38
38
  ]
39
39
  end
40
40
 
41
- Dorsale::Serializers::XLSX.new(data).render_inline
41
+ Agilibox::Serializers::XLSX.new(data).render_inline
@@ -1,11 +1,11 @@
1
1
  = filters_form do |f|
2
- = f.input(:customer_guid,
2
+ = f.input(:bm_customer_guid,
3
3
  :collection => @people.map { |p| [p.to_s, p.guid] },
4
4
  :include_blank => t("filters.all_customers"),
5
5
  )
6
6
 
7
7
  = f.input(:bm_time_period,
8
- :collection => dorsale_time_periods_for_select,
8
+ :collection => agilibox_time_periods_for_select,
9
9
  :include_blank => false,
10
10
  )
11
11
 
@@ -8,7 +8,7 @@
8
8
  = copy_button dorsale.copy_billing_machine_quotation_path(@quotation), method: :post, confirm: true
9
9
 
10
10
  - if policy(@quotation).create?
11
- = dorsale_button dorsale.create_invoice_billing_machine_quotation_path(@quotation), action: :create_invoice, icon: :magic
11
+ = bs_button dorsale.create_invoice_billing_machine_quotation_path(@quotation), action: :create_invoice, icon: :magic
12
12
 
13
13
  - if policy(@quotation).delete?
14
14
  = delete_button dorsale.billing_machine_quotation_path(@quotation)
@@ -46,4 +46,4 @@ data << fields.map { |field| model.t(field) }
46
46
  data << line
47
47
  end
48
48
 
49
- Dorsale::Serializers::XLSX.new(data).render_inline
49
+ Agilibox::Serializers::XLSX.new(data).render_inline
@@ -5,15 +5,15 @@
5
5
  = copy_button dorsale.copy_expense_gun_expense_path(@expense)
6
6
 
7
7
  - if policy(@expense).submit?
8
- = dorsale_button dorsale.submit_expense_gun_expense_path(@expense), action: :submit, method: "patch", confirm: true, icon: :check, class: "btn btn-xs btn-primary"
8
+ = bs_button dorsale.submit_expense_gun_expense_path(@expense), action: :submit, method: "patch", confirm: true, icon: :check, class: "btn btn-xs btn-primary"
9
9
 
10
10
  - if policy(@expense).accept?
11
- = dorsale_button dorsale.accept_expense_gun_expense_path(@expense), action: :accept, method: "patch", confirm: true, icon: :check, class: "btn btn-xs btn-success"
11
+ = bs_button dorsale.accept_expense_gun_expense_path(@expense), action: :accept, method: "patch", confirm: true, icon: :check, class: "btn btn-xs btn-success"
12
12
 
13
13
  - if policy(@expense).refuse?
14
- = dorsale_button dorsale.refuse_expense_gun_expense_path(@expense), action: :refuse, method: "patch", confirm: true, icon: :ban, class: "btn btn-xs btn-danger"
14
+ = bs_button dorsale.refuse_expense_gun_expense_path(@expense), action: :refuse, method: "patch", confirm: true, icon: :ban, class: "btn btn-xs btn-danger"
15
15
 
16
16
  - if policy(@expense).cancel?
17
- = dorsale_button dorsale.cancel_expense_gun_expense_path(@expense), action: :cancel, method: "patch", confirm: true, icon: :times, class: "btn btn-xs btn-warning"
17
+ = bs_button dorsale.cancel_expense_gun_expense_path(@expense), action: :cancel, method: "patch", confirm: true, icon: :times, class: "btn btn-xs btn-warning"
18
18
 
19
19
  = print_button
@@ -18,4 +18,4 @@ data = [
18
18
  ]
19
19
  end
20
20
 
21
- Dorsale::Serializers::XLSX.new(data).render_inline
21
+ Agilibox::Serializers::XLSX.new(data).render_inline
@@ -23,4 +23,14 @@ en:
23
23
  subtitle: "Congratulation for your new account"
24
24
  login: "Your login is: %{login}"
25
25
  password: "Your password is: %{password}"
26
- url_label: "Click here to access service"
26
+ url_label: "Click here to access service"
27
+
28
+ activerecord:
29
+ models:
30
+ dorsale/address:
31
+ one: "Address"
32
+ other: "Addresses"
33
+
34
+ dorsale/comment:
35
+ one: "Comment"
36
+ other: "Comments"
@@ -24,3 +24,13 @@ fr:
24
24
  login: "Votre login est: %{login}"
25
25
  password: "Votre mot de passe est: %{password}"
26
26
  url_label: "Cliquez ici pour accéder au service"
27
+
28
+ activerecord:
29
+ models:
30
+ dorsale/address:
31
+ one: "Adresse"
32
+ other: "Adresses"
33
+
34
+ dorsale/comment:
35
+ one: "Commentaire"
36
+ other: "Commentaires"
data/config/routes.rb CHANGED
@@ -7,12 +7,6 @@ Dorsale::Engine.routes.draw do
7
7
 
8
8
  resources :users, except: [:destroy]
9
9
 
10
- # Small Sata / Filters
11
-
12
- namespace :small_data do
13
- resources :filters, only: [:create]
14
- end
15
-
16
10
  # Alexandrie / Attachments
17
11
 
18
12
  namespace :alexandrie do
@@ -25,6 +25,9 @@ require "prawn/table"
25
25
  require "combine_pdf"
26
26
  require "nilify_blanks"
27
27
  require "chartkick"
28
+ require "axlsx"
29
+
30
+ require "agilibox"
28
31
 
29
32
  if Rails.env.test? || Rails.env.development?
30
33
  require "pry"
@@ -70,4 +73,4 @@ module Dorsale
70
73
  end
71
74
  end
72
75
 
73
- require_relative "core_and_rails_ext"
76
+ require_relative "file_loader"