diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/assets/stylesheets/main/compliance_check_tasks.css.scss | 32 | ||||
| -rw-r--r-- | app/controllers/export_tasks_controller.rb | 2 | ||||
| -rw-r--r-- | app/controllers/import_tasks_controller.rb | 1 | ||||
| -rw-r--r-- | app/models/export_task.rb | 5 | ||||
| -rw-r--r-- | app/views/export_tasks/new.html.erb | 3 | ||||
| -rw-r--r-- | app/views/exports/_export.erb | 2 | ||||
| -rw-r--r-- | app/views/exports/show.html.erb | 4 | ||||
| -rw-r--r-- | app/views/imports/_import.erb | 10 | ||||
| -rw-r--r-- | app/views/imports/show.html.erb | 12 |
9 files changed, 12 insertions, 59 deletions
diff --git a/app/assets/stylesheets/main/compliance_check_tasks.css.scss b/app/assets/stylesheets/main/compliance_check_tasks.css.scss index 7fecf0068..64c6a2f94 100644 --- a/app/assets/stylesheets/main/compliance_check_tasks.css.scss +++ b/app/assets/stylesheets/main/compliance_check_tasks.css.scss @@ -1,36 +1,4 @@ #workspace.compliance_check_tasks.new, #workspace.compliance_check_tasks.create { - padding: 0; - margin-top: -0.3em; - margin-bottom: 1em; - - - - .inputs ol { - margin-top: -0.3em; - margin-bottom: 1em; - padding: 0; - width: 100%; - } - .inputs ol li { padding : 0.3em 0; } - - .inputs ol li textarea { - width: 54%; - } - .inputs ol li label { - width: 40%; - margin-top: -0.3em; - } - - .inputs ol li.fl label { width: 40%; margin-top: -0.3em; } - .inputs ol li.fl input { width: 21%; padding: 0; } - - .inputs ol li.fl1 {float: left; width: 70% ;} - .inputs ol li.fl1 label {width: 57%; margin-top: -0.3em; } - .inputs ol li.fl1 input { width: 30%; } - - .inputs ol li.fl2 {float: left; width: 25% ;} - .inputs ol li.fl2 label {width: 10%; margin-top: -0.3em;} - .inputs ol li.fl2 input { width: 85%; } } diff --git a/app/controllers/export_tasks_controller.rb b/app/controllers/export_tasks_controller.rb index d9a43cdc5..ba5104342 100644 --- a/app/controllers/export_tasks_controller.rb +++ b/app/controllers/export_tasks_controller.rb @@ -17,6 +17,7 @@ class ExportTasksController < ChouetteController end def create + @available_exports = available_exports begin create! do |success, failure| success.html { redirect_to referential_exports_path(@referential) } @@ -31,7 +32,6 @@ class ExportTasksController < ChouetteController def references references_type = params[:filter].pluralize references = @referential.send(references_type).where("name ilike ?", "%#{params[:q]}%").select("id, name") - puts references.inspect respond_to do |format| format.json do render :json => references.collect { |child| { :id => child.id, :name => child.name } } diff --git a/app/controllers/import_tasks_controller.rb b/app/controllers/import_tasks_controller.rb index 617721956..8eeafab51 100644 --- a/app/controllers/import_tasks_controller.rb +++ b/app/controllers/import_tasks_controller.rb @@ -18,6 +18,7 @@ class ImportTasksController < ChouetteController end def create + @available_imports = available_imports begin create! do |success, failure| success.html { redirect_to referential_imports_path(@referential) } diff --git a/app/models/export_task.rb b/app/models/export_task.rb index c346d0597..a00b4e4ae 100644 --- a/app/models/export_task.rb +++ b/app/models/export_task.rb @@ -8,10 +8,6 @@ class ExportTask define_model_callbacks :initialize, only: :after - # TODO : Move in configuration - @@root = "#{Rails.root}/tmp/exports" - cattr_accessor :root - enumerize :data_format, in: %w( neptune netex gtfs hub kml ) attr_accessor :referential_id, :user_id, :user_name, :references_type, :data_format, :name, :projection_type, :reference_ids @@ -20,7 +16,6 @@ class ExportTask validates_presence_of :user_name validates_presence_of :name validates_presence_of :data_format - validates_presence_of :references_type def initialize( params = {} ) run_callbacks :initialize do diff --git a/app/views/export_tasks/new.html.erb b/app/views/export_tasks/new.html.erb index 6e5397f0e..6cb34665f 100644 --- a/app/views/export_tasks/new.html.erb +++ b/app/views/export_tasks/new.html.erb @@ -9,7 +9,8 @@ <% @available_exports.each do |export_task| %> <%= semantic_form_for [@referential, export_task], :as => :export_task, :url => referential_export_tasks_path(@referential), :namespace => export_task.data_format ,:html => { :id => "#{export_task.data_format}", :class => "tab-pane highlight"} do |form| %> <%= form.inputs do %> - <%= form.input :user_name, :as => :hidden, :input_html => { :value => current_user.name } %> <%= form.input :user_id, :as => :hidden, :input_html => { :value => current_user.id } %> + <%= form.input :user_name, :as => :hidden, :input_html => { :value => current_user.name } %> + <%= form.input :user_id, :as => :hidden, :input_html => { :value => current_user.id } %> <%= form.input :data_format, :as => :hidden %> <%= form.input :referential_id, :as => :hidden, :input_html => { :value => @referential.id } %> <%= form.input :name %> diff --git a/app/views/exports/_export.erb b/app/views/exports/_export.erb index 71ab1e0d9..5cf924960 100644 --- a/app/views/exports/_export.erb +++ b/app/views/exports/_export.erb @@ -14,7 +14,7 @@ </div> </div> <div class="panel-body"> - <p><%= link_to( image_tag("icons/file_#{export.filename_extension}.png") + t("exports.show.exported_file"), exported_file_referential_export_path(@referential, export.id) ) if !export.aborted? %></p> + <p><%= link_to( image_tag("icons/file_#{export.filename_extension}.png") + t("exports.show.exported_file"), exported_file_referential_export_path(@referential, export.id) ) if export.file_path %></p> </div> <div class="panel-footer"> <div class="history"> diff --git a/app/views/exports/show.html.erb b/app/views/exports/show.html.erb index 28b150e46..7852635aa 100644 --- a/app/views/exports/show.html.erb +++ b/app/views/exports/show.html.erb @@ -2,14 +2,12 @@ <%= title_tag job_status_title(@export) %> </div> -<% if !@export.aborted? %> <div class="export_show"> <div class="links"> - <%= link_to( image_tag("icons/file_#{@export.filename_extension}.png") + t("exports.show.exported_file"), exported_file_referential_export_path(@referential, @export.id) ) %> + <%= link_to( image_tag("icons/file_#{@export.filename_extension}.png") + t("exports.show.exported_file"), exported_file_referential_export_path(@referential, @export.id) ) if @export.file_path %> </div> <%= render( :partial => "shared/ie_report.html", :locals => { :referential => @referential, :job => @export} ) %> </div> -<% end %> <% content_for :sidebar do %> <ul class="actions"> diff --git a/app/views/imports/_import.erb b/app/views/imports/_import.erb index 11dae5638..717e51b75 100644 --- a/app/views/imports/_import.erb +++ b/app/views/imports/_import.erb @@ -14,13 +14,9 @@ </div> </div> <div class="panel-body"> - <p><%= link_to image_tag("icons/file_#{import.filename_extension}.png") + t("imports.show.imported_file"), imported_file_referential_import_path(@referential, import.id) if !import.aborted? %></p> - <% if import.rule_parameter_set && !import.aborted? %> - <p><%= link_to image_tag("icons/link_page.png") + t("imports.show.rule_parameter_set"), rule_parameter_set_referential_import_path(@referential, import.id) %></p> - <% end %> - <% if import.compliance_check && !import.aborted? %> - <p><%= link_to image_tag("icons/link_page.png") + t("imports.show.compliance_check"), compliance_check_referential_import_path(@referential, import.id) %></p> - <% end %> + <p><%= link_to image_tag("icons/file_#{import.filename_extension}.png") + t("imports.show.imported_file"), imported_file_referential_import_path(@referential, import.id) if import.file_path %></p> + <p><%= link_to image_tag("icons/link_page.png") + t("imports.show.rule_parameter_set"), rule_parameter_set_referential_import_path(@referential, import.id) if import.rule_parameter_set %></p> + <p><%= link_to image_tag("icons/link_page.png") + t("imports.show.compliance_check"), compliance_check_referential_import_path(@referential, import.id) if import.compliance_check %></p> </div> <div class="panel-footer"> <div class="history"> diff --git a/app/views/imports/show.html.erb b/app/views/imports/show.html.erb index 90524eedc..4e94f111d 100644 --- a/app/views/imports/show.html.erb +++ b/app/views/imports/show.html.erb @@ -2,20 +2,14 @@ <%= title_tag job_status_title(@import) %> </div> -<% if !@import.aborted? %> <div class="import_show"> <div class="links"> - <%= link_to image_tag("icons/file_#{@import.filename_extension}.png") + t("imports.show.imported_file"), imported_file_referential_import_path(@referential, @import.id) if !@import.aborted? %> - <% if @import.rule_parameter_set %> - <%= link_to image_tag("icons/link_page.png") + t("imports.show.rule_parameter_set"), rule_parameter_set_referential_import_path(@referential, @import.id) %> - <% end %> - <% if @import.compliance_check %> - <%= link_to image_tag("icons/link_page.png") + t("imports.show.compliance_check"), compliance_check_referential_import_path(@referential, @import.id) %> - <% end %> + <%= link_to image_tag("icons/file_#{@import.filename_extension}.png") + t("imports.show.imported_file"), imported_file_referential_import_path(@referential, @import.id) if @import.file_path %> + <%= link_to image_tag("icons/link_page.png") + t("imports.show.rule_parameter_set"), rule_parameter_set_referential_import_path(@referential, @import.id) if @import.rule_parameter_set %> + <%= link_to image_tag("icons/link_page.png") + t("imports.show.compliance_check"), compliance_check_referential_import_path(@referential, @import.id) if @import.compliance_check %> </div> <%= render( :partial => "shared/ie_report.html", :locals => { :referential => @referential, :job => @import} ) %> </div> -<% end %> <% content_for :sidebar do %> <ul class="actions"> |
