aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcedricnjanga2017-09-20 14:34:25 +0200
committercedricnjanga2017-09-20 14:34:25 +0200
commitda74a78fc715b1e909b7ee3207f2b2742c580b2c (patch)
tree5e4c832ade10efa713c2c83f60d718399bd21ed3
parentce579b6fe5edb8f462de45a84ab7f4affe1b525a (diff)
parent2ef17c0f8150d834fdf266c85a3caeed57987dd8 (diff)
downloadchouette-core-da74a78fc715b1e909b7ee3207f2b2742c580b2c.tar.bz2
Merge branch 'master' into Add_included_days_in_periods
-rw-r--r--app/controllers/compliance_control_sets_controller.rb7
-rw-r--r--app/policies/compliance_control_policy.rb4
-rw-r--r--app/views/compliance_control_sets/_filters.html.slim29
-rw-r--r--app/views/compliance_control_sets/index.html.slim10
-rw-r--r--config/initializers/apartment.rb1
-rw-r--r--config/locales/compliance_control_sets.fr.yml5
-rw-r--r--config/locales/compliance_controls.en.yml146
-rw-r--r--config/locales/compliance_controls.fr.yml148
-rw-r--r--config/routes.rb2
-rw-r--r--lib/stif/permission_translator.rb1
-rw-r--r--lib/tasks/referential.rake4
-rw-r--r--spec/support/permissions.rb1
12 files changed, 172 insertions, 186 deletions
diff --git a/app/controllers/compliance_control_sets_controller.rb b/app/controllers/compliance_control_sets_controller.rb
index 1b23becaa..6edfa3fcc 100644
--- a/app/controllers/compliance_control_sets_controller.rb
+++ b/app/controllers/compliance_control_sets_controller.rb
@@ -4,8 +4,9 @@ class ComplianceControlSetsController < BreadcrumbController
def index
index! do |format|
+ @q_for_form = @compliance_control_sets.ransack(params[:q])
format.html {
- @compliance_control_sets = decorate_compliance_control_sets(@compliance_control_sets)
+ @compliance_control_sets = decorate_compliance_control_sets(@q_for_form.result)
}
end
end
@@ -23,11 +24,9 @@ class ComplianceControlSetsController < BreadcrumbController
)
end
- protected
-
private
def compliance_control_set_params
- params.require(:compliance_control_set).permit(:name)
+ params.require(:compliance_control_set).permit(:name, :id)
end
end
diff --git a/app/policies/compliance_control_policy.rb b/app/policies/compliance_control_policy.rb
index aeb0ab0a9..fbea366f5 100644
--- a/app/policies/compliance_control_policy.rb
+++ b/app/policies/compliance_control_policy.rb
@@ -6,7 +6,7 @@ class ComplianceControlPolicy < ApplicationPolicy
end
def destroy?
- organisation_match? && user.has_permission?('compliance_controls.destroy')
+ user.has_permission?('compliance_controls.destroy')
end
def create?
@@ -14,6 +14,6 @@ class ComplianceControlPolicy < ApplicationPolicy
end
def update?
- organisation_match? && user.has_permission?('compliance_controls.update')
+ user.has_permission?('compliance_controls.update')
end
end
diff --git a/app/views/compliance_control_sets/_filters.html.slim b/app/views/compliance_control_sets/_filters.html.slim
index 8da629e9c..7ee050636 100644
--- a/app/views/compliance_control_sets/_filters.html.slim
+++ b/app/views/compliance_control_sets/_filters.html.slim
@@ -1,33 +1,10 @@
-= search_form_for @q_for_form, url: workbench_path(@workbench.id), builder: SimpleForm::FormBuilder, class: 'form form-filter' do |f|
+= search_form_for @q_for_form, url: compliance_control_sets_path, builder: SimpleForm::FormBuilder, class: 'form form-filter' do |f|
.ffg-row
.input-group.search_bar
- = f.search_field :name_cont, class: 'form-control', placeholder: t('referentials.filters.name')
+ = f.search_field :name_cont, class: 'form-control', placeholder: t('compliance_control_sets.filters.name')
span.input-group-btn
button.btn.btn-default type='submit'
span.fa.fa-search
-
- .ffg-row
- .form-group
- = f.label t('activerecord.models.line.one').upcase, required: false, class: 'control-label'
- = f.input :associated_lines_id_eq, as: :select, collection: @workbench.lines.includes(:company).order(:name), input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': t('referentials.filters.line') }, label: false, label_method: :display_name, wrapper_html: { class: 'select2ed'}
-
- .form-group.togglable
- = f.label Referential.human_attribute_name(:status), required: false, class: 'control-label'
- .form-group.checkbox_list
- = f.input :archived_at_not_null, label: ("<span>#{t('activerecord.attributes.referential.archived_at')}<span class='fa fa-archive'></span></span>").html_safe, as: :boolean, wrapper_html: { class: 'checkbox-wrapper' }
- = f.input :archived_at_null, label: ("<span>#{t('activerecord.attributes.referential.archived_at_null')}<span class='sb sb-lg sb-preparing'></span></span>").html_safe, as: :boolean, wrapper_html: { class: 'checkbox-wrapper' }
-
- .form-group.togglable
- = f.label t('activerecord.models.organisation.one'), required: false, class: 'control-label'
- = f.input :organisation_name_eq_any, collection: Organisation.order('name').pluck(:name), as: :check_boxes, label: false, label_method: lambda{|w| ("<span>#{w}</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list' }
-
- .form-group.togglable
- = f.label Referential.human_attribute_name(:validity_period), required: false, class: 'control-label'
- .filter_menu
- = f.simple_fields_for :validity_period do |p|
- = p.input :begin_gteq, as: :date, label: t('simple_form.from'), wrapper_html: { class: 'date smart_date filter_menu-item' }, default: @begin_range, include_blank: @begin_range ? false : true
- = p.input :end_lteq, as: :date, label: t('simple_form.to'), wrapper_html: { class: 'date smart_date filter_menu-item' }, default: @end_range, include_blank: @end_range ? false : true
-
.actions
- = link_to t('actions.erase'), @workbench, class: 'btn btn-link'
+ = link_to t('actions.erase'), @compliance_control_set, class: 'btn btn-link'
= f.submit t('actions.filter'), class: 'btn btn-default', id: 'referential_filter_btn'
diff --git a/app/views/compliance_control_sets/index.html.slim b/app/views/compliance_control_sets/index.html.slim
index fa85c38f7..95833a01c 100644
--- a/app/views/compliance_control_sets/index.html.slim
+++ b/app/views/compliance_control_sets/index.html.slim
@@ -14,7 +14,7 @@
.container-fluid
.row
.col-lg-12
- /= render 'filters'
+ = render 'filters'
.row
.col-lg-12
.select_table
@@ -40,11 +40,15 @@
attribute: 'control_numbers' \
), \
TableBuilderHelper::Column.new( \
- key: :update, \
- attribute: '' \
+ key: :updated_at, \
+ attribute: Proc.new { |n| l(n.updated_at, format: :long) if n.updated_at }, \
) \
],
sortable: true,
cls: 'table has-filter has-search'
+ - unless @compliance_control_sets.any?
+ .row.mt-xs
+ .col-lg-12
+ = replacement_msg t('compliance_control_sets.search_no_results')
diff --git a/config/initializers/apartment.rb b/config/initializers/apartment.rb
index 0d65c3505..b8f86a751 100644
--- a/config/initializers/apartment.rb
+++ b/config/initializers/apartment.rb
@@ -54,6 +54,7 @@ Apartment.configure do |config|
'ComplianceCheckSet',
'ComplianceCheckBlock',
'ComplianceCheckResource',
+ 'ComplianceCheckMessage'
]
# use postgres schemas?
diff --git a/config/locales/compliance_control_sets.fr.yml b/config/locales/compliance_control_sets.fr.yml
index c230d593c..fedfeede7 100644
--- a/config/locales/compliance_control_sets.fr.yml
+++ b/config/locales/compliance_control_sets.fr.yml
@@ -9,6 +9,9 @@ fr:
edit: Editer
destroy: Supprimer
destroy_confirm: Etes vous sûr de supprimer ce jeux de contrôle ?
+ filters:
+ name: 'Indiquez un nom de jeux de contrôle...'
+ search_no_results: 'Aucun jeu de contrôle ne correspond à votre recherche'
activerecord:
models:
compliance_control_set: Calendrier
@@ -18,4 +21,4 @@ fr:
assignment: Affectation
owner_jdc: Propriétaire du jeu de contrôle
control_numbers: Nb contrôle
- update: Mis a jour \ No newline at end of file
+ updated_at: Mis a jour \ No newline at end of file
diff --git a/config/locales/compliance_controls.en.yml b/config/locales/compliance_controls.en.yml
index bad190b56..d9dbc793d 100644
--- a/config/locales/compliance_controls.en.yml
+++ b/config/locales/compliance_controls.en.yml
@@ -1,83 +1,85 @@
en:
compliance_controls:
actions:
- new: Add a new compliance control
- edit: Edit this compliance control
- destroy: Remove this compliance control
- destroy_confirm: Are you sure you want destroy this compliance control?
+ new: "Add a new compliance control"
+ edit: "Edit this compliance control"
+ destroy: "Remove this compliance control"
+ destroy_confirm: "Are you sure you want destroy this compliance control?"
show:
- title: Compliance control
+ title: "Compliance control"
index:
- title: Compliance control
+ title: "Compliance control"
new:
- title: Add a new compliance control
+ title: "Add a new compliance control"
edit:
- title: Update compliance control
+ title: "Update compliance control"
activerecord:
models:
- compliance_control: compliance control
+ compliance_control: "compliance control"
attributes:
compliance_control:
- name: Name
- code: Code
- route:
- zdl_stop_area:
- messages:
- 3_route_1: The route with % objectid connect the stop points % % et % % which belong to the same ZDL
- description: Two stop points which belong to the same ZDL cannot follow one another in a route
- opposite_route:
- messages:
- 3_route_2: The route with % objectid references an incoherent oppposite route : %
- description: |
- 'If the route has an opposite route, it must :
- - reference the opposite route
- - have an opposite route in relation with the tested route'
- duplicates:
- messages:
- 3_route_4: The route with % objectid is identical with another route : %
- description: 2 routes cannot connect the same stop points with the same order and the same boarding and alighting characteristics
- minimum_length:
- messages:
- 3_route_6: The route with % objectid does not connect enough stop points (required 2 stop points)
- description: A route must have at least 2 stop points
- omnibus_journey_pattern:
- messages:
- 3_route_9: The route with % objectid does not have a journey pattern that connect all of its stop points
- description: A journey pattern of a route should connect all of a route's stop points
- unactivated_stop_point:
- messages:
- 3_route_10: L'itinéraire % référence un arrêt (ZDEp) désactivé % (%)
- description: Les arrêts d'un itinéraire ne doivent pas être désactivés
- journey_pattern:
- duplicates:
- messages:
- 3_journeypattern_1: The journey pattern with objectid % is identical with another one : %
- description: Two journey patterns belonging to the same line must not connect the same stop points in the same order
- vehicle_journey:
- waiting_time:
- messages:
- 3_vehiclejourney_1: On the following vehicle journey : %, the waiting time % a this stop point : % (%) is greater than the threshold (%)
- description: The waiting time at a specific stop point cannot be too big
- speed:
- messages:
- 3_vehiclejourney_2_1: On the following vehicle journey : %, the computed speed % between the stop points % (%) and % (%) is greater than the threshold (%)
- 3_vehiclejourney_2_2: On the following vehicle journey : %, the computed speed % between the stop points % (%) and % (%) is smaller than the threshold (%)
- description: The speed between 2 stop points should be confined between two thresholds
- delta:
- messages:
- 3_vehiclejourney_3: The travel time on the vehicle journey with % objectid between the stop points % (%) and % (% is too far off % the average waiting on the journey pattern
- description: The travel time between two following stop points must be close to all the vehicle journey of a journey pattern
- time_table:
- messages:
- 3_vehiclejourney_4: The vehicle journey with % objectid does not have a timetable
- description: A vehicle journey must have at least one timetable
- vehicle_journey_at_stops:
- messages:
- 3_vehiclejourney_5_1: The vehicle journey with % objectid has an arrival time % greater than the departure time % at the stop point % (%)
- 3_vehiclejourney_5_2: The vehicle journey with % objectid has an departure time % at stop point % (%) greater than the arrival % at the next stop point
- description: The arrival time of a stop point must be smaller than the departure time of this stop point AND the departure time of the stop points must be in chronological order
- routing_constraint_zone:
- vehicle_journey_at_stops:
- messages:
- 3_itl_1: The Routing Constraint Zone % references an unactivated stop point (ZDEp) : % (%)
- description: The stop points of a Routing Constraint Zone must be activated
+ name: "Name"
+ criticity: "Criticity"
+ comment: "Comment"
+ code: "Code"
+ route:
+ zdl_stop_area:
+ messages:
+ 3_route_1: "The route with % objectid connect the stop points % % et % % which belong to the same ZDL"
+ description: "Two stop points which belong to the same ZDL cannot follow one another in a route"
+ opposite_route:
+ messages:
+ 3_route_2: "The route with % objectid references an incoherent oppposite route %"
+ description: |
+ "If the route has an opposite route, it must :
+ - reference the opposite route
+ - have an opposite route in relation with the tested route"
+ duplicates:
+ messages:
+ 3_route_4: "The route with % objectid is identical with another route %"
+ description: "2 routes cannot connect the same stop points with the same order and the same boarding and alighting characteristics"
+ minimum_length:
+ messages:
+ 3_route_6: "The route with % objectid does not connect enough stop points (required 2 stop points)"
+ description: "A route must have at least 2 stop points"
+ omnibus_journey_pattern:
+ messages:
+ 3_route_9: "The route with % objectid does not have a journey pattern that connect all of its stop points"
+ description: "A journey pattern of a route should connect all of a route's stop points"
+ unactivated_stop_point:
+ messages:
+ 3_route_10: "L'itinéraire % référence un arrêt (ZDEp) désactivé % (%)"
+ description: "Les arrêts d'un itinéraire ne doivent pas être désactivés"
+ journey_pattern:
+ duplicates:
+ messages:
+ 3_journeypattern_1: "The journey pattern with objectid % is identical with another one %"
+ description: "Two journey patterns belonging to the same line must not connect the same stop points in the same order"
+ vehicle_journey:
+ waiting_time:
+ messages:
+ 3_vehiclejourney_1: "On the following vehicle journey %, the waiting time % a this stop point % (%) is greater than the threshold (%)"
+ description: "The waiting time at a specific stop point cannot be too big"
+ speed:
+ messages:
+ 3_vehiclejourney_2_1: "On the following vehicle journey %, the computed speed % between the stop points % (%) and % (%) is greater than the threshold (%)"
+ 3_vehiclejourney_2_2: "On the following vehicle journey %, the computed speed % between the stop points % (%) and % (%) is smaller than the threshold (%)"
+ description: "The speed between 2 stop points should be confined between two thresholds"
+ delta:
+ messages:
+ 3_vehiclejourney_3: "The travel time on the vehicle journey with % objectid between the stop points % (%) and % (% is too far off % the average waiting on the journey pattern"
+ description: "The travel time between two following stop points must be close to all the vehicle journey of a journey pattern"
+ time_table:
+ messages:
+ 3_vehiclejourney_4: "The vehicle journey with % objectid does not have a timetable"
+ description: "A vehicle journey must have at least one timetable"
+ vehicle_journey_at_stops:
+ messages:
+ 3_vehiclejourney_5_1: "The vehicle journey with % objectid has an arrival time % greater than the departure time % at the stop point % (%)"
+ 3_vehiclejourney_5_2: "The vehicle journey with % objectid has an departure time % at stop point % (%) greater than the arrival % at the next stop point"
+ description: "The arrival time of a stop point must be smaller than the departure time of this stop point AND the departure time of the stop points must be in chronological order"
+ routing_constraint_zone:
+ vehicle_journey_at_stops:
+ messages:
+ 3_itl_1: "The Routing Constraint Zone % references an unactivated stop point (ZDEp) % (%)"
+ description: "The stop points of a Routing Constraint Zone must be activated"
diff --git a/config/locales/compliance_controls.fr.yml b/config/locales/compliance_controls.fr.yml
index 0c96265ac..40f758ee4 100644
--- a/config/locales/compliance_controls.fr.yml
+++ b/config/locales/compliance_controls.fr.yml
@@ -1,85 +1,85 @@
fr:
compliance_controls:
actions:
- new: Ajouter un jeu de controle
- edit: Editer un jeu de controle
- destroy: Supprimer un jeu de controle
- destroy_confirm: Etes vous sûr de vouloir détruire le jeu de controle ?
+ new: "Ajouter un jeu de controle"
+ edit: "Editer un jeu de controle"
+ destroy: "Supprimer un jeu de controle"
+ destroy_confirm: "Etes vous sûr de vouloir détruire le jeu de controle ?"
show:
- title: Jeu de controle
+ title: "Jeu de controle"
index:
- title: Jeux de controles
+ title: "Jeux de controles"
new:
- title: Ajouter un jeu de controle
+ title: "Ajouter un jeu de controle"
edit:
- title: Editer le jeu de controle
+ title: "Editer le jeu de controle"
activerecord:
models:
- compliance_control: Jeu de controle
+ compliance_control: "Jeu de controle"
attributes:
compliance_control:
- name: Nom
- criticity: Criticité
- comment: Commentaire
- code: Code
- route:
- zdl_stop_area:
- messages:
- 3_route_1: L'itinéraire % dessert successivement les arrêts % % et % % de la même zone de lieu
- description: Deux arrêts d’une même ZDL ne peuvent pas se succéder dans un itinéraire
- opposite_route:
- messages:
- 3_route_2: L'itinéraire % référence un itinéraire retour % incohérent
- description: |
- 'Si l'itinéraire référence un itinéraire inverse, celui-ci doit :
- - référencer l'itinéraire inverse
- - avoir un sens opposé à l'itinéraire testé'
- duplicates:
- messages:
- 3_route_4: L'itinéraire % est identique à l'itinéraire %
- description: 2 itinéraires ne doivent pas desservir strictement les mêmes arrêts dans le même ordre avec les mêmes critères de monté/descente
- minimum_length:
- messages:
- 3_route_6: L'itinéraire % ne dessert pas assez d'arrêts (minimum 2 requis)
- description: Un itinéraire doit référencer au moins 2 arrêts
- omnibus_journey_pattern:
- messages:
- 3_route_9: L'itinéraire % n'a aucune mission desservant l'ensemble de ses arrêts
- description: Une mission de l'itinéraire devrait desservir l'ensemble des arrêts de celui-ci
- unactivated_stop_point:
- messages:
- 3_route_10: L'itinéraire % référence un arrêt (ZDEp) désactivé % (%)
- description: Les arrêts d'un itinéraire ne doivent pas être désactivés
- journey_pattern:
- duplicates:
- messages:
- 3_journeypattern_1: La mission % est identique à la mission %
- description: Deux missions de la même ligne ne doivent pas desservir les mêmes arrêts dans le même ordre
- vehicle_journey:
- waiting_time:
- messages:
- 3_vehiclejourney_1: Sur la course %, le temps d'attente % à l'arrêt % (%) est supérieur au seuil toléré (%)
- description: La durée d’attente à un arrêt ne doit pas être trop grande
- speed:
- messages:
- 3_vehiclejourney_2_1: Sur la course %, la vitesse calculée % entre les arrêts % (%) et % (%) est supérieur au seuil toléré (%)
- 3_vehiclejourney_2_2: Sur la course %, la vitesse calculée % entre les arrêts % (%) et % (%) est inférieur au seuil toléré (%)
- description: La vitesse entre deux arrêts doit être dans une fourchette paramétrable
- delta:
- messages:
- 3_vehiclejourney_3: Le temps de parcours sur la course % entre les arrêts % (%) et % (% s'écarte de % du temps moyen constaté sur la mission
- description: Les temps de parcours entre 2 arrêts successifs doivent être similaires pour toutes les courses d’une même mission
- time_table:
- messages:
- 3_vehiclejourney_4: La course % n'a pas de calendrier d'application
- description: Une course doit avoir au moins un calendrier d’application
- vehicle_journey_at_stops:
- messages:
- 3_vehiclejourney_5_1: La course % a un horaire d'arrivé % supérieur à l'horaire de départ % à l'arrêt {nomArrêt} (%)
- 3_vehiclejourney_5_2: La course % a un horaire de départ % à l'arrêt {nomArrêt} (%) supérieur à l'horaire d'arrivé % à l'arrêt suivant
- description: L'horaire d'arrivée à un arrêt doit être antérieur à l'horaire de départ de cet arrêt ET les horaires de départ aux arrêts doivent être dans l'ordre chronologique croissant.
- routing_constraint_zone:
- vehicle_journey_at_stops:
- messages:
- 3_itl_1: L'ITL % référence un arrêt (ZDEp) désactivé % (%)
- description: Les arrêts d'une ITL ne doivent pas être désactivés
+ name: "Nom"
+ criticity: "Criticité"
+ comment: "Commentaire"
+ code: "Code"
+ route:
+ zdl_stop_area:
+ messages:
+ 3_route_1: "L'itinéraire % dessert successivement les arrêts % % et % % de la même zone de lieu"
+ description: "Deux arrêts d’une même ZDL ne peuvent pas se succéder dans un itinéraire"
+ opposite_route:
+ messages:
+ 3_route_2: "L'itinéraire % référence un itinéraire retour % incohérent"
+ description: |
+ "Si l'itinéraire référence un itinéraire inverse, celui-ci doit :
+ - référencer l'itinéraire inverse
+ - avoir un sens opposé à l'itinéraire testé"
+ duplicates:
+ messages:
+ 3_route_4: "L'itinéraire % est identique à l'itinéraire %"
+ description: "2 itinéraires ne doivent pas desservir strictement les mêmes arrêts dans le même ordre avec les mêmes critères de monté/descente"
+ minimum_length:
+ messages:
+ 3_route_6: "L'itinéraire % ne dessert pas assez d'arrêts (minimum 2 requis)"
+ description: "Un itinéraire doit référencer au moins 2 arrêts"
+ omnibus_journey_pattern:
+ messages:
+ 3_route_9: "L'itinéraire % n'a aucune mission desservant l'ensemble de ses arrêts"
+ description: "Une mission de l'itinéraire devrait desservir l'ensemble des arrêts de celui-ci"
+ unactivated_stop_point:
+ messages:
+ 3_route_10: "L'itinéraire % référence un arrêt (ZDEp) désactivé % (%)"
+ description: "Les arrêts d'un itinéraire ne doivent pas être désactivés"
+ journey_pattern:
+ duplicates:
+ messages:
+ 3_journeypattern_1: "La mission % est identique à la mission %"
+ description: "Deux missions de la même ligne ne doivent pas desservir les mêmes arrêts dans le même ordre"
+ vehicle_journey:
+ waiting_time:
+ messages:
+ 3_vehiclejourney_1: "Sur la course %, le temps d'attente % à l'arrêt % (%) est supérieur au seuil toléré (%)"
+ description: "La durée d’attente à un arrêt ne doit pas être trop grande"
+ speed:
+ messages:
+ 3_vehiclejourney_2_1: "Sur la course %, la vitesse calculée % entre les arrêts % (%) et % (%) est supérieur au seuil toléré (%)"
+ 3_vehiclejourney_2_2: "Sur la course %, la vitesse calculée % entre les arrêts % (%) et % (%) est inférieur au seuil toléré (%)"
+ description: "La vitesse entre deux arrêts doit être dans une fourchette paramétrable"
+ delta:
+ messages:
+ 3_vehiclejourney_3: "Le temps de parcours sur la course % entre les arrêts % (%) et % (% s'écarte de % du temps moyen constaté sur la mission"
+ description: "Les temps de parcours entre 2 arrêts successifs doivent être similaires pour toutes les courses d’une même mission"
+ time_table:
+ messages:
+ 3_vehiclejourney_4: "La course % n'a pas de calendrier d'application"
+ description: "Une course doit avoir au moins un calendrier d’application"
+ vehicle_journey_at_stops:
+ messages:
+ 3_vehiclejourney_5_1: "La course % a un horaire d'arrivé % supérieur à l'horaire de départ % à l'arrêt {nomArrêt} (%)"
+ 3_vehiclejourney_5_2: "La course % a un horaire de départ % à l'arrêt {nomArrêt} (%) supérieur à l'horaire d'arrivé % à l'arrêt suivant"
+ description: "L'horaire d'arrivée à un arrêt doit être antérieur à l'horaire de départ de cet arrêt ET les horaires de départ aux arrêts doivent être dans l'ordre chronologique croissant."
+ routing_constraint_zone:
+ vehicle_journey_at_stops:
+ messages:
+ 3_itl_1: "L'ITL % référence un arrêt (ZDEp) désactivé % (%)"
+ description: "Les arrêts d'une ITL ne doivent pas être désactivés"
diff --git a/config/routes.rb b/config/routes.rb
index 97e0257c2..ef625db1f 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -12,8 +12,6 @@ ChouetteIhm::Application.routes.draw do
end
end
- resources :compliance_control_sets
-
devise_for :users, :controllers => {
:registrations => 'users/registrations', :invitations => 'users/invitations'
}
diff --git a/lib/stif/permission_translator.rb b/lib/stif/permission_translator.rb
index d836dd037..2bc565968 100644
--- a/lib/stif/permission_translator.rb
+++ b/lib/stif/permission_translator.rb
@@ -24,6 +24,7 @@ module Stif
time_tables
vehicle_journeys
api_keys
+ compliance_controls
]
end
diff --git a/lib/tasks/referential.rake b/lib/tasks/referential.rake
index d27354a40..7bab6e040 100644
--- a/lib/tasks/referential.rake
+++ b/lib/tasks/referential.rake
@@ -26,11 +26,11 @@ namespace :referential do
route_attrs = { line: line, name: "Route #{name}", published_name: "Published #{name}" }
if i.even?
- route_attrs[:wayback] = :straight_forward
+ route_attrs[:wayback] = :outbound
route = Chouette::Route.create!(route_attrs)
route.stop_areas = stop_areas
else
- route_attrs[:wayback] = :backward
+ route_attrs[:wayback] = :inbound
route_attrs[:opposite_route] = Chouette::Route.last if i == 3
route = Chouette::Route.create!(route_attrs)
route.stop_areas = stop_areas.reverse
diff --git a/spec/support/permissions.rb b/spec/support/permissions.rb
index 83de4e43f..467c07a32 100644
--- a/spec/support/permissions.rb
+++ b/spec/support/permissions.rb
@@ -24,6 +24,7 @@ module Support
routing_constraint_zones
time_tables
vehicle_journeys
+ compliance_controls
]
end
end