diff options
| author | Michel Etienne | 2014-08-22 16:13:50 +0200 | 
|---|---|---|
| committer | Michel Etienne | 2014-08-22 16:13:50 +0200 | 
| commit | a1dcead1b2194bd643c29b3e9996b9dd522d80c5 (patch) | |
| tree | 9c81c2607c59c1eec9d98e6f9d0475c403ce8bfd /app | |
| parent | 95aa3519c249639c7072c05dd7fc141fe53b2621 (diff) | |
| download | chouette-core-a1dcead1b2194bd643c29b3e9996b9dd522d80c5.tar.bz2 | |
show exchange states and notice for refresh on creation
Diffstat (limited to 'app')
| -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 | 
8 files changed, 18 insertions, 3 deletions
| diff --git a/app/assets/images/compliance_check_task-pending.png b/app/assets/images/compliance_check_task-pending.pngBinary files differ index 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.pngBinary files differ index 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? %> | 
