aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INSTALL.md6
-rw-r--r--app/assets/stylesheets/components/_main_nav.sass32
-rw-r--r--app/controllers/compliance_check_messages_controller.rb34
-rw-r--r--app/controllers/compliance_check_sets_controller.rb4
-rw-r--r--app/controllers/import_messages_controller.rb2
-rw-r--r--app/helpers/compliance_check_resources_helper.rb12
-rw-r--r--app/javascript/helpers/save_button.js47
-rw-r--r--app/javascript/journey_patterns/components/SaveJourneyPattern.js38
-rw-r--r--app/javascript/vehicle_journeys/components/SaveVehicleJourneys.js38
-rw-r--r--app/javascript/vehicle_journeys/reducers/modal.js9
-rw-r--r--app/javascript/vehicle_journeys/reducers/vehicleJourneys.js2
-rw-r--r--app/models/chouette/company.rb2
-rw-r--r--app/models/chouette/line.rb2
-rw-r--r--app/models/chouette/network.rb2
-rw-r--r--app/models/chouette/stop_area.rb2
-rw-r--r--app/models/chouette/vehicle_journey_at_stop.rb1
-rw-r--r--app/models/compliance_check_message_export.rb46
-rw-r--r--app/models/compliance_check_set.rb8
-rw-r--r--app/models/concerns/checksum_support.rb1
-rw-r--r--app/models/custom_field.rb3
-rw-r--r--app/models/import_message_export.rb4
-rw-r--r--app/models/merge.rb1
-rw-r--r--app/models/referential.rb40
-rw-r--r--app/models/workbench.rb7
-rw-r--r--app/models/workgroup.rb1
-rw-r--r--app/views/compliance_check_sets/executed.html.slim2
-rw-r--r--app/views/compliance_check_sets/index.html.slim10
-rw-r--r--app/views/compliance_check_sets/show.html.slim43
-rw-r--r--app/views/import_resources/index.html.slim2
-rw-r--r--app/views/referential_vehicle_journeys/index.html.slim2
-rw-r--r--app/views/stop_areas/_form.html.slim2
-rw-r--r--app/views/vehicle_journeys/index.html.slim2
-rw-r--r--app/views/workbenches/_filters.html.slim8
-rw-r--r--config/breadcrumbs.rb5
-rw-r--r--config/locales/compliance_check_messages.en.yml31
-rw-r--r--config/locales/compliance_check_messages.fr.yml31
-rw-r--r--config/locales/compliance_check_results.en.yml2
-rw-r--r--config/locales/compliance_check_results.fr.yml2
-rw-r--r--config/locales/compliance_check_sets.en.yml15
-rw-r--r--config/locales/compliance_check_sets.fr.yml21
-rw-r--r--config/locales/import_messages.en.yml103
-rw-r--r--config/locales/import_messages.fr.yml103
-rw-r--r--config/locales/lines.en.yml4
-rw-r--r--config/locales/lines.fr.yml4
-rw-r--r--config/locales/stop_areas.en.yml4
-rw-r--r--config/locales/stop_areas.fr.yml4
-rw-r--r--config/routes.rb1
-rw-r--r--db/schema.rb6
-rw-r--r--lib/tasks/referential.rake43
-rw-r--r--package.json2
-rw-r--r--spec/features/compliance_check_sets_spec.rb2
-rw-r--r--spec/features/workbenches/workbenches_show_spec.rb72
-rw-r--r--spec/javascript/time_table/reducers/timetable_spec.js3
-rw-r--r--spec/javascript/vehicle_journeys/components/CustomFieldsInputs_spec.js1
-rw-r--r--spec/javascript/vehicle_journeys/reducers/vehicleJourneys_spec.js77
-rw-r--r--spec/models/custom_field_spec.rb1
-rw-r--r--spec/views/offer_workbenches/show.html.erb_spec.rb8
-rw-r--r--yarn.lock4
58 files changed, 717 insertions, 247 deletions
diff --git a/INSTALL.md b/INSTALL.md
index 5ed8ca9f1..9e04730f7 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -169,6 +169,8 @@ bundle exec rake referential:create
#### Run tests
+#### Rspec
+
```sh
bundle exec rake spec
bundle exec rake teaspoon
@@ -180,7 +182,11 @@ If Postgres complains about illegal type `hstore` or `unaccent` in your tests th
Thanks to `lib/tasks/extensions.rake`.
+#### Jest (React integration specs)
+
+`grunt jest` to run the whole specs.
+`grunt` to watch for changes and automatically run corresponding tests.
#### Start local server
diff --git a/app/assets/stylesheets/components/_main_nav.sass b/app/assets/stylesheets/components/_main_nav.sass
index f102c4617..2af070389 100644
--- a/app/assets/stylesheets/components/_main_nav.sass
+++ b/app/assets/stylesheets/components/_main_nav.sass
@@ -245,7 +245,7 @@ $menuW: 300px
& > .menu-item
max-width: 75%
-
+
.menu-item
padding: 0 10px
@@ -337,47 +337,35 @@ $menuW: 300px
height: $menuH
padding: 0 50px 0 75px
margin-top: -4px
+ display: flex
> *
display: inline-block
&.sticky-ptitle
- width: 60%
+ flex: 1 1
height: $menuH
+ position: relative
h1
- position: relative
+ position: absolute
+ left: 0
+ right: 10px
+ top: 0
line-height: 1.1
white-space: nowrap
max-height: 1.1em
margin: 0 -1.4em 0 0
padding: 0 1.4em 5px 0
overflow: hidden
-
- &:before
- content: '[...]'
- font-size: 0.65em
- position: absolute
- z-index: 6
- right: 0
- bottom: 9px
-
- &:after
- content: ''
- position: absolute
- z-index: 5
- right: 0
- width: 1.4em
- height: 1em
- margin-top: 0.2em
- background-color: $blue
+ text-overflow: ellipsis
.small.fa
color: #fff
margin-left: 0.5em
&.sticky-paction
- width: 40%
+ flex: 0 0 auto
text-align: right
vertical-align: top
diff --git a/app/controllers/compliance_check_messages_controller.rb b/app/controllers/compliance_check_messages_controller.rb
new file mode 100644
index 000000000..7c416584e
--- /dev/null
+++ b/app/controllers/compliance_check_messages_controller.rb
@@ -0,0 +1,34 @@
+class ComplianceCheckMessagesController < ChouetteController
+ defaults resource_class: ComplianceCheckMessage, collection_name: 'compliance_check_messages', instance_name: 'compliance_check_message'
+ respond_to :csv
+ belongs_to :compliance_check_set, :parent_class => ComplianceCheckSet
+
+
+ def index
+ index! do |format|
+ format.csv {
+ send_data ComplianceCheckMessageExport.new(compliance_check_messages: collection).to_csv(:col_sep => "\;", :quote_char=>'"', force_quotes: true, server_url: request.base_url) , :filename => "compliance_check_set_errors_#{line_code}_#{Time.now.to_i}.csv"
+ }
+ end
+ end
+
+ protected
+ def collection
+ parent.compliance_check_messages.where(compliance_check_resource_id: params[:compliance_check_resource_id])
+ end
+
+ def parent
+ @compliance_check_set ||= ComplianceCheckSet.find(params[:compliance_check_set_id])
+ end
+
+ def compliance_check_resource
+ ComplianceCheckResource.find(params[:compliance_check_resource_id])
+ end
+
+ private
+
+ def line_code
+ Chouette::Line.find_by_objectid("#{compliance_check_resource.reference}").get_objectid.local_id
+ end
+
+end
diff --git a/app/controllers/compliance_check_sets_controller.rb b/app/controllers/compliance_check_sets_controller.rb
index 600c69126..4ec86f0d6 100644
--- a/app/controllers/compliance_check_sets_controller.rb
+++ b/app/controllers/compliance_check_sets_controller.rb
@@ -21,9 +21,7 @@ class ComplianceCheckSetsController < ChouetteController
def show
show! do
- @compliance_check_set = @compliance_check_set.decorate(context: {
- compliance_check_set: @compliance_check_set
- })
+ @compliance_check_set = @compliance_check_set.decorate
end
end
diff --git a/app/controllers/import_messages_controller.rb b/app/controllers/import_messages_controller.rb
index 6546b25f8..286bb0ce8 100644
--- a/app/controllers/import_messages_controller.rb
+++ b/app/controllers/import_messages_controller.rb
@@ -9,7 +9,7 @@ class ImportMessagesController < ChouetteController
def index
index! do |format|
format.csv {
- send_data ImportMessageExport.new(:import_messages => @import_messages).to_csv(:col_sep => ";") , :filename => "#{File.basename(@import_resource.name)}_#{Time.now.to_i}.csv"
+ send_data ImportMessageExport.new(:import_messages => @import_messages).to_csv(:col_sep => "\;", :quote_char=>'"', force_quotes: true) , :filename => "import_errors_#{@import_resource.name.gsub('.xml', '')}_#{Time.now.to_i}.csv"
}
end
end
diff --git a/app/helpers/compliance_check_resources_helper.rb b/app/helpers/compliance_check_resources_helper.rb
new file mode 100644
index 000000000..95cabed88
--- /dev/null
+++ b/app/helpers/compliance_check_resources_helper.rb
@@ -0,0 +1,12 @@
+module ComplianceCheckResourcesHelper
+
+ # Comlpiance Check Resources statuses helper
+ def compliance_check_resource_status(status)
+ cls = ''
+ cls = 'success' if status == 'OK'
+ cls = 'warning' if status == 'WARNING'
+ cls = 'danger' if %w[ERROR IGNORED].include? status
+
+ content_tag :span, '', class: "fa fa-circle text-#{cls}"
+ end
+end
diff --git a/app/javascript/helpers/save_button.js b/app/javascript/helpers/save_button.js
new file mode 100644
index 000000000..7e0bd5bbe
--- /dev/null
+++ b/app/javascript/helpers/save_button.js
@@ -0,0 +1,47 @@
+import React, { PropTypes, Component } from 'react'
+
+export default class SaveButton extends Component{
+ constructor(props){
+ super(props)
+ }
+
+ btnDisabled(){
+ return !this.props.status.fetchSuccess || this.props.status.isFetching
+ }
+
+ btnClass(){
+ let className = ['btn btn-default']
+ if(this.btnDisabled()){
+ className.push('disabled')
+ }
+ return className.join(' ')
+ }
+
+ render() {
+ if (!this.hasPolicy()) {
+ return false
+ }else{
+ return (
+ <div className='row mt-md'>
+ <div className='col-lg-12 text-right'>
+ <form className={this.formClassName() + ' formSubmitr ml-xs'} onSubmit={e => {e.preventDefault()}}>
+ <div className="btn-group sticky-actions">
+ <button
+ className={this.btnClass()}
+ type='button'
+ disabled={this.btnDisabled()}
+ onClick={e => {
+ e.preventDefault()
+ this.props.editMode ? this.submitForm() : this.props.onEnterEditMode()
+ }}
+ >
+ {this.props.editMode ? "Valider" : "Editer"}
+ </button>
+ </div>
+ </form>
+ </div>
+ </div>
+ )
+ }
+ }
+}
diff --git a/app/javascript/journey_patterns/components/SaveJourneyPattern.js b/app/javascript/journey_patterns/components/SaveJourneyPattern.js
index 7e4492e0e..4bb6a73a0 100644
--- a/app/javascript/journey_patterns/components/SaveJourneyPattern.js
+++ b/app/javascript/journey_patterns/components/SaveJourneyPattern.js
@@ -1,35 +1,19 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
+import SaveButton from '../../helpers/save_button'
import actions from '../actions'
-export default class SaveJourneyPattern extends Component {
- constructor(props){
- super(props)
+export default class SaveJourneyPattern extends SaveButton {
+ hasPolicy(){
+ return this.props.status.policy['journey_patterns.update'] == true
}
- render() {
- if(this.props.status.policy['journey_patterns.update'] == false) {
- return false
- }else{
- return (
- <div className='row mt-md'>
- <div className='col-lg-12 text-right'>
- <form className='jp_collection formSubmitr ml-xs' onSubmit={e => {e.preventDefault()}}>
- <button
- className='btn btn-default'
- type='button'
- onClick={e => {
- e.preventDefault()
- this.props.editMode ? this.props.onSubmitJourneyPattern(this.props.dispatch, this.props.journeyPatterns) : this.props.onEnterEditMode()
- }}
- >
- {this.props.editMode ? "Valider" : "Editer"}
- </button>
- </form>
- </div>
- </div>
- )
- }
+ formClassName(){
+ return 'jp_collection'
+ }
+
+ submitForm(){
+ this.props.onSubmitJourneyPattern(this.props.dispatch, this.props.journeyPatterns)
}
}
@@ -37,4 +21,4 @@ SaveJourneyPattern.propTypes = {
journeyPatterns: PropTypes.array.isRequired,
status: PropTypes.object.isRequired,
page: PropTypes.number.isRequired
-} \ No newline at end of file
+}
diff --git a/app/javascript/vehicle_journeys/components/SaveVehicleJourneys.js b/app/javascript/vehicle_journeys/components/SaveVehicleJourneys.js
index c5161b917..6e94b04a3 100644
--- a/app/javascript/vehicle_journeys/components/SaveVehicleJourneys.js
+++ b/app/javascript/vehicle_journeys/components/SaveVehicleJourneys.js
@@ -1,37 +1,19 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
+import SaveButton from '../../helpers/save_button'
import actions from '../actions'
-export default class SaveVehicleJourneys extends Component{
- constructor(props){
- super(props)
+export default class SaveVehicleJourneys extends SaveButton{
+ hasPolicy(){
+ return this.props.filters.policy['vehicle_journeys.update'] == true
}
- render() {
- if (this.props.filters.policy['vehicle_journeys.update'] == false) {
- return false
- }else{
- return (
- <div className='row mt-md'>
- <div className='col-lg-12 text-right'>
- <form className='vehicle_journeys formSubmitr ml-xs' onSubmit={e => {e.preventDefault()}}>
- <div className="btn-group sticky-actions">
- <button
- className={'btn btn-default' + (this.props.status.fetchSuccess ? '' : ' disabled')}
- type='button'
- onClick={e => {
- e.preventDefault()
- this.props.editMode ? this.props.onSubmitVehicleJourneys(this.props.dispatch, this.props.vehicleJourneys) : this.props.onEnterEditMode()
- }}
- >
- {this.props.editMode ? "Valider" : "Editer"}
- </button>
- </div>
- </form>
- </div>
- </div>
- )
- }
+ formClassName(){
+ return 'vehicle_journeys'
+ }
+
+ submitForm(){
+ this.props.onSubmitVehicleJourneys(this.props.dispatch, this.props.vehicleJourneys)
}
}
diff --git a/app/javascript/vehicle_journeys/reducers/modal.js b/app/javascript/vehicle_journeys/reducers/modal.js
index c2556303d..fb7e16547 100644
--- a/app/javascript/vehicle_journeys/reducers/modal.js
+++ b/app/javascript/vehicle_journeys/reducers/modal.js
@@ -147,14 +147,7 @@ export default function modal(state = {}, action) {
let stopAreas = _.map(window.jpOriginStopPoints, (sa, i) =>{
return _.assign({}, {stop_area_short_description : {id : sa.stop_area_id}})
})
- selectedJP = {
- id: window.jpOrigin.id,
- name: window.jpOrigin.name,
- published_name: window.jpOrigin.published_name,
- objectid: window.jpOrigin.objectid,
- stop_areas: stopAreas,
- missions: state.missions
- }
+ selectedJP = _.assign({}, window.jpOrigin, {stop_areas: stopAreas})
}
return {
type: 'create',
diff --git a/app/javascript/vehicle_journeys/reducers/vehicleJourneys.js b/app/javascript/vehicle_journeys/reducers/vehicleJourneys.js
index 501c01175..ae45993a8 100644
--- a/app/javascript/vehicle_journeys/reducers/vehicleJourneys.js
+++ b/app/javascript/vehicle_journeys/reducers/vehicleJourneys.js
@@ -16,7 +16,7 @@ const vehicleJourney= (state = {}, action, keep) => {
}
if(action.data["start_time.hour"] && action.data["start_time.minute"] && action.selectedJourneyPattern.full_schedule){
current_time.hour = parseInt(action.data["start_time.hour"].value)
- current_time.minute = parseInt(action.data["start_time.minute"].value)
+ current_time.minute = parseInt(action.data["start_time.minute"].value) || 0
}
_.each(action.stopPointsList, (sp) =>{
if(action.selectedJourneyPattern.full_schedule && action.selectedJourneyPattern.costs && action.selectedJourneyPattern.costs[prevSp.stop_area_id + "-" + sp.stop_area_id]){
diff --git a/app/models/chouette/company.rb b/app/models/chouette/company.rb
index 12b21e347..b3d40ab96 100644
--- a/app/models/chouette/company.rb
+++ b/app/models/chouette/company.rb
@@ -3,7 +3,7 @@ module Chouette
include CompanyRestrictions
include LineReferentialSupport
include ObjectidSupport
- has_paper_trail
+ has_paper_trail class_name: 'PublicVersion'
has_many :lines
diff --git a/app/models/chouette/line.rb b/app/models/chouette/line.rb
index 389240ec7..ba2e2755d 100644
--- a/app/models/chouette/line.rb
+++ b/app/models/chouette/line.rb
@@ -1,6 +1,6 @@
module Chouette
class Line < Chouette::ActiveRecord
- has_paper_trail
+ has_paper_trail class_name: 'PublicVersion'
include LineRestrictions
include LineReferentialSupport
include ObjectidSupport
diff --git a/app/models/chouette/network.rb b/app/models/chouette/network.rb
index 9b3f2fe29..6843c69ad 100644
--- a/app/models/chouette/network.rb
+++ b/app/models/chouette/network.rb
@@ -1,6 +1,6 @@
module Chouette
class Network < Chouette::ActiveRecord
- has_paper_trail
+ has_paper_trail class_name: 'PublicVersion'
include NetworkRestrictions
include LineReferentialSupport
include ObjectidSupport
diff --git a/app/models/chouette/stop_area.rb b/app/models/chouette/stop_area.rb
index 7a7718ad6..ea1855ea8 100644
--- a/app/models/chouette/stop_area.rb
+++ b/app/models/chouette/stop_area.rb
@@ -2,7 +2,7 @@ require 'geokit'
require 'geo_ruby'
module Chouette
class StopArea < Chouette::ActiveRecord
- has_paper_trail
+ has_paper_trail class_name: 'PublicVersion'
include ProjectionFields
include StopAreaRestrictions
include StopAreaReferentialSupport
diff --git a/app/models/chouette/vehicle_journey_at_stop.rb b/app/models/chouette/vehicle_journey_at_stop.rb
index 7b9d92f68..eda711ade 100644
--- a/app/models/chouette/vehicle_journey_at_stop.rb
+++ b/app/models/chouette/vehicle_journey_at_stop.rb
@@ -102,6 +102,7 @@ module Chouette
private
def local_time time
+ return unless time
return time unless stop_point&.stop_area&.time_zone.present?
return time unless ActiveSupport::TimeZone[stop_point.stop_area.time_zone].present?
time + ActiveSupport::TimeZone[stop_point.stop_area.time_zone].utc_offset
diff --git a/app/models/compliance_check_message_export.rb b/app/models/compliance_check_message_export.rb
new file mode 100644
index 000000000..04e1a9caa
--- /dev/null
+++ b/app/models/compliance_check_message_export.rb
@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+require "csv"
+require "zip"
+
+class ComplianceCheckMessageExport
+ include ActiveModel::Validations
+ include ActiveModel::Conversion
+ extend ActiveModel::Naming
+
+ attr_accessor :compliance_check_messages
+
+ def initialize(attributes = {})
+ attributes.each { |name, value| send("#{name}=", value) }
+ end
+
+ def persisted?
+ false
+ end
+
+ def label(name)
+ I18n.t "vehicle_journey_exports.label.#{name}"
+ end
+
+ def column_names
+ ["criticity", "message key", "resource objectid", "link", "message"]
+ end
+
+ def to_csv(options = {})
+ CSV.generate(options.slice(:col_sep, :quote_char, :force_quotes)) do |csv|
+ csv << column_names
+ compliance_check_messages.each do |compliance_check_message|
+ csv << [compliance_check_message.compliance_check.criticity, *compliance_check_message.message_attributes.values_at('test_id', 'source_objectid'), options[:server_url] + compliance_check_message.message_attributes['source_object_path'], I18n.t("compliance_check_messages.#{compliance_check_message.message_key}", compliance_check_message.message_attributes.deep_symbolize_keys)]
+ end
+ end
+ end
+
+ def to_zip(temp_file,options = {})
+ ::Zip::OutputStream.open(temp_file) { |zos| }
+ ::Zip::File.open(temp_file.path, ::Zip::File::CREATE) do |zipfile|
+ zipfile.get_output_stream(label("vj_filename")+route.id.to_s+".csv") { |f| f.puts to_csv(options) }
+ zipfile.get_output_stream(label("tt_filename")+".csv") { |f| f.puts time_tables_to_csv(options) }
+ zipfile.get_output_stream(label("ftn_filename")+".csv") { |f| f.puts footnotes_to_csv(options) }
+ end
+ end
+
+end
diff --git a/app/models/compliance_check_set.rb b/app/models/compliance_check_set.rb
index 63f380d99..f4c44d26d 100644
--- a/app/models/compliance_check_set.rb
+++ b/app/models/compliance_check_set.rb
@@ -26,6 +26,14 @@ class ComplianceCheckSet < ActiveRecord::Base
end
end
+ def organisation
+ workbench.organisation
+ end
+
+ def human_attribute_name(*args)
+ self.class.human_attribute_name(*args)
+ end
+
def update_status
statuses = compliance_check_resources.map do |resource|
case resource.status
diff --git a/app/models/concerns/checksum_support.rb b/app/models/concerns/checksum_support.rb
index b700ef286..ff73c87a3 100644
--- a/app/models/concerns/checksum_support.rb
+++ b/app/models/concerns/checksum_support.rb
@@ -5,6 +5,7 @@ module ChecksumSupport
included do
before_save :set_current_checksum_source, :update_checksum
+ Referential.register_model_with_checksum self
end
def checksum_attributes
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb
index e8e76c6b5..3f79ec62c 100644
--- a/app/models/custom_field.rb
+++ b/app/models/custom_field.rb
@@ -1,7 +1,8 @@
class CustomField < ActiveRecord::Base
extend Enumerize
- enumerize :field_type, in: %i{list}
+ enumerize :field_type, in: %i{list}
validates :name, uniqueness: {scope: :resource_type}
+ validates :code, uniqueness: {scope: :resource_type, case_sensitive: false}
end
diff --git a/app/models/import_message_export.rb b/app/models/import_message_export.rb
index 88d0f27e2..05f8a2cc7 100644
--- a/app/models/import_message_export.rb
+++ b/app/models/import_message_export.rb
@@ -22,14 +22,14 @@ class ImportMessageExport
end
def column_names
- ["criticity", "message key", "message"]
+ ["criticity", "message key", "message", "file name", "line", "column"]
end
def to_csv(options = {})
CSV.generate(options) do |csv|
csv << column_names
import_messages.each do |import_message|
- csv << [import_message.criticity, import_message.message_key, I18n.t("import_messages.compliance_check_messages.#{import_message.message_key}", import_message.message_attributes.deep_symbolize_keys) ]
+ csv << [import_message.criticity, import_message.message_key, I18n.t("import_messages.#{import_message.message_key}", import_message.message_attributes.deep_symbolize_keys), *import_message.resource_attributes.values_at("filename", "line_number", "column_number") ]
end
end
end
diff --git a/app/models/merge.rb b/app/models/merge.rb
index eebf1d2e1..91be27f2c 100644
--- a/app/models/merge.rb
+++ b/app/models/merge.rb
@@ -60,6 +60,7 @@ class Merge < ActiveRecord::Base
end
new.referential_suite = output
+ new.workbench = workbench
new.organisation = workbench.organisation
new.slug = "output_#{workbench.id}_#{created_at.to_i}"
new.name = I18n.t("merges.referential_name", date: I18n.l(created_at))
diff --git a/app/models/referential.rb b/app/models/referential.rb
index 92931564d..baaa354da 100644
--- a/app/models/referential.rb
+++ b/app/models/referential.rb
@@ -75,6 +75,46 @@ class Referential < ActiveRecord::Base
alias_method_chain :save, :table_lock_timeout
+ if Rails.env.development?
+ def self.force_register_models_with_checksum
+ paths = Rails.application.paths['app/models'].to_a
+ Rails.application.railties.each do |tie|
+ next unless tie.respond_to? :paths
+ paths += tie.paths['app/models'].to_a
+ end
+
+ paths.each do |path|
+ next unless File.directory?(path)
+ Dir.chdir path do
+ Dir['**/*.rb'].each do |src|
+ next if src =~ /^concerns/
+ # thanks for inconsistent naming ...
+ if src == "route_control/zdl_stop_area.rb"
+ RouteControl::ZDLStopArea
+ next
+ end
+ Rails.logger.info "Loading #{src}"
+ begin
+ src[0..-4].classify.safe_constantize
+ rescue => e
+ Rails.logger.info "Failed: #{e.message}"
+ nil
+ end
+ end
+ end
+ end
+ end
+ end
+
+ def self.register_model_with_checksum klass
+ @_models_with_checksum ||= []
+ @_models_with_checksum << klass
+ end
+
+ def self.models_with_checksum
+ @_models_with_checksum || []
+ end
+
def lines
if metadatas.blank?
workbench ? workbench.lines : associated_lines
diff --git a/app/models/workbench.rb b/app/models/workbench.rb
index f49f4e7cf..b80fa64ac 100644
--- a/app/models/workbench.rb
+++ b/app/models/workbench.rb
@@ -31,7 +31,12 @@ class Workbench < ActiveRecord::Base
if line_ids.empty?
Referential.none
else
- Referential.joins(:metadatas).where(['referential_metadata.line_ids && ARRAY[?]::bigint[]', line_ids]).ready.not_in_referential_suite
+ workgroup
+ .referentials
+ .joins(:metadatas)
+ .where(['referential_metadata.line_ids && ARRAY[?]::bigint[]', line_ids])
+ .ready
+ .not_in_referential_suite
end
end
diff --git a/app/models/workgroup.rb b/app/models/workgroup.rb
index 511bbfeb0..3d761e81f 100644
--- a/app/models/workgroup.rb
+++ b/app/models/workgroup.rb
@@ -4,6 +4,7 @@ class Workgroup < ActiveRecord::Base
has_many :workbenches
has_many :organisations, through: :workbenches
+ has_many :referentials, through: :workbenches
validates_uniqueness_of :name
diff --git a/app/views/compliance_check_sets/executed.html.slim b/app/views/compliance_check_sets/executed.html.slim
index da8a2a3de..b33b516b4 100644
--- a/app/views/compliance_check_sets/executed.html.slim
+++ b/app/views/compliance_check_sets/executed.html.slim
@@ -1,4 +1,4 @@
-- breadcrumb :compliance_check_set, @workbench, @compliance_check_set
+- breadcrumb :compliance_check_set_executed, @workbench, @compliance_check_set
- page_header_content_for @compliance_check_set
.page_content
diff --git a/app/views/compliance_check_sets/index.html.slim b/app/views/compliance_check_sets/index.html.slim
index f109845b4..f15e85bdd 100644
--- a/app/views/compliance_check_sets/index.html.slim
+++ b/app/views/compliance_check_sets/index.html.slim
@@ -12,7 +12,10 @@
[ \
TableBuilderHelper::Column.new( \
key: :ref, \
- attribute: 'id' \
+ attribute: 'id', \
+ link_to: lambda do |compliance_check_set| \
+ workbench_compliance_check_set_path(compliance_check_set.workbench_id, compliance_check_set.id) \
+ end \
), \
TableBuilderHelper::Column.new( \
key: :creation_date, \
@@ -31,7 +34,10 @@
), \
TableBuilderHelper::Column.new(\
key: :compliance_control_set, \
- attribute: Proc.new{ |n| (n.compliance_control_set.name) if n.compliance_control_set} \
+ attribute: 'name', \
+ link_to: lambda do |compliance_check_set| \
+ executed_workbench_compliance_check_set_path(compliance_check_set.workbench_id, compliance_check_set.id) \
+ end \
), \
],
sortable: true,
diff --git a/app/views/compliance_check_sets/show.html.slim b/app/views/compliance_check_sets/show.html.slim
index 5d8e3fa15..4db2e805f 100644
--- a/app/views/compliance_check_sets/show.html.slim
+++ b/app/views/compliance_check_sets/show.html.slim
@@ -1,4 +1,4 @@
-- breadcrumb :compliance_check_sets, @workbench, @compliance_check_set
+- breadcrumb :compliance_check_set, @workbench, @compliance_check_set
/ PageHeader
- content_for :page_header_content do
.row
@@ -11,31 +11,28 @@
= link.content
- page_header_content_for @compliance_check_set
-/ = pageheader 'jeux-de-donnees',
-/ @compliance_check_set.name,
-/ '',
-/ t('last_update', time: l(@compliance_check_set.updated_at, format: :short)) do
-
- / Below is secundary actions & optional contents (filters, ...)
- / .row
- / .col-lg-12.text-right.mb-sm
- / - @compliance_check_set.action_links.each do |link|
- / = link_to link.href,
- / method: link.method,
- / data: link.data,
- / class: 'btn btn-primary' do
- / = link.content
/ PageContent
.page_content.import_messages
.container-fluid
.row
+ .col-lg-6.col-md-6.col-sm-12.col-xs-12
+ = definition_list( t('metadatas'),
+ { I18n.t("compliance_check_sets.show.metadatas.referential") => (@compliance_check_set.referential.nil? ? '' : link_to(@compliance_check_set.referential.name, referential_path(@compliance_check_set.referential)) ),
+ I18n.t("compliance_check_sets.show.metadatas.referential_type") => 'Jeu de données',
+ I18n.t("compliance_check_sets.show.metadatas.compliance_check_set_executed") => link_to(@compliance_check_set.name, executed_workbench_compliance_check_set_path(@compliance_check_set.workbench_id, @compliance_check_set)),
+ I18n.t("compliance_check_sets.show.metadatas.compliance_control_owner") => @compliance_check_set.organisation.name,
+ I18n.t("compliance_check_sets.show.metadatas.import") => '' })
+ .row
.col-lg-12
h1
span.status_icon = compliance_check_set_status(@compliance_check_set.status)
- span = t('compliance_check_sets.show.table_state', lines_status: @compliance_check_set.lines_status , lines_in_compliance_check_set: @compliance_check_set.lines_in_compliance_check_set )
+ span = t('.table_state', lines_status: @compliance_check_set.lines_status , lines_in_compliance_check_set: @compliance_check_set.lines_in_compliance_check_set )
+ .col-lg-12
+ h2 = t('.table_title')
.col-lg-12
- = t('compliance_check_sets.show.table_explanation')
+ = t('.table_explanation')
+
.row
.col-lg-12
= table_builder_2 @compliance_check_set.compliance_check_resources,
@@ -46,13 +43,21 @@
), \
TableBuilderHelper::Column.new( \
key: :status, \
- attribute: Proc.new { |n| compliance_check_set_status(n.status) } \
+ attribute: Proc.new { |n| compliance_check_resource_status(n.status) } \
), \
TableBuilderHelper::Column.new( \
key: :metrics, \
attribute: Proc.new { |n| I18n.t('compliance_check_sets.show.metrics', n.metrics.deep_symbolize_keys) } \
+ ), \
+ TableBuilderHelper::Column.new( \
+ name: 'Téléchargement' , \
+ attribute: Proc.new { |n| '<i class="fa fa-download" aria-hidden="true"></i>'.html_safe }, \
+ sortable: false, \
+ link_to: lambda do |compliance_check_resource| \
+ workbench_compliance_check_set_compliance_check_messages_path(@compliance_check_set.workbench, @compliance_check_set, format: 'csv', compliance_check_resource_id: compliance_check_resource.id ) \
+ end \
) \
],
sortable: false, \
links: [],
- cls: 'table'
+ cls: 'table has-search'
diff --git a/app/views/import_resources/index.html.slim b/app/views/import_resources/index.html.slim
index 728d9f4a8..0c21a9e09 100644
--- a/app/views/import_resources/index.html.slim
+++ b/app/views/import_resources/index.html.slim
@@ -48,4 +48,4 @@
- else
.col-lg-12
- @import.messages.each do |message|
- = I18n.t("import_messages.compliance_check_messages.#{message.message_key}")
+ = I18n.t("import_messages.#{message.message_key}")
diff --git a/app/views/referential_vehicle_journeys/index.html.slim b/app/views/referential_vehicle_journeys/index.html.slim
index 394f4a3f7..d29a78a6c 100644
--- a/app/views/referential_vehicle_journeys/index.html.slim
+++ b/app/views/referential_vehicle_journeys/index.html.slim
@@ -23,7 +23,7 @@
key: :published_journey_name, \
attribute: 'published_journey_name', \
link_to: lambda do |vehicle_journey| \
- referential_line_route_vehicle_journeys_path(@referential, vehicle_journey.route.line, vehicle_journey.route) \
+ vehicle_journey.published_journey_name ? referential_line_route_vehicle_journeys_path(@referential, vehicle_journey.route.line, vehicle_journey.route) : '' \
end, \
sortable: false \
), \
diff --git a/app/views/stop_areas/_form.html.slim b/app/views/stop_areas/_form.html.slim
index af8b9d889..b2322f73a 100644
--- a/app/views/stop_areas/_form.html.slim
+++ b/app/views/stop_areas/_form.html.slim
@@ -30,7 +30,7 @@
h3 = t("stop_areas.stop_area.general")
- if has_feature?(:stop_area_waiting_time)
- = f.input :waiting_time
+ = f.input :waiting_time, input_html: { min: 0 }
= f.input :registration_number, required: format_restriction_for_locales(@referential) == '.hub', :input_html => {:title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.registration_number")}
= f.input :fare_code
diff --git a/app/views/vehicle_journeys/index.html.slim b/app/views/vehicle_journeys/index.html.slim
index f7796b188..a02d5ed38 100644
--- a/app/views/vehicle_journeys/index.html.slim
+++ b/app/views/vehicle_journeys/index.html.slim
@@ -17,7 +17,7 @@
= javascript_tag do
| window.route_id = #{params[:route_id]};
| window.stopPoints = #{(@stop_points_list.to_json).html_safe};
- | window.jpOrigin = #{(@jp_origin.to_json).html_safe};
+ | window.jpOrigin = #{(@jp_origin.present? ? @jp_origin.attributes.update({full_schedule: @jp_origin.full_schedule?}).to_json : "").html_safe};
| window.jpOriginStopPoints = #{(@jp_origin_stop_points.to_json).html_safe};
| window.transportMode = #{(@transport_mode.to_json).html_safe};
| window.transportSubmode = #{(@transport_submode.to_json).html_safe};
diff --git a/app/views/workbenches/_filters.html.slim b/app/views/workbenches/_filters.html.slim
index 4d9e0066c..491749515 100644
--- a/app/views/workbenches/_filters.html.slim
+++ b/app/views/workbenches/_filters.html.slim
@@ -19,7 +19,13 @@
.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' }
+ = f.input :organisation_name_eq_any,
+ collection: @workbench.workgroup.organisations.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'
diff --git a/config/breadcrumbs.rb b/config/breadcrumbs.rb
index ce5cf5b0f..6da96d73a 100644
--- a/config/breadcrumbs.rb
+++ b/config/breadcrumbs.rb
@@ -96,6 +96,11 @@ crumb :compliance_check_set do |workbench, compliance_check_set|
parent :compliance_check_sets, workbench
end
+crumb :compliance_check_set_executed do |workbench, compliance_check_set|
+ link I18n.t('compliance_check_sets.executed.title', name: compliance_check_set.name), executed_workbench_compliance_check_set_path(workbench, compliance_check_set)
+ parent :compliance_check_sets, workbench
+end
+
crumb :imports do |workbench|
link I18n.t('imports.index.title'), workbench_imports_path(workbench)
parent :workbench, workbench
diff --git a/config/locales/compliance_check_messages.en.yml b/config/locales/compliance_check_messages.en.yml
new file mode 100644
index 000000000..216a363a3
--- /dev/null
+++ b/config/locales/compliance_check_messages.en.yml
@@ -0,0 +1,31 @@
+en:
+ compliance_check_messages:
+ 3_route_1: "The route with %{source_objectid} objectid connect the stop points %{target_0_label} (%{target_0_objectid}) and %{target_1_label} (%{target_1_objectid}) which belong to the same ZDL"
+ 3_route_2: "The route with %{source_objectid} objectid references an incoherent oppposite route %{target_0_objectid}"
+ 3_route_3: "The route with %{source_objectid} objectid doesn't have any journey pattern"
+ 3_route_4: "The route with %{source_objectid} objectid is identical with another route %{target_0_objectid}"
+ 3_route_5: "The route with %{source_objectid} objectid has a first stop from the %{target_0_label} ZDL whereas its oppoite route's last stop is from the ZDL %{target_1_label}"
+ 3_route_6: "The route with %{source_objectid} objectid does not connect enough stop points (required 2 stop points)"
+ 3_route_8: "The stop point %{target_0_label} (%{target_0_objectid}) of the route %{source_objectid} is not used by any journey pattern"
+ 3_route_9: "The route with %{source_objectid} objectid does not have a journey pattern that connect all of its stop points"
+ 3_route_10: "L'itinéraire %{source_objectid} référence un arrêt (ZDEp) désactivé %{target_0_label} (%{target_0_objectid})"
+ 3_journeypattern_1: "The journey pattern with objectid %{source_objectid} is identical with another one %{target_0_objectid}"
+ 3_journeypattern_2: "The journey pattern with %{source_objectid} objectid doesn't have any vehicle journey"
+ 3_vehiclejourney_1: "On the following vehicle journey %{source_objectid}, the waiting time %{error_value} a this stop point %{target_0_label} (%{target_0_objectid}) is greater than the threshold (%{reference_value})"
+ 3_vehiclejourney_2_1: "On the following vehicle journey %{source_objectid}, the computed speed %{error_value} between the stop points %{target_0_label} (%{target_0_objectid}) and %{target_1_label} (%{target_1_objectid}) is greater than the threshold (%{reference_value})"
+ 3_vehiclejourney_2_2: "On the following vehicle journey %{source_objectid}, the computed speed %{error_value} between the stop points %{target_0_label} (%{target_0_objectid}) and %{target_1_label} (%{target_1_objectid}) is smaller than the threshold (%{reference_value})"
+ 3_vehiclejourney_3: "The travel time on the vehicle journey with %{source_objectid} objectid between the stop points %{target_0_label} (%{target_0_objectid}) and %{target_1_label} (%{target_1_objectid}) is too far off %{error_value} the average waiting on the journey pattern"
+ 3_vehiclejourney_4: "The vehicle journey with %{source_objectid} objectid does not have a timetable"
+ 3_vehiclejourney_5_1: "The vehicle journey with %{source_objectid} objectid has an arrival time %{error_value} greater than the departure time %{reference_value} at the stop point %{target_0_label} (%{target_0_objectid})"
+ 3_vehiclejourney_5_2: "The vehicle journey with %{source_objectid} objectid has an departure time %{error_value} at stop point %{target_0_label} (%{target_0_objectid}) greater than the arrival %{reference_value} at the next stop point"
+ 3_routingconstraint_1: "The Routing Constraint Zone %{source_objectid} references an unactivated stop point (ZDEp) %{target_0_label} (%{target_0_objectid})"
+ 3_routingconstraint_2: "The Routing Constraint Zone %{source_objectid} covers all the stop points of its related route : %{target_0_objectid}."
+ 3_routingconstraint_3: "The Routing Constraint Zone %{source_objectid} has less than 2 stop points"
+ 3_line_1: "On line :%{source_label} (%{source_objectid}), no route has an opposite route"
+ 3_generic_1: "%{source_objectid} : the %{source_attribute} attribute value (%{error_value}) does not respect the following pattern : %{reference_value}"
+ 3_generic_2_1: "%{source_objectid} : the %{source_attribute} attributes's value (%{error_value}) is greater than the authorized maximum value : %{reference_value}"
+ 3_generic_2_2: "%{source_objectid} : the %{source_attribute} attributes's value (%{error_value}) is smaller than the authorized minimum value %{reference_value}"
+ 3_generic_3: "%{source_objectid} : the %{source_attribute} attribute (%{error_value}) has a value shared with : %{target_0_objectid}"
+ 3_shape_1: "Tracé %{source_objectid} : le tracé passe trop loin de l'arrêt %{target_0_label} (%{target_0_objectid}) : %{error_value} > %{reference_value}"
+ 3_shape_2: "Tracé %{source_objectid} : le tracé n'est pas défini entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid})"
+ 3_shape_3: "Le tracé de l'itinéraire %{source_objectid} est en écart avec la voirie sur %{error_value} sections" \ No newline at end of file
diff --git a/config/locales/compliance_check_messages.fr.yml b/config/locales/compliance_check_messages.fr.yml
new file mode 100644
index 000000000..db127d236
--- /dev/null
+++ b/config/locales/compliance_check_messages.fr.yml
@@ -0,0 +1,31 @@
+fr:
+ compliance_check_messages:
+ 3_route_1: "L'itinéraire %{source_objectid} dessert successivement les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid}) de la même zone de lieu"
+ 3_route_2: "L'itinéraire %{source_objectid} référence un itinéraire retour %{target_0_objectid} incohérent"
+ 3_route_3: "L'itinéraire %{source_objectid} n'a pas de mission"
+ 3_route_4: "L'itinéraire %{source_objectid} est identique à l'itinéraire %{target_0_objectid}"
+ 3_route_5: "L'itinéraire %{source_objectid} dessert au départ un arrêt de la ZDL %{target_0_label} alors que l'itinéraire inverse dessert à l'arrivée un arrêt de la ZDL %{target_1_label}"
+ 3_route_6: "L'itinéraire %{source_objectid} ne dessert pas assez d'arrêts (minimum 2 requis)"
+ 3_route_8: "l'arrêt %{target_0_label} (%{target_0_objectid}) de l'itinéraire %{source_objectid} n'est desservi par aucune mission"
+ 3_route_9: "L'itinéraire %{source_objectid} n'a aucune mission desservant l'ensemble de ses arrêts"
+ 3_route_10: "L'itinéraire %{source_objectid} référence un arrêt (ZDEp) désactivé %{target_0_label} (%{target_0_objectid})"
+ 3_journeypattern_1: "La mission %{source_objectid} est identique à la mission %{target_0_objectid}"
+ 3_journeypattern_2: "La mission %{source_objectid} n'a pas de course"
+ 3_vehiclejourney_1: "Sur la course %{source_objectid}, le temps d'attente %{error_value} à l'arrêt %{target_0_label} (%{target_0_objectid}) est supérieur au seuil toléré (%{reference_value})"
+ 3_vehiclejourney_2_1: "Sur la course %{source_objectid}, la vitesse calculée %{error_value} entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid}) est supérieure au seuil toléré (%{reference_value})"
+ 3_vehiclejourney_2_2: "Sur la course %{source_objectid}, la vitesse calculée %{error_value} entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid}) est inférieure au seuil toléré (%{reference_value})"
+ 3_vehiclejourney_3: "Le temps de parcours sur la course %{source_objectid} entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid}) s'écarte de %{error_value} du temps moyen constaté sur la mission"
+ 3_vehiclejourney_4: "La course %{source_objectid} n'a pas de calendrier d'application"
+ 3_vehiclejourney_5_1: "La course %{source_objectid} a un horaire d'arrivé %{error_value} supérieur à l'horaire de départ %{reference_value} à l'arrêt %{target_0_label} (%{target_0_objectid})"
+ 3_vehiclejourney_5_2: "La course %{source_objectid} a un horaire de départ %{error_value} à l'arrêt %{target_0_label} (%{target_0_objectid}) supérieur à l'horaire d'arrivé %{reference_value} à l'arrêt suivant"
+ 3_routingconstraint_1: "L'ITL %{source_objectid} référence un arrêt (ZDEp) désactivé %{target_0_label} (%{target_0_objectid})"
+ 3_routingconstraint_2: "L'ITL %{source_objectid} couvre tous les arrêts de l'itinéraire %{target_0_objectid}."
+ 3_routingconstraint_3: "L'ITL %{source_objectid} n'a pas suffisament d'arrêts (minimum 2 arrêts requis)"
+ 3_line_1: "Sur la ligne %{source_label} (%{source_objectid}), aucun itinéraire n'a d'itinéraire inverse"
+ 3_generic_1: "%{source_objectid} : l'attribut %{source_attribute} a une valeur %{error_value} qui ne respecte pas le motif %{reference_value}"
+ 3_generic_2_1: "%{source_objectid} : l'attribut %{source_attribute} a une valeur %{error_value} supérieure à la valeur maximale autorisée %{reference_value}"
+ 3_generic_2_2: "%{source_objectid} : l'attribut %{source_attribute} a une valeur %{error_value} inférieure à la valeur minimale autorisée %{reference_value}"
+ 3_generic_3: "%{source_objectid} : l'attribut %{source_attribute} a une valeur %{error_value} partagée avec %{target_0_objectid}"
+ 3_shape_1: "Tracé %{source_objectid} : le tracé passe trop loin de l'arrêt %{target_0_label} (%{target_0_objectid}) : %{error_value} > %{reference_value}"
+ 3_shape_2: "Tracé %{source_objectid} : le tracé n'est pas défini entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid})"
+ 3_shape_3: "Le tracé de l'itinéraire %{source_objectid} est en écart avec la voirie sur %{error_value} sections" \ No newline at end of file
diff --git a/config/locales/compliance_check_results.en.yml b/config/locales/compliance_check_results.en.yml
deleted file mode 100644
index cd22aefb1..000000000
--- a/config/locales/compliance_check_results.en.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-en:
- compliance_check_messages:
diff --git a/config/locales/compliance_check_results.fr.yml b/config/locales/compliance_check_results.fr.yml
deleted file mode 100644
index d3fbf0900..000000000
--- a/config/locales/compliance_check_results.fr.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-fr:
- compliance_check_messages:
diff --git a/config/locales/compliance_check_sets.en.yml b/config/locales/compliance_check_sets.en.yml
index 1081b1d66..5e8c3b24f 100644
--- a/config/locales/compliance_check_sets.en.yml
+++ b/config/locales/compliance_check_sets.en.yml
@@ -22,7 +22,14 @@ en:
title: Compliance check set report
table_state: "%{lines_status} lines imported on %{lines_in_compliance_check_set} in the archive"
table_explanation: "These controls apply to all imported data and condition the construction of your organization's offer."
+ table_title: Analysed lines state
metrics: "%{ok_count} ok, %{error_count} errors, %{warning_count} warnings, %{uncheck_count} n/a"
+ metadatas:
+ referential: "Object analysed"
+ referential_type: "Apply to"
+ compliance_check_set_executed: "Compliance check set executed"
+ compliance_control_owner: "Compliance control owner"
+ import: "Import"
errors:
no_parent: "The compliance check set doesn't have any parent"
activerecord:
@@ -40,6 +47,14 @@ en:
metrics: Test results
download: Download
models:
+ compliance_check_set:
+ zero: "Compliance check set"
+ one: "Compliance check set"
+ other: "Compliance check sets"
+ compliance_check:
+ zero: "Compliance check"
+ one: "Compliance check"
+ other: "Compliance checks"
compliance_check_block:
one: compliance_control_set
other: compliance_control_sets
diff --git a/config/locales/compliance_check_sets.fr.yml b/config/locales/compliance_check_sets.fr.yml
index 8c4561ae9..20bf11d85 100644
--- a/config/locales/compliance_check_sets.fr.yml
+++ b/config/locales/compliance_check_sets.fr.yml
@@ -13,12 +13,19 @@ fr:
title: "Liste des rapports de contrôles"
search_no_results: Aucun rapport de contrôle ne correspond à votre recherche
executed:
- title: Jeu de contrôles exécutés %{name}
+ title: Jeu de contrôles exécuté %{name}
show:
title: Rapport de contrôle
- table_state: "%{lines_status} lignes importées sur %{lines_in_compliance_check_set} présentes dans l'archive"
+ table_state: "%{lines_status} lignes valides sur %{lines_in_compliance_check_set} présentes dans l'offre de transport"
table_explanation: Ces contrôles s’appliquent pour toutes les données importées et conditionnent la construction de l’offre de votre organisation
+ table_title: État des lignes analysées
metrics: "%{ok_count} ok, %{error_count} errors, %{warning_count} warnings, %{uncheck_count} n/a"
+ metadatas:
+ referential: "Objet analysé"
+ referential_type: "Appliqué à"
+ compliance_check_set_executed: "Jeu de contrôles exécuté"
+ compliance_control_owner: "Propriétaire du jeu de contrôles"
+ import: "Rapport d'import"
errors:
no_parent: "Le jeux de contrôle n'a pas de parent"
activerecord:
@@ -28,7 +35,7 @@ fr:
creation_date: Date et heure de création
associated_object: Objet associé
assigned_to: Affectation
- compliance_control_set: jeu de contrôle
+ compliance_control_set: Jeu de contrôle exécuté
name: Nom
compliance_check_resource:
name: Nom de la ligne
@@ -36,6 +43,14 @@ fr:
metrics: Résultat des tests
download: Télécharger
models:
+ compliance_check_set:
+ zero: "Rapport de contrôles"
+ one: "Rapport de contrôles"
+ other: "Rapport de contrôles"
+ compliance_check:
+ zero: "Contrôle"
+ one: "Contrôle"
+ other: "Contrôles"
compliance_check_block:
zero: "Groupe de contrôle"
one: "Groupe de contrôle"
diff --git a/config/locales/import_messages.en.yml b/config/locales/import_messages.en.yml
index 42d180abd..aad4fb772 100644
--- a/config/locales/import_messages.en.yml
+++ b/config/locales/import_messages.en.yml
@@ -1,54 +1,53 @@
en:
import_messages:
- compliance_check_messages:
- corrupt_zip_file: "The zip file %{source_filename} is corrupted and cannot be read"
- inconsistent_zip_file: "The zip file %{source_filename} contains unexpected directories: %{spurious_dirs}, which are ignored"
- referential_creation: "Le référentiel n'a pas pu être créé car un référentiel existe déjà sur les mêmes périodes et lignes"
- 1_netexstif_2: "Le fichier %{source_filename} ne respecte pas la syntaxe XML ou la XSD NeTEx : erreur '%{error_value}' rencontré"
- 1_netexstif_5: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} a une date de mise à jour dans le futur"
- 2_netexstif_1_1: "Le fichier commun.xml ne contient pas de frame nommée NETEX_COMMUN"
- 2_netexstif_1_2: "Le fichier commun.xml contient une frame nommée %{error_value} non acceptée"
- 2_netexstif_2_1: "Le fichier calendriers.xml ne contient pas de frame nommée NETEX_CALENDRIER"
- 2_netexstif_2_2: "Le fichier calendriers.xml contient une frame nommée %{error_value} non acceptée"
- 2_netexstif_3_1: "Le fichier %{source_filename} ne contient pas de frame nommée NETEX_OFFRE_LIGNE"
- 2_netexstif_3_2: "Le fichier %{source_filename} contient une frame nommée %{error_value} non acceptée"
- 2_netexstif_3_3: "la frame NETEX_OFFRE_LIGNE du fichier %{source_filename} ne contient pas la frame %{error_value} obligatoire"
- 2_netexstif_3_4: "la frame NETEX_OFFRE_LIGNE du fichier %{source_filename} contient une frame %{error_value} non acceptée"
- 2_netexstif_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'identifiant %{source_objectid} de l'objet %{error_value} ne respecte pas la syntaxe %{reference_value}"
- 2_netexstif_5: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{error_value} d'identifiant %{source_objectid} a une date de mise à jour dans le futur"
- 2_netexstif_6: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} a un état de modification interdit : 'delete'"
- 2_netexstif_7: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{reference_value} de syntaxe invalide : %{error_value}"
- 2_netexstif_8_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type externe : référence interne attendue"
- 2_netexstif_8_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type interne mais disposant d'un contenu (version externe possible)"
- 2_netexstif_9_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type interne : référence externe attendue"
- 2_netexstif_9_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type externe sans information de version"
- 2_netexstif_10: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type externe inconnue"
- 2_netexstif_daytype_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet DayType d'identifiant %{source_objectid} ne définit aucun calendrier, il est ignoré"
- 2_netexstif_daytype_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet DayType d'identifiant %{source_objectid} est reliée à des périodes mais ne définit pas de types de jours"
- 2_netexstif_daytypeassignment_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet DayTypeAssignment d'identifiant %{source_objectid} ne peut référencer un OperatingDay"
- 2_netexstif_daytypeassignment_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet DayTypeAssignment d'identifiant %{source_objectid} ne peut référencer un OperatingPeriod sur la condition IsAvailable à faux."
- 2_netexstif_direction_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Direction d'identifiant %{source_objectid} n'a pas de valeur pour l'attribut Name"
- 2_netexstif_direction_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Direction d'identifiant %{source_objectid} définit un attribut %{error_value} non autorisé"
- 2_netexstif_notice_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Notice d'identifiant %{source_objectid} doit définir un texte"
- 2_netexstif_notice_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Notice d'identifiant %{source_objectid} de type %{error_value} est ignoré"
- 2_netexstif_operatingperiod_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet OperatingPeriod d'identifiant %{source_objectid} a une date de fin %{error_value} inférieure ou égale à la date de début %{reference_value}"
- 2_netexstif_passengerstopassignment_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, l'attribut %{source_label} de l'objet PassengerStopAssignment %{source_objectid} doit être renseigné"
- 2_netexstif_passengerstopassignment_2: "L'arrêt %{source_objectid} ne fait pas partie des arrêts disponibles pour votre organisation."
- 2_netexstif_passingtime_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} , objet ServiceJourney d'identifiant %{source_objectid} : le passingTime de rang %{error_value} ne dispose pas de DepartureTime"
- 2_netexstif_passingtime_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} , objet ServiceJourney d'identifiant %{source_objectid} : le passingTime de rang %{error_value} fournit un ArrivalTime supérieur à son DepartureTime"
- 2_netexstif_route_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Route d'identifiant %{source_objectid} a une valeur de l'attribut DirectionType interdite : %{error_value}"
- 2_netexstif_route_2_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Route d'identifiant %{source_objectid} référence un objet Route inverse %{error_value} qui ne le référence pas"
- 2_netexstif_route_2_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Route d'identifiant %{source_objectid} référence un objet Route inverse %{error_value} de même DirectionType"
- 2_netexstif_route_3: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : Les ServiceJourneyPattern de l'objet Route d'identifiant %{source_objectid} ne permettent pas de reconstituer la séquence des arrêts de celui-ci"
- 2_netexstif_route_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, Les informations de montée/Descente à l'arrêt %{error_value} de la Route %{source_objectid} diffèrent sur plusieurs ServiceJourneyPattern, ces informations ne sont pas importées"
- 2_netexstif_routingconstraintzone_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, l'objet RoutingConstraintZone %{source_objectid} doit référencer au moins deux ScheduledStopPoint"
- 2_netexstif_routingconstraintzone_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, l'objet RoutingConstraintZone %{source_objectid} a une valeur interdite pour l'attribut ZoneUse : %{error_value}"
- 2_netexstif_servicejourney_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourney d'identifiant %{source_objectid} ne référence pas de ServiceJourneyPattern"
- 2_netexstif_servicejourney_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourney d'identifiant %{source_objectid} fournit plus d'un trainNumber"
- 2_netexstif_servicejourney_3: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : Le nombre d'horaires (passing_times) de l'objet ServiceJourney d'identifiant %{source_objectid} n'est pas cohérent avec le ServiceJourneyPattern associé."
- 2_netexstif_servicejourney_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} , objet ServiceJourney d'identifiant %{source_objectid} : le passingTime de rang %{error_value} fournit des horaires antérieurs au passingTime précédent."
- 2_netexstif_servicejourneypattern_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} ne référence pas de Route"
- 2_netexstif_servicejourneypattern_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} doit contenir au moins 2 StopPointInJourneyPattern"
- 2_netexstif_servicejourneypattern_3_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} n'a pas de valeur pour l'attribut ServiceJourneyPatternType"
- 2_netexstif_servicejourneypattern_3_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} a une valeur interdite %{error_value} pour l'attribut ServiceJourneyPatternType différente de 'passenger'"
- 2_netexstif_servicejourneypattern_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, objet ServiceJourneyPattern d'identifiant %{source_objectid} : les attributs 'order' des StopPointInJourneyPattern ne sont pas croissants."
+ corrupt_zip_file: "The zip file %{source_filename} is corrupted and cannot be read"
+ inconsistent_zip_file: "The zip file %{source_filename} contains unexpected directories: %{spurious_dirs}, which are ignored"
+ referential_creation: "Le référentiel n'a pas pu être créé car un référentiel existe déjà sur les mêmes périodes et lignes"
+ 1_netexstif_2: "Le fichier %{source_filename} ne respecte pas la syntaxe XML ou la XSD NeTEx : erreur '%{error_value}' rencontré"
+ 1_netexstif_5: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} a une date de mise à jour dans le futur"
+ 2_netexstif_1_1: "Le fichier commun.xml ne contient pas de frame nommée NETEX_COMMUN"
+ 2_netexstif_1_2: "Le fichier commun.xml contient une frame nommée %{error_value} non acceptée"
+ 2_netexstif_2_1: "Le fichier calendriers.xml ne contient pas de frame nommée NETEX_CALENDRIER"
+ 2_netexstif_2_2: "Le fichier calendriers.xml contient une frame nommée %{error_value} non acceptée"
+ 2_netexstif_3_1: "Le fichier %{source_filename} ne contient pas de frame nommée NETEX_OFFRE_LIGNE"
+ 2_netexstif_3_2: "Le fichier %{source_filename} contient une frame nommée %{error_value} non acceptée"
+ 2_netexstif_3_3: "la frame NETEX_OFFRE_LIGNE du fichier %{source_filename} ne contient pas la frame %{error_value} obligatoire"
+ 2_netexstif_3_4: "la frame NETEX_OFFRE_LIGNE du fichier %{source_filename} contient une frame %{error_value} non acceptée"
+ 2_netexstif_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'identifiant %{source_objectid} de l'objet %{error_value} ne respecte pas la syntaxe %{reference_value}"
+ 2_netexstif_5: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{error_value} d'identifiant %{source_objectid} a une date de mise à jour dans le futur"
+ 2_netexstif_6: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} a un état de modification interdit : 'delete'"
+ 2_netexstif_7: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{reference_value} de syntaxe invalide : %{error_value}"
+ 2_netexstif_8_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type externe : référence interne attendue"
+ 2_netexstif_8_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type interne mais disposant d'un contenu (version externe possible)"
+ 2_netexstif_9_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type interne : référence externe attendue"
+ 2_netexstif_9_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type externe sans information de version"
+ 2_netexstif_10: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type externe inconnue"
+ 2_netexstif_daytype_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet DayType d'identifiant %{source_objectid} ne définit aucun calendrier, il est ignoré"
+ 2_netexstif_daytype_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet DayType d'identifiant %{source_objectid} est reliée à des périodes mais ne définit pas de types de jours"
+ 2_netexstif_daytypeassignment_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet DayTypeAssignment d'identifiant %{source_objectid} ne peut référencer un OperatingDay"
+ 2_netexstif_daytypeassignment_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet DayTypeAssignment d'identifiant %{source_objectid} ne peut référencer un OperatingPeriod sur la condition IsAvailable à faux."
+ 2_netexstif_direction_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Direction d'identifiant %{source_objectid} n'a pas de valeur pour l'attribut Name"
+ 2_netexstif_direction_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Direction d'identifiant %{source_objectid} définit un attribut %{error_value} non autorisé"
+ 2_netexstif_notice_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Notice d'identifiant %{source_objectid} doit définir un texte"
+ 2_netexstif_notice_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Notice d'identifiant %{source_objectid} de type %{error_value} est ignoré"
+ 2_netexstif_operatingperiod_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet OperatingPeriod d'identifiant %{source_objectid} a une date de fin %{error_value} inférieure ou égale à la date de début %{reference_value}"
+ 2_netexstif_passengerstopassignment_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, l'attribut %{source_label} de l'objet PassengerStopAssignment %{source_objectid} doit être renseigné"
+ 2_netexstif_passengerstopassignment_2: "L'arrêt %{source_objectid} ne fait pas partie des arrêts disponibles pour votre organisation."
+ 2_netexstif_passingtime_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} , objet ServiceJourney d'identifiant %{source_objectid} : le passingTime de rang %{error_value} ne dispose pas de DepartureTime"
+ 2_netexstif_passingtime_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} , objet ServiceJourney d'identifiant %{source_objectid} : le passingTime de rang %{error_value} fournit un ArrivalTime supérieur à son DepartureTime"
+ 2_netexstif_route_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Route d'identifiant %{source_objectid} a une valeur de l'attribut DirectionType interdite : %{error_value}"
+ 2_netexstif_route_2_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Route d'identifiant %{source_objectid} référence un objet Route inverse %{error_value} qui ne le référence pas"
+ 2_netexstif_route_2_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Route d'identifiant %{source_objectid} référence un objet Route inverse %{error_value} de même DirectionType"
+ 2_netexstif_route_3: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : Les ServiceJourneyPattern de l'objet Route d'identifiant %{source_objectid} ne permettent pas de reconstituer la séquence des arrêts de celui-ci"
+ 2_netexstif_route_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, Les informations de montée/Descente à l'arrêt %{error_value} de la Route %{source_objectid} diffèrent sur plusieurs ServiceJourneyPattern, ces informations ne sont pas importées"
+ 2_netexstif_routingconstraintzone_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, l'objet RoutingConstraintZone %{source_objectid} doit référencer au moins deux ScheduledStopPoint"
+ 2_netexstif_routingconstraintzone_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, l'objet RoutingConstraintZone %{source_objectid} a une valeur interdite pour l'attribut ZoneUse : %{error_value}"
+ 2_netexstif_servicejourney_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourney d'identifiant %{source_objectid} ne référence pas de ServiceJourneyPattern"
+ 2_netexstif_servicejourney_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourney d'identifiant %{source_objectid} fournit plus d'un trainNumber"
+ 2_netexstif_servicejourney_3: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : Le nombre d'horaires (passing_times) de l'objet ServiceJourney d'identifiant %{source_objectid} n'est pas cohérent avec le ServiceJourneyPattern associé."
+ 2_netexstif_servicejourney_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} , objet ServiceJourney d'identifiant %{source_objectid} : le passingTime de rang %{error_value} fournit des horaires antérieurs au passingTime précédent."
+ 2_netexstif_servicejourneypattern_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} ne référence pas de Route"
+ 2_netexstif_servicejourneypattern_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} doit contenir au moins 2 StopPointInJourneyPattern"
+ 2_netexstif_servicejourneypattern_3_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} n'a pas de valeur pour l'attribut ServiceJourneyPatternType"
+ 2_netexstif_servicejourneypattern_3_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} a une valeur interdite %{error_value} pour l'attribut ServiceJourneyPatternType différente de 'passenger'"
+ 2_netexstif_servicejourneypattern_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, objet ServiceJourneyPattern d'identifiant %{source_objectid} : les attributs 'order' des StopPointInJourneyPattern ne sont pas croissants." \ No newline at end of file
diff --git a/config/locales/import_messages.fr.yml b/config/locales/import_messages.fr.yml
index bdb0d6c50..1e5054648 100644
--- a/config/locales/import_messages.fr.yml
+++ b/config/locales/import_messages.fr.yml
@@ -1,54 +1,53 @@
fr:
import_messages:
- compliance_check_messages:
- corrupt_zip_file: "Le fichier zip est corrompu, et ne peut être lu"
- inconsistent_zip_file: "Le fichier zip contient des repertoires non prévus : %{spurious_dirs} qui seront ignorés"
- referential_creation: "Le référentiel n'a pas pu être créé car un référentiel existe déjà sur les mêmes périodes et lignes"
- 1_netexstif_2: "Le fichier %{source_filename} ne respecte pas la syntaxe XML ou la XSD NeTEx : erreur '%{error_value}' rencontré"
- 1_netexstif_5: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} a une date de mise à jour dans le futur"
- 2_netexstif_1_1: "Le fichier commun.xml ne contient pas de frame nommée NETEX_COMMUN"
- 2_netexstif_1_2: "Le fichier commun.xml contient une frame nommée %{error_value} non acceptée"
- 2_netexstif_2_1: "Le fichier calendriers.xml ne contient pas de frame nommée NETEX_CALENDRIER"
- 2_netexstif_2_2: "Le fichier calendriers.xml contient une frame nommée %{error_value} non acceptée"
- 2_netexstif_3_1: "Le fichier %{source_filename} ne contient pas de frame nommée NETEX_OFFRE_LIGNE"
- 2_netexstif_3_2: "Le fichier %{source_filename} contient une frame nommée %{error_value} non acceptée"
- 2_netexstif_3_3: "la frame NETEX_OFFRE_LIGNE du fichier %{source_filename} ne contient pas la frame %{error_value} obligatoire"
- 2_netexstif_3_4: "la frame NETEX_OFFRE_LIGNE du fichier %{source_filename} contient une frame %{error_value} non acceptée"
- 2_netexstif_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'identifiant %{source_objectid} de l'objet %{error_value} ne respecte pas la syntaxe %{reference_value}"
- 2_netexstif_5: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{error_value} d'identifiant %{source_objectid} a une date de mise à jour dans le futur"
- 2_netexstif_6: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} a un état de modification interdit : 'delete'"
- 2_netexstif_7: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{reference_value} de syntaxe invalide : %{error_value}"
- 2_netexstif_8_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type externe : référence interne attendue"
- 2_netexstif_8_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type interne mais disposant d'un contenu (version externe possible)"
- 2_netexstif_9_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type interne : référence externe attendue"
- 2_netexstif_9_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type externe sans information de version"
- 2_netexstif_10: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type externe inconnue"
- 2_netexstif_daytype_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet DayType d'identifiant %{source_objectid} ne définit aucun calendrier, il est ignoré"
- 2_netexstif_daytype_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet DayType d'identifiant %{source_objectid} est reliée à des périodes mais ne définit pas de types de jours"
- 2_netexstif_daytypeassignment_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet DayTypeAssignment d'identifiant %{source_objectid} ne peut référencer un OperatingDay"
- 2_netexstif_daytypeassignment_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet DayTypeAssignment d'identifiant %{source_objectid} ne peut référencer un OperatingPeriod sur la condition IsAvailable à faux."
- 2_netexstif_direction_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Direction d'identifiant %{source_objectid} n'a pas de valeur pour l'attribut Name"
- 2_netexstif_direction_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Direction d'identifiant %{source_objectid} définit un attribut %{error_value} non autorisé"
- 2_netexstif_notice_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Notice d'identifiant %{source_objectid} doit définir un texte"
- 2_netexstif_notice_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Notice d'identifiant %{source_objectid} de type %{error_value} est ignoré"
- 2_netexstif_operatingperiod_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet OperatingPeriod d'identifiant %{source_objectid} a une date de fin %{error_value} inférieure ou égale à la date de début %{reference_value}"
- 2_netexstif_passengerstopassignment_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, l'attribut %{source_label} de l'objet PassengerStopAssignment %{source_objectid} doit être renseigné"
- 2_netexstif_passengerstopassignment_2: "L'arrêt %{source_objectid} ne fait pas partie des arrêts disponibles pour votre organisation."
- 2_netexstif_passingtime_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} , objet ServiceJourney d'identifiant %{source_objectid} : le passingTime de rang %{error_value} ne dispose pas de DepartureTime"
- 2_netexstif_passingtime_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} , objet ServiceJourney d'identifiant %{source_objectid} : le passingTime de rang %{error_value} fournit un ArrivalTime supérieur à son DepartureTime"
- 2_netexstif_route_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Route d'identifiant %{source_objectid} a une valeur de l'attribut DirectionType interdite : %{error_value}"
- 2_netexstif_route_2_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Route d'identifiant %{source_objectid} référence un objet Route inverse %{error_value} qui ne le référence pas"
- 2_netexstif_route_2_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Route d'identifiant %{source_objectid} référence un objet Route inverse %{error_value} de même DirectionType"
- 2_netexstif_route_3: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : Les ServiceJourneyPattern de l'objet Route d'identifiant %{source_objectid} ne permettent pas de reconstituer la séquence des arrêts de celui-ci"
- 2_netexstif_route_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, Les informations de montée/Descente à l'arrêt %{error_value} de la Route %{source_objectid} diffèrent sur plusieurs ServiceJourneyPattern, ces informations ne sont pas importées"
- 2_netexstif_routingconstraintzone_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, l'objet RoutingConstraintZone %{source_objectid} doit référencer au moins deux ScheduledStopPoint"
- 2_netexstif_routingconstraintzone_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, l'objet RoutingConstraintZone %{source_objectid} a une valeur interdite pour l'attribut ZoneUse : %{error_value}"
- 2_netexstif_servicejourney_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourney d'identifiant %{source_objectid} ne référence pas de ServiceJourneyPattern"
- 2_netexstif_servicejourney_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourney d'identifiant %{source_objectid} fournit plus d'un trainNumber"
- 2_netexstif_servicejourney_3: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : Le nombre d'horaires (passing_times) de l'objet ServiceJourney d'identifiant %{source_objectid} n'est pas cohérent avec le ServiceJourneyPattern associé."
- 2_netexstif_servicejourney_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} , objet ServiceJourney d'identifiant %{source_objectid} : le passingTime de rang %{error_value} fournit des horaires antérieurs au passingTime précédent."
- 2_netexstif_servicejourneypattern_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} ne référence pas de Route"
- 2_netexstif_servicejourneypattern_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} doit contenir au moins 2 StopPointInJourneyPattern"
- 2_netexstif_servicejourneypattern_3_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} n'a pas de valeur pour l'attribut ServiceJourneyPatternType"
- 2_netexstif_servicejourneypattern_3_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} a une valeur interdite %{error_value} pour l'attribut ServiceJourneyPatternType différente de 'passenger'"
- 2_netexstif_servicejourneypattern_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, objet ServiceJourneyPattern d'identifiant %{source_objectid} : les attributs 'order' des StopPointInJourneyPattern ne sont pas croissants."
+ corrupt_zip_file: "Le fichier zip est corrompu, et ne peut être lu"
+ inconsistent_zip_file: "Le fichier zip contient des repertoires non prévus : %{spurious_dirs} qui seront ignorés"
+ referential_creation: "Le référentiel n'a pas pu être créé car un référentiel existe déjà sur les mêmes périodes et lignes"
+ 1_netexstif_2: "Le fichier %{source_filename} ne respecte pas la syntaxe XML ou la XSD NeTEx : erreur '%{error_value}' rencontré"
+ 1_netexstif_5: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} a une date de mise à jour dans le futur"
+ 2_netexstif_1_1: "Le fichier commun.xml ne contient pas de frame nommée NETEX_COMMUN"
+ 2_netexstif_1_2: "Le fichier commun.xml contient une frame nommée %{error_value} non acceptée"
+ 2_netexstif_2_1: "Le fichier calendriers.xml ne contient pas de frame nommée NETEX_CALENDRIER"
+ 2_netexstif_2_2: "Le fichier calendriers.xml contient une frame nommée %{error_value} non acceptée"
+ 2_netexstif_3_1: "Le fichier %{source_filename} ne contient pas de frame nommée NETEX_OFFRE_LIGNE"
+ 2_netexstif_3_2: "Le fichier %{source_filename} contient une frame nommée %{error_value} non acceptée"
+ 2_netexstif_3_3: "la frame NETEX_OFFRE_LIGNE du fichier %{source_filename} ne contient pas la frame %{error_value} obligatoire"
+ 2_netexstif_3_4: "la frame NETEX_OFFRE_LIGNE du fichier %{source_filename} contient une frame %{error_value} non acceptée"
+ 2_netexstif_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'identifiant %{source_objectid} de l'objet %{error_value} ne respecte pas la syntaxe %{reference_value}"
+ 2_netexstif_5: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{error_value} d'identifiant %{source_objectid} a une date de mise à jour dans le futur"
+ 2_netexstif_6: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} a un état de modification interdit : 'delete'"
+ 2_netexstif_7: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{reference_value} de syntaxe invalide : %{error_value}"
+ 2_netexstif_8_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type externe : référence interne attendue"
+ 2_netexstif_8_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type interne mais disposant d'un contenu (version externe possible)"
+ 2_netexstif_9_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type interne : référence externe attendue"
+ 2_netexstif_9_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type externe sans information de version"
+ 2_netexstif_10: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet %{source_label} d'identifiant %{source_objectid} définit une référence %{error_value} de type externe inconnue"
+ 2_netexstif_daytype_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet DayType d'identifiant %{source_objectid} ne définit aucun calendrier, il est ignoré"
+ 2_netexstif_daytype_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet DayType d'identifiant %{source_objectid} est reliée à des périodes mais ne définit pas de types de jours"
+ 2_netexstif_daytypeassignment_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet DayTypeAssignment d'identifiant %{source_objectid} ne peut référencer un OperatingDay"
+ 2_netexstif_daytypeassignment_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet DayTypeAssignment d'identifiant %{source_objectid} ne peut référencer un OperatingPeriod sur la condition IsAvailable à faux."
+ 2_netexstif_direction_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Direction d'identifiant %{source_objectid} n'a pas de valeur pour l'attribut Name"
+ 2_netexstif_direction_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Direction d'identifiant %{source_objectid} définit un attribut %{error_value} non autorisé"
+ 2_netexstif_notice_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Notice d'identifiant %{source_objectid} doit définir un texte"
+ 2_netexstif_notice_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Notice d'identifiant %{source_objectid} de type %{error_value} est ignoré"
+ 2_netexstif_operatingperiod_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet OperatingPeriod d'identifiant %{source_objectid} a une date de fin %{error_value} inférieure ou égale à la date de début %{reference_value}"
+ 2_netexstif_passengerstopassignment_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, l'attribut %{source_label} de l'objet PassengerStopAssignment %{source_objectid} doit être renseigné"
+ 2_netexstif_passengerstopassignment_2: "L'arrêt %{source_objectid} ne fait pas partie des arrêts disponibles pour votre organisation."
+ 2_netexstif_passingtime_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} , objet ServiceJourney d'identifiant %{source_objectid} : le passingTime de rang %{error_value} ne dispose pas de DepartureTime"
+ 2_netexstif_passingtime_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} , objet ServiceJourney d'identifiant %{source_objectid} : le passingTime de rang %{error_value} fournit un ArrivalTime supérieur à son DepartureTime"
+ 2_netexstif_route_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Route d'identifiant %{source_objectid} a une valeur de l'attribut DirectionType interdite : %{error_value}"
+ 2_netexstif_route_2_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Route d'identifiant %{source_objectid} référence un objet Route inverse %{error_value} qui ne le référence pas"
+ 2_netexstif_route_2_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet Route d'identifiant %{source_objectid} référence un objet Route inverse %{error_value} de même DirectionType"
+ 2_netexstif_route_3: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : Les ServiceJourneyPattern de l'objet Route d'identifiant %{source_objectid} ne permettent pas de reconstituer la séquence des arrêts de celui-ci"
+ 2_netexstif_route_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, Les informations de montée/Descente à l'arrêt %{error_value} de la Route %{source_objectid} diffèrent sur plusieurs ServiceJourneyPattern, ces informations ne sont pas importées"
+ 2_netexstif_routingconstraintzone_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, l'objet RoutingConstraintZone %{source_objectid} doit référencer au moins deux ScheduledStopPoint"
+ 2_netexstif_routingconstraintzone_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, l'objet RoutingConstraintZone %{source_objectid} a une valeur interdite pour l'attribut ZoneUse : %{error_value}"
+ 2_netexstif_servicejourney_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourney d'identifiant %{source_objectid} ne référence pas de ServiceJourneyPattern"
+ 2_netexstif_servicejourney_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourney d'identifiant %{source_objectid} fournit plus d'un trainNumber"
+ 2_netexstif_servicejourney_3: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : Le nombre d'horaires (passing_times) de l'objet ServiceJourney d'identifiant %{source_objectid} n'est pas cohérent avec le ServiceJourneyPattern associé."
+ 2_netexstif_servicejourney_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} , objet ServiceJourney d'identifiant %{source_objectid} : le passingTime de rang %{error_value} fournit des horaires antérieurs au passingTime précédent."
+ 2_netexstif_servicejourneypattern_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} ne référence pas de Route"
+ 2_netexstif_servicejourneypattern_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} doit contenir au moins 2 StopPointInJourneyPattern"
+ 2_netexstif_servicejourneypattern_3_1: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} n'a pas de valeur pour l'attribut ServiceJourneyPatternType"
+ 2_netexstif_servicejourneypattern_3_2: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number} : l'objet ServiceJourneyPattern d'identifiant %{source_objectid} a une valeur interdite %{error_value} pour l'attribut ServiceJourneyPatternType différente de 'passenger'"
+ 2_netexstif_servicejourneypattern_4: "%{source_filename}-Ligne %{source_line_number}-Colonne %{source_column_number}, objet ServiceJourneyPattern d'identifiant %{source_objectid} : les attributs 'order' des StopPointInJourneyPattern ne sont pas croissants."
diff --git a/config/locales/lines.en.yml b/config/locales/lines.en.yml
index 49a629557..4b2bdfdb8 100644
--- a/config/locales/lines.en.yml
+++ b/config/locales/lines.en.yml
@@ -21,8 +21,12 @@ en:
show_company: 'Show company'
new:
title: "Add a new line"
+ create:
+ title: "Add a new line"
edit:
title: "Update line %{name}"
+ update:
+ title: "Update line %{name}"
show:
title: "Line %{name}"
routes:
diff --git a/config/locales/lines.fr.yml b/config/locales/lines.fr.yml
index 8fd409f1e..6317e2930 100644
--- a/config/locales/lines.fr.yml
+++ b/config/locales/lines.fr.yml
@@ -21,8 +21,12 @@ fr:
show_company: 'Voir le transporteur principal'
new:
title: "Ajouter une ligne"
+ create:
+ title: "Ajouter une ligne"
edit:
title: "Editer la ligne %{name}"
+ update:
+ title: "Editer la ligne %{name}"
show:
title: "Ligne %{name}"
routes:
diff --git a/config/locales/stop_areas.en.yml b/config/locales/stop_areas.en.yml
index 69f7c7e99..09e8d1a82 100644
--- a/config/locales/stop_areas.en.yml
+++ b/config/locales/stop_areas.en.yml
@@ -16,7 +16,9 @@ en:
accessibility: "Accessibility"
actions:
new: "Add a new stop"
+ create: "Add a new stop"
edit: "Edit this stop"
+ update: "Edit this stop"
destroy: "Remove"
activate: "Activate this stop"
deactivate: "Deactivate this stop"
@@ -132,7 +134,7 @@ en:
city_name: "City"
created_at: Created at
updated_at: Updated at
- waiting_time: Waiting time
+ waiting_time: Waiting time (minutes)
formtastic:
titles:
stop_area:
diff --git a/config/locales/stop_areas.fr.yml b/config/locales/stop_areas.fr.yml
index f6664afa8..0095bbe6d 100644
--- a/config/locales/stop_areas.fr.yml
+++ b/config/locales/stop_areas.fr.yml
@@ -16,7 +16,9 @@ fr:
accessibility: "Accessibilité"
actions:
new: "Ajouter un arrêt"
+ create: "Ajouter un arrêt"
edit: "Editer cet arrêt"
+ update: "Editer cet arrêt"
destroy: "Supprimer"
activate: "Activer cet arrêt"
deactivate: "Désactiver cet arrêt"
@@ -132,7 +134,7 @@ fr:
city_name: "Commune"
created_at: "Créé le"
updated_at: "Edité le"
- waiting_time: Temps de desserte
+ waiting_time: Temps de desserte (minutes)
formtastic:
titles:
stop_area:
diff --git a/config/routes.rb b/config/routes.rb
index 8b5faff03..0f60733af 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -14,6 +14,7 @@ ChouetteIhm::Application.routes.draw do
resources :compliance_check_sets, only: [:index, :show] do
get :executed, on: :member
resources :compliance_checks, only: [:show]
+ resources :compliance_check_messages, only: [:index]
end
resource :output, controller: :workbench_outputs
diff --git a/db/schema.rb b/db/schema.rb
index f2cf6b4b6..2c5520110 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -956,7 +956,7 @@ ActiveRecord::Schema.define(version: 20180111200406) do
t.integer "route_id", limit: 8
t.integer "journey_pattern_id", limit: 8
t.integer "company_id", limit: 8
- t.string "objectid", null: false
+ t.string "objectid", null: false
t.integer "object_version", limit: 8
t.string "comment"
t.string "status_value"
@@ -968,13 +968,13 @@ ActiveRecord::Schema.define(version: 20180111200406) do
t.integer "number", limit: 8
t.boolean "mobility_restricted_suitability"
t.boolean "flexible_service"
- t.integer "journey_category", default: 0, null: false
+ t.integer "journey_category", default: 0, null: false
t.datetime "created_at"
t.datetime "updated_at"
t.string "checksum"
t.text "checksum_source"
t.string "data_source_ref"
- t.jsonb "custom_field_values"
+ t.jsonb "custom_field_values", default: {}
end
add_index "vehicle_journeys", ["objectid"], name: "vehicle_journeys_objectid_key", unique: true, using: :btree
diff --git a/lib/tasks/referential.rake b/lib/tasks/referential.rake
index 7bab6e040..d53157312 100644
--- a/lib/tasks/referential.rake
+++ b/lib/tasks/referential.rake
@@ -67,4 +67,47 @@ namespace :referential do
referential.update(ready: true)
end
end
+
+ def update_checksums_for_referential referential
+ thing = %w(\\ | / —)
+ Referential.force_register_models_with_checksum if Rails.env.development? && Referential.models_with_checksum.empty?
+ puts "\n \e[33m***\e[0m Referential #{referential.name}"
+ referential.switch do
+ Referential.models_with_checksum.each do |klass|
+ i = 0
+ j = 0
+ prev_size = 1
+ head = "Updating checksums for #{klass.name}: "
+ print head
+ print "⎯"*(80-head.size)
+ print " "
+ count = klass.count
+ klass.find_each do |o|
+ o.update_checksum!
+ if j%10 == 0
+ out = "#{"\b"*prev_size}\e[33m#{thing[i]}\e[0m (#{j}/#{count})"
+ prev_size = out.size - prev_size - 9
+ print out
+ i = (i+1) % thing.size
+ end
+ j += 1
+ end
+ print "#{"\b"*prev_size}\e[32m✓\e[0m (#{count}/#{count})\n"
+ end
+ end
+ end
+
+ desc 'Update all the checksums in the given referential'
+ task :update_checksums_in_referential, [:slug] => :environment do |t, args|
+ referential = Referential.find_by_slug(args[:slug])
+ update_checksums_for_referential referential
+ end
+
+ desc 'Update all the checksums in the given organisation'
+ task :update_checksums_in_organisation, [:organisation_id] => :environment do |t, args|
+ thing = %w(\\ | / —)
+ Organisation.find(args[:organisation_id]).referentials.find_each do |referential|
+ update_checksums_for_referential referential
+ end
+ end
end
diff --git a/package.json b/package.json
index 01625839c..80ca22f83 100644
--- a/package.json
+++ b/package.json
@@ -35,6 +35,7 @@
"grunt-watch-change": "^0.1.1",
"jest": "22.0.4",
"jest-context": "^2.1.0",
+ "jest-environment-jsdom-global": "^1.0.2",
"jest-set": "^2.0.0",
"react-addons-test-utils": "15.6.2",
"react-test-renderer": "^16.2.0",
@@ -47,6 +48,7 @@
"roots": [
"<rootDir>/spec/javascript"
],
+ "testEnvironment": "jest-environment-jsdom-global",
"setupFiles": [
"<rootDir>/spec/javascript/spec_helper.js",
"jest-context/setup",
diff --git a/spec/features/compliance_check_sets_spec.rb b/spec/features/compliance_check_sets_spec.rb
index 6b7d7a4f8..5cace04d4 100644
--- a/spec/features/compliance_check_sets_spec.rb
+++ b/spec/features/compliance_check_sets_spec.rb
@@ -32,7 +32,7 @@ RSpec.describe "ComplianceCheckSets", type: :feature do
expect_breadcrumb_links "Accueil", "Gestion de l'offre", "Liste des rapports de contrôles"
# Headline
- expect( page ).to have_content("Jeu de contrôles exécutés #{compliance_check_set.name}")
+ expect( page ).to have_content(I18n.t("compliance_check_sets.executed.title", name: compliance_check_set.name))
# Information Definition List
expect( page.first('.dl-term') ).to have_content("Nom")
diff --git a/spec/features/workbenches/workbenches_show_spec.rb b/spec/features/workbenches/workbenches_show_spec.rb
index f1151a67b..7be813b94 100644
--- a/spec/features/workbenches/workbenches_show_spec.rb
+++ b/spec/features/workbenches/workbenches_show_spec.rb
@@ -22,11 +22,69 @@ RSpec.describe 'Workbenches', type: :feature do
end
end
+ it 'lists referentials in the current workgroup' do
+ other_workbench = create(
+ :workbench,
+ line_referential: line_ref,
+ workgroup: workbench.workgroup
+ )
+ other_referential = create(
+ :workbench_referential,
+ workbench: other_workbench,
+ organisation: other_workbench.organisation,
+ metadatas: [
+ create(
+ :referential_metadata,
+ lines: [create(:line, line_referential: line_ref)]
+ )
+ ]
+ )
+
+ hidden_referential = create(
+ :workbench_referential,
+ workbench: create(
+ :workbench,
+ line_referential: line_ref
+ ),
+ metadatas: [
+ create(
+ :referential_metadata,
+ lines: [create(:line, line_referential: line_ref)]
+ )
+ ]
+ )
+
+ visit workbench_path(workbench)
+
+ expect(page).to have_content(referential.name),
+ "Couldn't find `referential`: `#{referential.inspect}`"
+ expect(page).to have_content(other_referential.name),
+ "Couldn't find `other_referential`: `#{other_referential.inspect}`"
+ expect(page).to_not have_content(hidden_referential.name),
+ "Couldn't find `hidden_referential`: `#{hidden_referential.inspect}`"
+ end
+
context 'filtering' do
let!(:another_organisation) { create :organisation }
let(:another_line) { create :line, line_referential: line_ref }
let(:another_ref_metadata) { create(:referential_metadata, lines: [another_line]) }
- let!(:other_referential) { create :workbench_referential, workbench: workbench, metadatas: [another_ref_metadata] }
+ let(:other_workbench) do
+ create(
+ :workbench,
+ line_referential: line_ref,
+ organisation: another_organisation,
+ workgroup: workbench.workgroup
+ )
+ end
+ let!(:other_referential) do
+ create(
+ :workbench_referential,
+ workbench: other_workbench,
+ metadatas: [another_ref_metadata],
+ organisation: other_workbench.organisation
+ )
+ end
+
before(:each) do
visit workbench_path(workbench)
@@ -64,6 +122,18 @@ RSpec.describe 'Workbenches', type: :feature do
click_button I18n.t('actions.filter')
expect(find(box)).to be_checked
end
+
+ it 'only lists organisations in the current workgroup' do
+ unaffiliated_workbench = workbench.dup
+ unaffiliated_workbench.update(organisation: create(:organisation))
+
+ expect(page).to have_selector(
+ "#q_organisation_name_eq_any_#{@user.organisation.name.parameterize.underscore}"
+ )
+ expect(page).to_not have_selector(
+ "#q_organisation_name_eq_any_#{unaffiliated_workbench.name.parameterize.underscore}"
+ )
+ end
end
context 'filter by status' do
diff --git a/spec/javascript/time_table/reducers/timetable_spec.js b/spec/javascript/time_table/reducers/timetable_spec.js
index f0f9eaa8c..926fb2687 100644
--- a/spec/javascript/time_table/reducers/timetable_spec.js
+++ b/spec/javascript/time_table/reducers/timetable_spec.js
@@ -22,8 +22,6 @@ let json = {
time_table_dates: time_table_dates
}
-
-
describe('timetable reducer with empty state', () => {
beforeEach(() => {
state = {
@@ -87,6 +85,7 @@ describe('timetable reducer with filled state', () => {
periode_range: periode_range,
currentPage: current_periode_range
}
+ jsdom.reconfigure({url: "http://example.com/foo/bar"})
expect(
timetableReducer(state, {
type: 'GO_TO_PREVIOUS_PAGE',
diff --git a/spec/javascript/vehicle_journeys/components/CustomFieldsInputs_spec.js b/spec/javascript/vehicle_journeys/components/CustomFieldsInputs_spec.js
index 786b74cc7..4f8d42d2d 100644
--- a/spec/javascript/vehicle_journeys/components/CustomFieldsInputs_spec.js
+++ b/spec/javascript/vehicle_journeys/components/CustomFieldsInputs_spec.js
@@ -2,7 +2,6 @@ import React, { Component } from 'react'
import CustomFieldsInputs from '../../../../app/javascript/vehicle_journeys/components/tools/CustomFieldsInputs'
import renderer from 'react-test-renderer'
require('select2')
-console.log($().jquery)
describe('CustomFieldsInputs', () => {
set('values', () => {
diff --git a/spec/javascript/vehicle_journeys/reducers/vehicleJourneys_spec.js b/spec/javascript/vehicle_journeys/reducers/vehicleJourneys_spec.js
index 31973b390..0d7612a80 100644
--- a/spec/javascript/vehicle_journeys/reducers/vehicleJourneys_spec.js
+++ b/spec/javascript/vehicle_journeys/reducers/vehicleJourneys_spec.js
@@ -241,6 +241,83 @@ describe('vehicleJourneys reducer', () => {
}, ...state])
})
+ it('should handle ADD_VEHICLEJOURNEY with a start time and a fully timed JP but the minutes are not set', () => {
+ let pristineVjasList = [{
+ delta : 0,
+ arrival_time : {
+ hour: 22,
+ minute: 0
+ },
+ departure_time : {
+ hour: 22,
+ minute: 0
+ },
+ stop_point_objectid: 'test-1',
+ stop_area_cityname: 'city',
+ dummy: false
+ },
+ {
+ delta : 0,
+ arrival_time : {
+ hour: 22,
+ minute: 3
+ },
+ departure_time : {
+ hour: 22,
+ minute: 3
+ },
+ stop_point_objectid: 'test-2',
+ stop_area_cityname: 'city',
+ dummy: false
+ }]
+ let fakeData = {
+ published_journey_name: {value: 'test'},
+ published_journey_identifier: {value : ''},
+ "start_time.hour": {value : '22'},
+ "start_time.minute": {value : ''}
+ }
+ let fakeSelectedJourneyPattern = {
+ id: "1",
+ full_schedule: true,
+ stop_areas: [
+ {stop_area_short_description: {id: 1}},
+ {stop_area_short_description: {id: 2}},
+ ],
+ costs: {
+ "1-2": {
+ distance: 10,
+ time: 63
+ },
+ }
+ }
+ let fakeSelectedCompany = {name: "ALBATRANS"}
+ expect(
+ vjReducer(state, {
+ type: 'ADD_VEHICLEJOURNEY',
+ data: fakeData,
+ selectedJourneyPattern: fakeSelectedJourneyPattern,
+ stopPointsList: [{object_id: 'test-1', city_name: 'city', stop_area_id: 1, id: 1, time_zone_offset: 0}, {object_id: 'test-2', city_name: 'city', stop_area_id: 2, id: 2, time_zone_offset: -3600}],
+ selectedCompany: fakeSelectedCompany
+ })
+ ).toEqual([{
+ journey_pattern: fakeSelectedJourneyPattern,
+ company: fakeSelectedCompany,
+ published_journey_name: 'test',
+ published_journey_identifier: '',
+ short_id: '',
+ objectid: '',
+ footnotes: [],
+ time_tables: [],
+ purchase_windows: [],
+ vehicle_journey_at_stops: pristineVjasList,
+ selected: false,
+ custom_fields: undefined,
+ deletable: false,
+ transport_mode: 'undefined',
+ transport_submode: 'undefined'
+ }, ...state])
+ })
+
it('should handle RECEIVE_VEHICLE_JOURNEYS', () => {
expect(
vjReducer(state, {
diff --git a/spec/models/custom_field_spec.rb b/spec/models/custom_field_spec.rb
index 6ebf994db..8a6d0cb41 100644
--- a/spec/models/custom_field_spec.rb
+++ b/spec/models/custom_field_spec.rb
@@ -5,6 +5,7 @@ RSpec.describe CustomField, type: :model do
context "validates" do
it { should validate_uniqueness_of(:name).scoped_to(:resource_type) }
+ it { should validate_uniqueness_of(:code).scoped_to(:resource_type).case_insensitive }
end
context "field access" do
diff --git a/spec/views/offer_workbenches/show.html.erb_spec.rb b/spec/views/offer_workbenches/show.html.erb_spec.rb
index 138a1560d..2a2642911 100644
--- a/spec/views/offer_workbenches/show.html.erb_spec.rb
+++ b/spec/views/offer_workbenches/show.html.erb_spec.rb
@@ -22,7 +22,13 @@ describe "workbenches/show", :type => :view do
}
let!(:workbench){ assign :workbench, create(:workbench) }
let!(:same_organisation_referential){ create :workbench_referential, workbench: workbench, metadatas: [create(:referential_metadata, lines: lines)] }
- let!(:different_organisation_referential){ create :workbench_referential, metadatas: [create(:referential_metadata, lines: lines)] }
+ let!(:different_organisation_referential) do
+ create(
+ :workbench_referential,
+ workbench: create(:workbench, workgroup: workbench.workgroup),
+ metadatas: [create(:referential_metadata, lines: lines)]
+ )
+ end
let!(:referentials){
same_organisation_referential && different_organisation_referential
assign :wbench_refs, paginate_collection(Referential, ReferentialDecorator)
diff --git a/yarn.lock b/yarn.lock
index 3e19cecbc..e95ee9a63 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3462,6 +3462,10 @@ jest-docblock@^22.0.3:
dependencies:
detect-newline "^2.1.0"
+jest-environment-jsdom-global@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/jest-environment-jsdom-global/-/jest-environment-jsdom-global-1.0.2.tgz#b3449e016e0b13cb0779704e29a1377f927b38a3"
+
jest-environment-jsdom@^22.0.5:
version "22.0.5"
resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.0.5.tgz#7b479452e387aef5b4bf8b9fe03e8be77493f5ea"