diff options
| -rw-r--r-- | app/assets/images/compliance_check_task-pending.png | bin | 1373 -> 1311 bytes | |||
| -rw-r--r-- | app/assets/images/import_task-pending.png | bin | 1373 -> 1311 bytes | |||
| -rw-r--r-- | app/controllers/compliance_check_tasks_controller.rb | 6 | ||||
| -rw-r--r-- | app/controllers/exports_controller.rb | 2 | ||||
| -rw-r--r-- | app/controllers/import_tasks_controller.rb | 4 | ||||
| -rw-r--r-- | app/views/compliance_check_tasks/_compliance_check_task.erb | 3 | ||||
| -rw-r--r-- | app/views/exports/_export.erb | 3 | ||||
| -rw-r--r-- | app/views/import_tasks/_import_task.erb | 3 | ||||
| -rw-r--r-- | config/locales/compliance_check_tasks.yml | 6 | ||||
| -rw-r--r-- | config/locales/exports.yml | 8 | ||||
| -rw-r--r-- | config/locales/import_tasks.yml | 6 |
11 files changed, 34 insertions, 7 deletions
diff --git a/app/assets/images/compliance_check_task-pending.png b/app/assets/images/compliance_check_task-pending.png Binary files differindex 21a702d4f..d5af6a807 100644 --- a/app/assets/images/compliance_check_task-pending.png +++ b/app/assets/images/compliance_check_task-pending.png diff --git a/app/assets/images/import_task-pending.png b/app/assets/images/import_task-pending.png Binary files differindex cfdb7b421..d5af6a807 100644 --- a/app/assets/images/import_task-pending.png +++ b/app/assets/images/import_task-pending.png diff --git a/app/controllers/compliance_check_tasks_controller.rb b/app/controllers/compliance_check_tasks_controller.rb index 45794199a..9acce4510 100644 --- a/app/controllers/compliance_check_tasks_controller.rb +++ b/app/controllers/compliance_check_tasks_controller.rb @@ -16,6 +16,12 @@ class ComplianceCheckTasksController < ChouetteController render "rule_parameter_sets/show" end + def create + create! do |success, failure| + success.html { flash[:notice] = I18n.t('compliance_check_tasks.new.flash'); redirect_to referential_compliance_check_tasks_path(@referential) } + end + end + protected alias_method :compliance_check_task, :resource diff --git a/app/controllers/exports_controller.rb b/app/controllers/exports_controller.rb index 2f14ab359..8805c8078 100644 --- a/app/controllers/exports_controller.rb +++ b/app/controllers/exports_controller.rb @@ -14,7 +14,7 @@ class ExportsController < ChouetteController def create create! do |success, failure| available_exports - success.html { redirect_to referential_exports_path(@referential) } + success.html { flash[:notice] = I18n.t('exports.new.flash'); redirect_to referential_exports_path(@referential) } end end diff --git a/app/controllers/import_tasks_controller.rb b/app/controllers/import_tasks_controller.rb index 36710bb69..37de83f4d 100644 --- a/app/controllers/import_tasks_controller.rb +++ b/app/controllers/import_tasks_controller.rb @@ -25,9 +25,9 @@ class ImportTasksController < ChouetteController end def create - create! do |success, failure| + create! do |success, failure| available_imports - success.html { redirect_to referential_import_tasks_path(@referential) } + success.html { flash[:notice] = I18n.t('import_tasks.new.flash'); redirect_to referential_import_tasks_path(@referential) } end end diff --git a/app/views/compliance_check_tasks/_compliance_check_task.erb b/app/views/compliance_check_tasks/_compliance_check_task.erb index b3b62e1f5..081b04b46 100644 --- a/app/views/compliance_check_tasks/_compliance_check_task.erb +++ b/app/views/compliance_check_tasks/_compliance_check_task.erb @@ -7,6 +7,9 @@ <li class="title"><%= link_to(compliance_check_task.name, referential_compliance_check_task_path(@referential, compliance_check_task)) %></li> <li class="remove"><%= link_to "<i class='fa fa-trash-o'></i>".html_safe, referential_compliance_check_task_path(@referential, compliance_check_task), :method => :delete, :class => "delete", :data => {:confirm => t('compliance_check_tasks.actions.destroy_confirm')} %></li> </ul> + <div class="history"> + <%= t("compliance_check_tasks.statuses.#{compliance_check_task.status}") %> + </div> <div class="links"> <% if compliance_check_task.import_task.present? %> <p><%= link_to( image_tag('icons/link_page.png') + t("compliance_check_tasks.import_task"), referential_import_task_path(@referential, compliance_check_task.import_task)) %></p> diff --git a/app/views/exports/_export.erb b/app/views/exports/_export.erb index 3d312c266..a307d856b 100644 --- a/app/views/exports/_export.erb +++ b/app/views/exports/_export.erb @@ -9,6 +9,9 @@ </li> <li class="remove"><%= link_to "<i class='fa fa-trash-o'></i>".html_safe, referential_export_path(@referential, export), :method => :delete, :data => {:confirm => t('exports.actions.destroy_confirm')}, :class => "remove" %></li> </ul> + <div class="history"> + <%= t("exports.statuses.#export.status}") %> + </div> <div class="links"> <% if export.status == 'completed' %> <%= link_to t("exports.actions.download"), referential_export_path(@referential, export, :format => :zip), :class => "download" %> diff --git a/app/views/import_tasks/_import_task.erb b/app/views/import_tasks/_import_task.erb index c65ee591c..df497fb05 100644 --- a/app/views/import_tasks/_import_task.erb +++ b/app/views/import_tasks/_import_task.erb @@ -7,6 +7,9 @@ <li class="title"><% if import_task.save_requested? %><i class="fa fa-save"></i><% end %> <%= link_to(import_task.name, referential_import_task_path(@referential, import_task)) %></li> <li class="remove"><%= link_to "<i class='fa fa-trash-o'></i>".html_safe, referential_import_task_path(@referential, import_task), :method => :delete, :class => "delete", :data => {:confirm => t('import_tasks.actions.destroy_confirm')} %></li> </ul> + <div class="history"> + <%= t("import_tasks.statuses.#{import_task.status}") %> + </div> <div class="links"> <p><%= link_to image_tag("icons/file_#{import_task.file_path_extension}.png") + t("import_tasks.show.imported_file"), file_to_import_referential_import_task_path(@referential, import_task) %></p> <% if import_task.compliance_check_task.present? %> diff --git a/config/locales/compliance_check_tasks.yml b/config/locales/compliance_check_tasks.yml index c9472136a..5f9e15113 100644 --- a/config/locales/compliance_check_tasks.yml +++ b/config/locales/compliance_check_tasks.yml @@ -16,6 +16,7 @@ en: title: "Create a new validation" submit: "Create a validation" all: "All" + flash: "Validation task on queue, refresh page to see progression" actions: new: "Add a validation" destroy_confirm: "Do you confirm to destroy this validation ?" @@ -24,6 +25,7 @@ en: rule_parameter_set: "Rule parameter set" statuses: pending: "Pending" + processing: "Processing" completed: "Completed" failed: "Failed" file_validation_log_messages: @@ -80,6 +82,7 @@ fr: title: "Démarrer une nouvelle validation" submit: "Lancer la validation" all: "Toutes" + flash: "La demande de validation est mise en file d'attente, veuillez rafraichir régulièrement la page pour le suivre" actions: new: "Ajouter une validation" destroy_confirm: "Voulez-vous supprimer ce résultat de validation ?" @@ -87,7 +90,8 @@ fr: edit: "Editer cette validation" rule_parameter_set: "Jeu de paramètres" statuses: - pending: "En cours" + pending: "En attente ..." + processing: "En cours ..." completed: "Achevé" failed: "Echoué" uncheck_count: diff --git a/config/locales/exports.yml b/config/locales/exports.yml index cf21a4787..970f7381c 100644 --- a/config/locales/exports.yml +++ b/config/locales/exports.yml @@ -8,13 +8,15 @@ en: new: title: "New export" all: "All" + flash: "Export task on queue, refresh page to see progression" index: title: "Exports" warning: "" show: report: "Report" statuses: - pending: "Pending" + pending: "Pending ..." + processing: "Processing ..." completed: "Completed" failed: "Failed" export_log_messages: @@ -118,13 +120,15 @@ fr: new: title: "Nouvel export" all: "Toutes" + flash: "La demande d'export est mise en file d'attente, veuillez rafraichir régulièrement la page pour le suivre" index: title: "Exports" warning: "" show: report: "Rapport" statuses: - pending: "En cours" + pending: "En attente ou en cours ..." + processing: "En cours ..." completed: "Achevé" failed: "Echoué" export_log_messages: diff --git a/config/locales/import_tasks.yml b/config/locales/import_tasks.yml index 1dca0a445..f76e56d64 100644 --- a/config/locales/import_tasks.yml +++ b/config/locales/import_tasks.yml @@ -6,6 +6,7 @@ en: destroy_confirm: "Are you sure you want destroy this import?" new: title: "New import" + flash: "Import task on queue, refresh page to see progression" index: title: "Imports" warning: "" @@ -37,6 +38,7 @@ en: journey_patterns_stats: "Journey Patterns" statuses: pending: "Pending" + processing: "Processing" completed: "Completed" failed: "Failed" compliance_check_task: "Validate Report" @@ -96,6 +98,7 @@ fr: destroy_confirm: "Etes vous sûr de supprimer cet import ?" new: title: "Nouvel import" + flash: "La demande d'import est mise en file d'attente, veuillez rafraichir régulièrement la page pour le suivre" index: title: "Imports" warning: "" @@ -140,7 +143,8 @@ fr: saved: "Sauvé" save_error: "Sauvegarde en erreur" statuses: - pending: "En cours" + pending: "En attente ..." + processing: "En cours ..." completed: "Achevé" failed: "Echoué" compliance_check_task: "Validation" |
