diff options
| -rw-r--r-- | app/assets/stylesheets/components/_tables.sass | 10 | ||||
| -rw-r--r-- | app/models/compliance_control.rb | 1 | ||||
| -rw-r--r-- | app/models/generic_attribute_control/min_max.rb | 1 | ||||
| -rw-r--r-- | app/models/generic_attribute_control/pattern.rb | 1 | ||||
| -rw-r--r-- | app/models/generic_attribute_control/uniqueness.rb | 1 | ||||
| -rw-r--r-- | app/models/route_control/minimum_length.rb | 1 | ||||
| -rw-r--r-- | app/models/route_control/opposite_route.rb | 1 | ||||
| -rw-r--r-- | app/models/vehicle_journey_control/time_table.rb | 1 | ||||
| -rw-r--r-- | app/models/vehicle_journey_control/vehicle_journey_at_stops.rb | 1 | ||||
| -rw-r--r-- | app/views/compliance_control_sets/show.html.slim | 10 | ||||
| -rw-r--r-- | app/views/compliance_controls/show.html.slim | 6 | ||||
| -rw-r--r-- | config/locales/compliance_control_sets.en.yml | 3 | ||||
| -rw-r--r-- | config/locales/compliance_control_sets.fr.yml | 3 |
13 files changed, 28 insertions, 12 deletions
diff --git a/app/assets/stylesheets/components/_tables.sass b/app/assets/stylesheets/components/_tables.sass index 8fe7be374..178ec2f36 100644 --- a/app/assets/stylesheets/components/_tables.sass +++ b/app/assets/stylesheets/components/_tables.sass @@ -247,6 +247,16 @@ width: 35px height: 35px margin: 5px + &.with_text + width: initial + > a, > button + border-radius: 4% + text-decoration: none + span + &.fa + padding-left: 10px + span + padding: 0 10px 0 0 > a, > button display: block diff --git a/app/models/compliance_control.rb b/app/models/compliance_control.rb index baf491e8a..08efa7e9a 100644 --- a/app/models/compliance_control.rb +++ b/app/models/compliance_control.rb @@ -24,7 +24,6 @@ class ComplianceControl < ActiveRecord::Base end class << self - def default_criticity; :warning end def default_code; "" end def dynamic_attributes hstore_metadata_for_control_attributes.keys diff --git a/app/models/generic_attribute_control/min_max.rb b/app/models/generic_attribute_control/min_max.rb index a83ab64ab..ab6f546a7 100644 --- a/app/models/generic_attribute_control/min_max.rb +++ b/app/models/generic_attribute_control/min_max.rb @@ -9,7 +9,6 @@ module GenericAttributeControl class << self def attribute_type; :integer end - def default_criticity; :warning end def default_code; "3-Generic-2" end end end diff --git a/app/models/generic_attribute_control/pattern.rb b/app/models/generic_attribute_control/pattern.rb index 027d6948e..3a4a55d5c 100644 --- a/app/models/generic_attribute_control/pattern.rb +++ b/app/models/generic_attribute_control/pattern.rb @@ -7,7 +7,6 @@ module GenericAttributeControl class << self def attribute_type; :string end - def default_criticity; :warning end def default_code; "3-Generic-1" end end end diff --git a/app/models/generic_attribute_control/uniqueness.rb b/app/models/generic_attribute_control/uniqueness.rb index 36a270d74..f707c944b 100644 --- a/app/models/generic_attribute_control/uniqueness.rb +++ b/app/models/generic_attribute_control/uniqueness.rb @@ -6,7 +6,6 @@ module GenericAttributeControl class << self def attribute_type; :string end - def default_criticity; :warning end def default_code; "3-Generic-3" end end end diff --git a/app/models/route_control/minimum_length.rb b/app/models/route_control/minimum_length.rb index 56becfb2b..7aee4da21 100644 --- a/app/models/route_control/minimum_length.rb +++ b/app/models/route_control/minimum_length.rb @@ -1,5 +1,6 @@ module RouteControl class MinimumLength < ComplianceControl + enumerize :criticity, in: %i(error), scope: true, default: :error def self.default_code; "3-Route-6" end end diff --git a/app/models/route_control/opposite_route.rb b/app/models/route_control/opposite_route.rb index 0148087ca..3921bb0a2 100644 --- a/app/models/route_control/opposite_route.rb +++ b/app/models/route_control/opposite_route.rb @@ -1,5 +1,6 @@ module RouteControl class OppositeRoute < ComplianceControl + enumerize :criticity, in: %i(error), scope: true, default: :error def self.default_code; "3-Route-2" end end diff --git a/app/models/vehicle_journey_control/time_table.rb b/app/models/vehicle_journey_control/time_table.rb index 617ead12b..1e3166693 100644 --- a/app/models/vehicle_journey_control/time_table.rb +++ b/app/models/vehicle_journey_control/time_table.rb @@ -1,5 +1,6 @@ module VehicleJourneyControl class TimeTable < ComplianceControl + enumerize :criticity, in: %i(error), scope: true, default: :error def self.default_code; "3-VehicleJourney-4" end end diff --git a/app/models/vehicle_journey_control/vehicle_journey_at_stops.rb b/app/models/vehicle_journey_control/vehicle_journey_at_stops.rb index 47ee26f82..392e7764f 100644 --- a/app/models/vehicle_journey_control/vehicle_journey_at_stops.rb +++ b/app/models/vehicle_journey_control/vehicle_journey_at_stops.rb @@ -1,5 +1,6 @@ module VehicleJourneyControl class VehicleJourneyAtStops < ComplianceControl + enumerize :criticity, in: %i(error), scope: true, default: :error def self.default_code; "3-VehicleJourney-5" end end diff --git a/app/views/compliance_control_sets/show.html.slim b/app/views/compliance_control_sets/show.html.slim index 7767bd0d9..f45b0227a 100644 --- a/app/views/compliance_control_sets/show.html.slim +++ b/app/views/compliance_control_sets/show.html.slim @@ -96,9 +96,13 @@ cls: 'table has-filter has-search' .select_toolbox ul - li.st_action + li.st_action.with_text = link_to select_type_compliance_control_set_compliance_controls_path(@compliance_control_set.id) span.fa.fa-plus - li.st_action + span + = t('compliance_control_sets.actions.add_compliance_control') + li.st_action.with_text = link_to new_compliance_control_set_compliance_control_block_path(@compliance_control_set.id) - span.fa.fa-plus-square + span.fa.fa-plus + span + = t('compliance_control_sets.actions.add_compliance_control_block') diff --git a/app/views/compliance_controls/show.html.slim b/app/views/compliance_controls/show.html.slim index 7f11b1041..12a28cd4b 100644 --- a/app/views/compliance_controls/show.html.slim +++ b/app/views/compliance_controls/show.html.slim @@ -1,8 +1,8 @@ / PageHeader -- header_params = ['jeux-de-controle', += pageheader 'jeux-de-controle', t('compliance_controls.show.title'), - ''] -= pageheader(*header_params) do + '', + link_to(t('actions.edit'), edit_compliance_control_set_compliance_control_path(params[:compliance_control_set_id], params[:id]), class: 'btn btn-default') do / PageContent .page_content diff --git a/config/locales/compliance_control_sets.en.yml b/config/locales/compliance_control_sets.en.yml index 7e5381786..ed7ccad5e 100644 --- a/config/locales/compliance_control_sets.en.yml +++ b/config/locales/compliance_control_sets.en.yml @@ -15,7 +15,8 @@ en: edit: Edit show: Show destroy: Destroy - add_compliance_control: Add a compliance control + add_compliance_control: Compliance Control + add_compliance_control_block: Compliance Control Block destroy_confirm: Are you sur ? filters: name: 'Enter name ...' diff --git a/config/locales/compliance_control_sets.fr.yml b/config/locales/compliance_control_sets.fr.yml index ff559b945..d952567bf 100644 --- a/config/locales/compliance_control_sets.fr.yml +++ b/config/locales/compliance_control_sets.fr.yml @@ -17,7 +17,8 @@ fr: edit: Editer show: Consulter destroy: Supprimer - add_compliance_control: Ajouter un JDC + add_compliance_control: Contrôle + add_compliance_control_block: Groupe de contrôles loaded: Charger le contrôle destroy_confirm: Etes vous sûr de supprimer ce jeux de contrôle ? filters: |
