aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Donnet2018-05-17 14:21:11 +0200
committerLuc Donnet2018-05-17 14:21:11 +0200
commitd021c0698a99be789491d9719dbb6c269006f2bb (patch)
treea573fd4beb161b5f75b6cdafd7ab430a8f4743e2
parent27340235bf523f1d82ac9c8f709a73bfb112a06b (diff)
downloadchouette-core-d021c0698a99be789491d9719dbb6c269006f2bb.tar.bz2
Fix import details Refs #70737073-Fix_imports_details
-rw-r--r--app/models/import/netex.rb1
-rw-r--r--app/views/imports/import/_gtf.html.slim5
-rw-r--r--app/views/imports/import/_netex.html.slim5
-rw-r--r--app/views/imports/import/_workbench.html.slim2
-rw-r--r--app/views/imports/show.html.slim2
-rw-r--r--config/breadcrumbs.rb10
-rw-r--r--config/locales/import_messages.en.yml2
-rw-r--r--config/locales/import_messages.fr.yml3
8 files changed, 20 insertions, 10 deletions
diff --git a/app/models/import/netex.rb b/app/models/import/netex.rb
index b4422328c..753f9128d 100644
--- a/app/models/import/netex.rb
+++ b/app/models/import/netex.rb
@@ -100,7 +100,6 @@ class Import::Netex < Import::Base
metadata.periodes = frame.periods
line_objectids = frame.line_refs.map { |ref| "STIF:CODIFLIGNE:Line:#{ref}" }
- create_message criticity: :info, message_key: "referential_creation_lines_found", message_attributes: {line_objectids: line_objectids.to_sentence}
metadata.line_ids = workbench.lines.where(objectid: line_objectids).pluck(:id)
end
end
diff --git a/app/views/imports/import/_gtf.html.slim b/app/views/imports/import/_gtf.html.slim
index 0c72f007f..e50b45888 100644
--- a/app/views/imports/import/_gtf.html.slim
+++ b/app/views/imports/import/_gtf.html.slim
@@ -1,7 +1,8 @@
+- breadcrumb :gtfs_import, @workbench, @import
+
.row
.col-lg-6.col-md-6.col-sm-12.col-xs-12
- - metadata = { t('.parent') => link_to(@import.parent.name, [@import.parent.workbench, @import.parent]) }
- - metadata = metadata.update({t('.status') => import_status(@import.status, verbose: true) })
+ - metadata = {t('.status') => import_status(@import.status, verbose: true) }
- metadata = metadata.update({t('.referential') => @import.referential ? link_to(@import.referential.name, [@import.referential]) : "-" })
= definition_list t('metadatas'), metadata
diff --git a/app/views/imports/import/_netex.html.slim b/app/views/imports/import/_netex.html.slim
index 38ebfd46f..ab0ed20d7 100644
--- a/app/views/imports/import/_netex.html.slim
+++ b/app/views/imports/import/_netex.html.slim
@@ -1,7 +1,8 @@
+- breadcrumb :netex_import, @workbench, @import
+
.row
.col-lg-6.col-md-6.col-sm-12.col-xs-12
- - metadata = { t('imports.show.parent') => link_to(@import.parent.name, [@import.parent.workbench, @import.parent]) }
- - metadata = metadata.update({Import::Base.tmf(:status) => import_status(@import.status, verbose: true) })
+ - metadata = {Import::Base.tmf(:status) => import_status(@import.status, verbose: true) }
- metadata = metadata.update({Import::Base.tmf(:referential) => @import.referential ? link_to(@import.referential.name, [@import.referential]) : "-" })
= definition_list t('metadatas'), metadata
diff --git a/app/views/imports/import/_workbench.html.slim b/app/views/imports/import/_workbench.html.slim
index d35089784..cbdf604c2 100644
--- a/app/views/imports/import/_workbench.html.slim
+++ b/app/views/imports/import/_workbench.html.slim
@@ -1,3 +1,5 @@
+- breadcrumb :import, @workbench, @import
+
.row
.col-lg-6.col-md-6.col-sm-12.col-xs-12
- metadata = { t('.data_recovery') => '-', t('imports.show.filename') => @import.try(:file_identifier)}
diff --git a/app/views/imports/show.html.slim b/app/views/imports/show.html.slim
index 10552129d..fb83e9a06 100644
--- a/app/views/imports/show.html.slim
+++ b/app/views/imports/show.html.slim
@@ -1,5 +1,3 @@
-- breadcrumb :import, @workbench, @import
-
- page_header_content_for @import
.page_content
diff --git a/config/breadcrumbs.rb b/config/breadcrumbs.rb
index babaa2c8c..97bbcefc5 100644
--- a/config/breadcrumbs.rb
+++ b/config/breadcrumbs.rb
@@ -121,6 +121,16 @@ crumb :import do |workbench, import|
parent :imports, workbench
end
+crumb :netex_import do |workbench, netex_import|
+ link breadcrumb_name(netex_import), workbench_import_path(workbench, netex_import)
+ parent :import, workbench, netex_import.parent
+end
+
+crumb :gtfs_import do |workbench, gtfs_import|
+ link breadcrumb_name(gtfs_import), workbench_import_path(workbench, gtfs_import)
+ parent :import, workbench, gtfs_import.parent
+end
+
crumb :export do |workbench, export|
link breadcrumb_name(export), workbench_export_path(workbench, export)
parent :exports, workbench
diff --git a/config/locales/import_messages.en.yml b/config/locales/import_messages.en.yml
index 27035ba84..211ac426c 100644
--- a/config/locales/import_messages.en.yml
+++ b/config/locales/import_messages.en.yml
@@ -5,7 +5,7 @@ en:
missing_calendar_in_zip_file: "The folder %{source_filename} lacks a calendar file"
wrong_calendar_in_zip_file: "The calendar file %{source_filename} cannot be parsed, or contains inconsistant data"
referential_creation: "The referential %{referential_name} has not been created because another referential with the same lines and periods already exists"
- referential_creation_missing_lines: "The referential %{referential_name} has not been created because no matching line has been found"
+ referential_creation_missing_lines: "The referential %{referential_name} has not been created because a line has not be found in the organization"
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"
diff --git a/config/locales/import_messages.fr.yml b/config/locales/import_messages.fr.yml
index a8dd31f8a..c15171ac4 100644
--- a/config/locales/import_messages.fr.yml
+++ b/config/locales/import_messages.fr.yml
@@ -6,8 +6,7 @@ fr:
wrong_calendar_in_zip_file: "Le calendrier contenu dans %{source_filename} contient des données incorrectes ou incohérentes"
referential_creation: "Le référentiel %{referential_name} n'a pas pu être créé."
referential_creation_overlapping_existing_referential: "Le référentiel %{referential_name} n'a pas pu être créé car un référentiel existe déjà sur les mêmes périodes et lignes: <a href='%{overlapped_url}'>%{overlapped_name}</a>"
- referential_creation_missing_lines: "Le référentiel %{referential_name} n'a pas pu être créé car aucune ligne ne correspond"
- referential_creation_lines_found: "Lignes lues dans le dossier: %{line_objectids}"
+ referential_creation_missing_lines: "Le référentiel %{referential_name} n'a pas pu être créé car au moins une ligne n'appartient pas à l'organisation"
gtfs:
agencies:
imported: "%{count} agence(s) importée(s)"