diff options
| author | Guillaume | 2017-09-28 12:32:09 +0200 |
|---|---|---|
| committer | Guillaume | 2017-09-28 12:32:09 +0200 |
| commit | 2867f7b992ea38934f69e86dd8d6dc9cc95b0afe (patch) | |
| tree | bdc758bfd41f55e9ce08203e011a79eb2e84bd35 | |
| parent | 290516ea175158ffb388734375c17143dfb794f5 (diff) | |
| download | chouette-core-2867f7b992ea38934f69e86dd8d6dc9cc95b0afe.tar.bz2 | |
fix locales translations, remove unused array for date filters
| -rw-r--r-- | app/controllers/compliance_check_sets_controller.rb | 2 | ||||
| -rw-r--r-- | app/views/compliance_check_sets/_filters.html.slim | 2 | ||||
| -rw-r--r-- | app/views/compliance_check_sets/index.html.slim | 4 | ||||
| -rw-r--r-- | app/views/compliance_check_sets/show.html.slim | 3 | ||||
| -rw-r--r-- | app/views/compliance_control_sets/index.html.slim | 10 | ||||
| -rw-r--r-- | config/locales/compliance_check_sets.en.yml | 20 | ||||
| -rw-r--r-- | config/locales/compliance_check_sets.fr.yml | 8 | ||||
| -rw-r--r-- | config/locales/compliance_control_sets.en.yml | 2 | ||||
| -rw-r--r-- | config/locales/compliance_control_sets.fr.yml | 2 | ||||
| -rw-r--r-- | lib/stif/permission_translator.rb | 3 |
10 files changed, 26 insertions, 30 deletions
diff --git a/app/controllers/compliance_check_sets_controller.rb b/app/controllers/compliance_check_sets_controller.rb index 7d964731d..d61fbafdb 100644 --- a/app/controllers/compliance_check_sets_controller.rb +++ b/app/controllers/compliance_check_sets_controller.rb @@ -30,7 +30,7 @@ class ComplianceCheckSetsController < BreadcrumbController start_date << params[:q][:created_at]["begin(#{key}i)"].to_i end_date << params[:q][:created_at]["end(#{key}i)"].to_i end - params[:q].delete([:created_at]) + params[:q].delete(:created_at) @begin_range = DateTime.new(*start_date, 0, 0, 0) rescue nil @end_range = DateTime.new(*end_date, 23, 59, 59) rescue nil end diff --git a/app/views/compliance_check_sets/_filters.html.slim b/app/views/compliance_check_sets/_filters.html.slim index b589e381f..609754eec 100644 --- a/app/views/compliance_check_sets/_filters.html.slim +++ b/app/views/compliance_check_sets/_filters.html.slim @@ -8,7 +8,7 @@ .ffg-row .form-group.togglable - = f.label t('activerecord.attributes.compliance_check_set.assignment'), required: false, class: 'control-label' + = f.label t('activerecord.attributes.compliance_check_set.assigned_to'), required: false, class: 'control-label' = f.input :parent_type_eq_any, collection: ComplianceCheckSet.order('parent_type'), as: :check_boxes, label: false, label_method: lambda {|w| ("<span>#{w}</span>").html_safe}, required: false, wrapper_html: {class: 'checkbox_list'} .form-group.togglable diff --git a/app/views/compliance_check_sets/index.html.slim b/app/views/compliance_check_sets/index.html.slim index 3e9b05393..38c4babcf 100644 --- a/app/views/compliance_check_sets/index.html.slim +++ b/app/views/compliance_check_sets/index.html.slim @@ -35,11 +35,11 @@ end \ ), \ TableBuilderHelper::Column.new( \ - key: :assignment, \ + key: :assigned_to, \ attribute: 'parent_type' \ ), \ TableBuilderHelper::Column.new(\ - key: :control_game, \ + key: :compliance_control_set, \ attribute: Proc.new{ |n| (n.compliance_control_set.name) if n.compliance_control_set} \ ), \ ], diff --git a/app/views/compliance_check_sets/show.html.slim b/app/views/compliance_check_sets/show.html.slim index 1b96b70fc..4e965947d 100644 --- a/app/views/compliance_check_sets/show.html.slim +++ b/app/views/compliance_check_sets/show.html.slim @@ -1,7 +1,6 @@ / PageHeader = pageheader 'jeux-de-donnees', - @compliance_check_set.referential.name, - 'Lorem ipsum dolor sit amet' + @compliance_check_set.referential.name / PageContent .page_content .container-fluid diff --git a/app/views/compliance_control_sets/index.html.slim b/app/views/compliance_control_sets/index.html.slim index aee1595ef..ecb4eb75b 100644 --- a/app/views/compliance_control_sets/index.html.slim +++ b/app/views/compliance_control_sets/index.html.slim @@ -19,7 +19,7 @@ .col-lg-12 .select_table = table_builder_2 @compliance_control_sets, - [ \ + [ \ TableBuilderHelper::Column.new( \ key: :name, \ attribute: 'name', \ @@ -28,7 +28,7 @@ end \ ), \ TableBuilderHelper::Column.new( \ - key: :assignment, \ + key: :assigned_to, \ attribute: 'assignment' \ ), \ TableBuilderHelper::Column.new( \ @@ -44,9 +44,9 @@ attribute: Proc.new { |n| l(n.updated_at, format: :long) if n.updated_at }, \ ) \ ], - sortable: true, - links: [:show], - cls: 'table has-filter has-search' + sortable: true, + links: [:show], + cls: 'table has-filter has-search' - unless @compliance_control_sets.any? .row.mt-xs .col-lg-12 diff --git a/config/locales/compliance_check_sets.en.yml b/config/locales/compliance_check_sets.en.yml index b4b9aa1a1..89c142a49 100644 --- a/config/locales/compliance_check_sets.en.yml +++ b/config/locales/compliance_check_sets.en.yml @@ -1,25 +1,23 @@ -fr: +en: compliance_check_sets: index: title: Control reports new: Creating a Control Report - edit: Editing a Control Report + edit: Update a Control Report actions: - new: Add - edit: Edit + new: Add a control report + edit: Edit a control report destroy: Delete - destroy_confirm: Are you sure to delete this control report ? + destroy_confirm: Are you sure you want to delete this control report? filters: name: Specify a control report name... - error_period_filter: End date must be greater or equal than begin date + error_period_filter: End date must be greater than or equal to begin date search_no_results: No control reports match your search activerecord: - models: - compliance_check_set: Calendrier attributes: compliance_check_set: ref: réf - creation_date: Date and time of creation + creation_date: Created at associated_object: Associated object - assignment: Affectation - control_game: Control Game + assigned_to: Assigned to + compliance_control_set: Compliance control set diff --git a/config/locales/compliance_check_sets.fr.yml b/config/locales/compliance_check_sets.fr.yml index d50bdbfa3..8c21f33fd 100644 --- a/config/locales/compliance_check_sets.fr.yml +++ b/config/locales/compliance_check_sets.fr.yml @@ -11,15 +11,13 @@ fr: destroy_confirm: Etes vous sûr de supprimer ce rapport de contrôle ? filters: name: Indiquez un nom d'un objet associé... - error_period_filter: La date de fin doit être supérieure ou égale à la date de début + error_period_filter: La date de fin doit être supérieure ou égale à la date de début0 search_no_results: Aucun rapport de contrôle ne correspond à votre recherche activerecord: - models: - compliance_check_set: Calendrier attributes: compliance_check_set: ref: réf creation_date: Date et heure de création associated_object: Objet associé - assignment: Affectation - control_game: jeu de contrôle + assigned_to: Affectation + compliance_control_set: jeu de contrôle diff --git a/config/locales/compliance_control_sets.en.yml b/config/locales/compliance_control_sets.en.yml index 497ca50c3..5426233bd 100644 --- a/config/locales/compliance_control_sets.en.yml +++ b/config/locales/compliance_control_sets.en.yml @@ -18,7 +18,7 @@ fr: attributes: compliance_control_set: name: Name - assignment: Affectation + assigned_to: Assigned to owner_jdc: Owner of the control game control_numbers: Nb contrôle updated_at: Update
\ No newline at end of file diff --git a/config/locales/compliance_control_sets.fr.yml b/config/locales/compliance_control_sets.fr.yml index f5bb7c67b..42baf0fcf 100644 --- a/config/locales/compliance_control_sets.fr.yml +++ b/config/locales/compliance_control_sets.fr.yml @@ -18,7 +18,7 @@ fr: attributes: compliance_control_set: name: Nom - assignment: Affectation + assigned_to: Affectation owner_jdc: Propriétaire du jeu de contrôle control_numbers: Nb contrôle updated_at: Mis a jour
\ No newline at end of file diff --git a/lib/stif/permission_translator.rb b/lib/stif/permission_translator.rb index 9a82e733c..d8f898b62 100644 --- a/lib/stif/permission_translator.rb +++ b/lib/stif/permission_translator.rb @@ -21,7 +21,8 @@ module Stif calendars footnotes journey_patterns - referentials routes + referentials + routes routing_constraint_zones time_tables vehicle_journeys |
