diff options
| author | Guillaume | 2017-10-31 11:54:08 +0100 |
|---|---|---|
| committer | Guillaume | 2017-10-31 11:54:08 +0100 |
| commit | f201d7cdd68ca554e7a99eb791baf48a540b8978 (patch) | |
| tree | 428c823e77c330cdc5ea85e03ff34805bdae854e /config | |
| parent | 90173e6bdd12d1aabe68a0d28f4f228782d3adf0 (diff) | |
| parent | 718d9ab7f8d5b1cd125ee341bd098c41615a0cbd (diff) | |
| download | chouette-core-f201d7cdd68ca554e7a99eb791baf48a540b8978.tar.bz2 | |
Merge branch 'master' into 4755-page_for_validate_referential
Diffstat (limited to 'config')
| -rw-r--r-- | config/breadcrumbs.rb | 249 | ||||
| -rw-r--r-- | config/initializers/relationship.rb | 17 | ||||
| -rw-r--r-- | config/locales/breadcrumbs.en.yml | 7 | ||||
| -rw-r--r-- | config/locales/breadcrumbs.fr.yml | 7 | ||||
| -rw-r--r-- | config/locales/compliance_control_sets.en.yml | 2 | ||||
| -rw-r--r-- | config/locales/compliance_control_sets.fr.yml | 2 | ||||
| -rw-r--r-- | config/locales/import_messages.en.yml | 3 | ||||
| -rw-r--r-- | config/locales/import_messages.fr.yml | 3 | ||||
| -rw-r--r-- | config/locales/imports.en.yml | 4 | ||||
| -rw-r--r-- | config/locales/imports.fr.yml | 4 | ||||
| -rw-r--r-- | config/locales/routes.fr.yml | 2 |
11 files changed, 283 insertions, 17 deletions
diff --git a/config/breadcrumbs.rb b/config/breadcrumbs.rb new file mode 100644 index 000000000..a9652fc89 --- /dev/null +++ b/config/breadcrumbs.rb @@ -0,0 +1,249 @@ +crumb :root do + link I18n.t('layouts.home'), root_path +end + +crumb :workbench do |workbench| + link workbench.name, workbench_path(workbench) +end + +crumb :referential do |referential| + link referential.name, referential_path(referential) + parent :workbench, current_offer_workbench +end + +crumb :referential_companies do |referential| + link I18n.t('companies.index.title'), referential_companies_path(referential) + parent :referential, referential +end + +crumb :referential_company do |referential, company| + link company.name, referential_company_path(referential, company) + parent :referential_companies, referential +end + +crumb :referential_networks do |referential| + link I18n.t('networks.index.title'), referential_networks_path + parent :referential, referential +end + +crumb :referential_network do |referential, network| + link network.name, referential_network_path(referential, network) + parent :referential_networks, referential +end + +crumb :referential_group_of_lines do |referential| + link I18n.t('group_of_lines.index.title'), referential_networks_path(referential) + parent :referential, referential +end + +crumb :referential_group_of_line do |referential, group_of_line| + link group_of_line.name, referential_group_of_line_path(referential, group_of_line) + parent :referential_group_of_lines, referential +end + +crumb :referential_route_sections do |referential| + link I18n.t('route_sections.index.title'), referential_route_sections_path(referential) + parent :referential, referential +end + +crumb :referential_route_section do |referential, route_section| + link route_section.departure.name, referential_route_section_path(referential, route_section) + parent :referential_route_sections, referential +end + + +crumb :time_tables do |referential| + link I18n.t('time_tables.index.title'), referential_time_tables_path(referential) + parent :referential, referential +end + +crumb :time_table do |referential, time_table| + link time_table.comment, referential_time_table_path(referential, time_table) + parent :time_tables, referential +end + +crumb :timebands do |referential| + link I18n.t('timebands.index.title'), referential_timebands_path(referential) + parent :referential, referential +end + +crumb :timeband do |referential, timeband| + link timeband.name, referential_timeband_path(referential, timeband) + parent :timebands, referential +end + +crumb :compliance_check_sets do |workbench| + link I18n.t('compliance_check_sets.index.title'), workbench_compliance_check_sets_path(workbench) + parent :workbench, workbench +end + +crumb :compliance_check_set do |workbench, compliance_check_set| + link compliance_check_set.name, 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 +end + +crumb :import do |workbench, import| + link import.name, workbench_import_path(workbench, import) + parent :imports, workbench +end + +crumb :organisation do |organisation| + link organisation.name, organisation_path(organisation) +end + +crumb :compliance_control_sets do + link I18n.t('compliance_control_sets.index.title'), compliance_control_sets_path +end + +crumb :compliance_control_set do |compliance_control_set| + link compliance_control_set.name, compliance_control_set_path(compliance_control_set) + parent :compliance_control_sets +end + +crumb :compliance_control do |compliance_control| + link compliance_control.name, compliance_control_set_compliance_control_path(compliance_control.compliance_control_set, compliance_control) + parent :compliance_control_set, compliance_control.compliance_control_set +end + +crumb :stop_area_referential do |stop_area_referential| + link I18n.t('stop_area_referentials.show.title'), stop_area_referential_path(stop_area_referential) +end + +crumb :stop_areas do |stop_area_referential| + link I18n.t('stop_areas.index.title'), stop_area_referential_stop_areas_path(stop_area_referential) + parent :stop_area_referential, stop_area_referential +end + +crumb :stop_area do |stop_area_referential, stop_area| + link stop_area.name, stop_area_referential_stop_area_path(stop_area_referential, stop_area) + parent :stop_areas, stop_area_referential +end + +crumb :line_referential do |line_referential| + link I18n.t('line_referentials.show.title'), line_referential_path(line_referential) +end + +crumb :companies do |line_referential| + link I18n.t('companies.index.title'), line_referential_companies_path(line_referential) + parent :line_referential, line_referential +end + +crumb :company do |company| + link company.name, line_referential_company_path(company.line_referential, company) + parent :companies, company.line_referential +end + +crumb :networks do |line_referential| + link I18n.t('networks.index.title'), line_referential_networks_path(line_referential) + parent :line_referential, line_referential +end + +crumb :network do |network| + link network.name, line_referential_network_path(network.line_referential, network) + parent :networks, network.line_referential +end + +crumb :group_of_lines do |line_referential| + link I18n.t('group_of_lines.index.title'), line_referential_group_of_lines_path(line_referential) + parent :line_referential, line_referential +end + +crumb :group_of_line do |group_of_line| + link group_of_line.name, line_referential_group_of_line_path(group_of_line.line_referential, group_of_line) + parent :group_of_lines, group_of_line.line_referential +end + +crumb :lines do |line_referential| + link I18n.t('lines.index.title'), line_referential_lines_path + parent :line_referential, line_referential +end + +crumb :line do |line| + link line.name, line_referential_line_path(line.line_referential, line) + parent :lines, line.line_referential +end + +crumb :calendars do + link I18n.t('calendars.index.title'), calendars_path +end + +crumb :calendar do |calendar| + link calendar.name, calendar_path(calendar) + parent :calendars +end + +crumb :referential_line do |referential, line| + link line.name, referential_line_path(referential, line) + parent :referential, referential +end + +crumb :line_footnotes do |referential, line| + link line.name, referential_line_footnotes_path(referential, line) + parent :referential_line, referential, line +end + +crumb :routing_constraint_zones do |referential, line| + link I18n.t('routing_constraint_zones.index.title'), referential_line_routing_constraint_zones_path(referential, line) + parent :referential_line, referential, line +end + +crumb :routing_constraint_zone do |referential, line, routing_constraint_zone| + link routing_constraint_zone.name, referential_line_routing_constraint_zone_path(referential, line, routing_constraint_zone) + parent :routing_constraint_zones, referential, line +end + +crumb :route do |referential, route| + link I18n.t('routes.index.title', route: route.name), referential_line_route_path(referential, route.line, route) + parent :referential_line, referential, route.line +end + +crumb :journey_patterns do |referential, route| + link I18n.t('journey_patterns.index.title'), referential_line_route_journey_patterns_collection_path(referential, route.line, route) + parent :route, referential, route +end + +crumb :referential_stop_areas do |referential| + link I18n.t('stop_areas.index.title'), referential_stop_areas_path(referential) + parent :referential, referential +end + +crumb :referential_stop_area do |referential, stop_area| + link stop_area.name, referential_stop_area_path(referential, stop_area) + parent :referential_stop_areas, referential +end + +crumb :vehicle_journeys do |referential, route| + link I18n.t('vehicle_journeys.index.title', route: route.name), referential_line_route_vehicle_journeys_path(referential, route.line, route) + parent :route, referential, route +end + +# crumb :compliance_controls do|compliance_control_sets| +# link +# parent :compliance_control_sets, compliance_control_sets +# end + +# crumb :project do |project| +# link project.name, project_path(project) +# parent :projects +# end + +# crumb :project_issues do |project| +# link "Issues", project_issues_path(project) +# parent :project, project +# end + +# crumb :issue do |issue| +# link issue.title, issue_path(issue) +# parent :project_issues, issue.project +# end + +# If you want to split your breadcrumbs configuration over multiple files, you +# can create a folder named `config/breadcrumbs` and put your configuration +# files there. All *.rb files (e.g. `frontend.rb` or `products.rb`) in that +# folder are loaded and reloaded automatically when you change them, just like +# this file (`config/breadcrumbs.rb`). diff --git a/config/initializers/relationship.rb b/config/initializers/relationship.rb new file mode 100644 index 000000000..492aa627f --- /dev/null +++ b/config/initializers/relationship.rb @@ -0,0 +1,17 @@ +if Rails.env.development? + require 'rails_erd/domain/relationship' + + module RailsERD + class Domain + class Relationship + class << self + private + + def association_identity(association) + Set[association_owner(association), association_target(association)] + end + end + end + end + end +end diff --git a/config/locales/breadcrumbs.en.yml b/config/locales/breadcrumbs.en.yml deleted file mode 100644 index 6fec15b85..000000000 --- a/config/locales/breadcrumbs.en.yml +++ /dev/null @@ -1,7 +0,0 @@ -en: - breadcrumbs: - vehicle_journeys: "Passing times" - vehicle_journey_frequencies: "Times bands" - referentials: "Home" - users: "Users" - imports: Imports diff --git a/config/locales/breadcrumbs.fr.yml b/config/locales/breadcrumbs.fr.yml deleted file mode 100644 index 725549f14..000000000 --- a/config/locales/breadcrumbs.fr.yml +++ /dev/null @@ -1,7 +0,0 @@ -fr: - breadcrumbs: - vehicle_journeys: "Horaires" - vehicle_journey_frequencies: "Créneaux horaires" - root: "Accueil" - users: "Utilisateurs" - imports: Imports diff --git a/config/locales/compliance_control_sets.en.yml b/config/locales/compliance_control_sets.en.yml index ed7ccad5e..7361edacf 100644 --- a/config/locales/compliance_control_sets.en.yml +++ b/config/locales/compliance_control_sets.en.yml @@ -1,7 +1,7 @@ en: compliance_control_sets: clone: - prefix: 'Copie de' + prefix: 'Copy of' errors: operation_in_progress: "The clone operation is in progress. Please wait and refresh the page in a few moments" index: diff --git a/config/locales/compliance_control_sets.fr.yml b/config/locales/compliance_control_sets.fr.yml index d952567bf..19f6f08ee 100644 --- a/config/locales/compliance_control_sets.fr.yml +++ b/config/locales/compliance_control_sets.fr.yml @@ -1,7 +1,7 @@ fr: compliance_control_sets: clone: - prefix: 'Copy of' + prefix: 'Copie de' errors: operation_in_progress: "L'opération de clone est en cours. Veuillez patienter et raffraichir la page dans quelques instants" index: diff --git a/config/locales/import_messages.en.yml b/config/locales/import_messages.en.yml index 4009d7c77..2048b9794 100644 --- a/config/locales/import_messages.en.yml +++ b/config/locales/import_messages.en.yml @@ -1,6 +1,8 @@ en: import_messages: compliance_check_messages: + corrupt_zip_file: "The zip file of WorkbenchImport %{import_name} is corrupted and cannot be read" + inconsistent_zip_file: "The zip file of WorkbenchImport %{import_name} contains the following spurious 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ême 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" @@ -13,6 +15,7 @@ en: 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" diff --git a/config/locales/import_messages.fr.yml b/config/locales/import_messages.fr.yml index 085299bb4..9f0af1faa 100644 --- a/config/locales/import_messages.fr.yml +++ b/config/locales/import_messages.fr.yml @@ -1,6 +1,8 @@ fr: import_messages: compliance_check_messages: + corrupt_zip_file: "Le fichier zip du WorkbenchImport %{import_name} est corrompu, et ne peut être lu" + inconsistent_zip_file: "Le fichier zip du WorkbenchImport %{import_name} contient les repertoirs illegeaux %{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ême 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" @@ -13,6 +15,7 @@ fr: 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" diff --git a/config/locales/imports.en.yml b/config/locales/imports.en.yml index 9bf877c86..f3bcad9e9 100644 --- a/config/locales/imports.en.yml +++ b/config/locales/imports.en.yml @@ -53,6 +53,10 @@ en: zero: "import" one: "NeTEx import" other: "imports" + errors: + models: + imports: + wrong_file_extension: "The imported file must be a zip file" attributes: import: resources: "File to import" diff --git a/config/locales/imports.fr.yml b/config/locales/imports.fr.yml index 6998c89d2..6e74fa33c 100644 --- a/config/locales/imports.fr.yml +++ b/config/locales/imports.fr.yml @@ -53,6 +53,10 @@ fr: zero: "import" one: "import NeTEx" other: "imports" + errors: + models: + imports: + wrong_file_extension: "Le fichier importé doit être au format zip" attributes: import: resources: "Fichier à importer" diff --git a/config/locales/routes.fr.yml b/config/locales/routes.fr.yml index 83a96732d..31838f1a7 100644 --- a/config/locales/routes.fr.yml +++ b/config/locales/routes.fr.yml @@ -81,7 +81,7 @@ fr: number: "Indice" comment: "Commentaire" direction: "Direction" - wayback: "Direction" + wayback: "Sens" stop_points: "Nb arrêts" journey_patterns: "Nb missions" opposite_route: "Itinéraire associé" |
