diff options
Diffstat (limited to 'app/views')
61 files changed, 33 insertions, 600 deletions
diff --git a/app/views/autocomplete_timebands/index.rabl b/app/views/autocomplete_timebands/index.rabl deleted file mode 100644 index 663b09285..000000000 --- a/app/views/autocomplete_timebands/index.rabl +++ /dev/null @@ -1,8 +0,0 @@ -collection @timebands - -node do |timeband| - { - id: timeband.id, - name: timeband.fullname - } -end diff --git a/app/views/connection_links/_connection_link.slim b/app/views/connection_links/_connection_link.slim index 44ed5093f..9de04ba12 100644 --- a/app/views/connection_links/_connection_link.slim +++ b/app/views/connection_links/_connection_link.slim @@ -20,14 +20,14 @@ = t('.from') - if connection_link.departure.present? - = link_to_if connection_link.departure, truncate(connection_link.departure.name, :length => 15) , referential_stop_area_path(@referential, connection_link.departure), :title => "#{connection_link.human_attribute_name('departure')} #{connection_link.departure.name}" + = link_to_if connection_link.departure, truncate(connection_link.departure.name, :length => 15) , stop_area_referential_stop_area_path(connection_link.departure.stop_area_referential, connection_link.departure), :title => "#{connection_link.human_attribute_name('departure')} #{connection_link.departure.name}" - else = connection_link.human_attribute_name('undefined') = t('.to') - if connection_link.arrival.present? - = link_to_if( connection_link.arrival, truncate(connection_link.arrival.name, :length => 15), referential_stop_area_path(@referential, connection_link.arrival), :title => "#{connection_link.human_attribute_name('arrival')} #{connection_link.arrival.name}" ) + = link_to_if( connection_link.arrival, truncate(connection_link.arrival.name, :length => 15), stop_area_referential_stop_area_path(connection_link.arrival.stop_area_referential, connection_link.arrival), :title => "#{connection_link.human_attribute_name('arrival')} #{connection_link.arrival.name}" ) - else = connection_link.human_attribute_name("undefined") p diff --git a/app/views/connection_links/_connection_links.html.slim b/app/views/connection_links/_connection_links.html.slim deleted file mode 100644 index 8cf41a6c1..000000000 --- a/app/views/connection_links/_connection_links.html.slim +++ /dev/null @@ -1,10 +0,0 @@ -.page_info - span.search - = t("will_paginate.page_entries_info.search") - = page_entries_info @connection_links - -.connection_links.paginated_content - = paginated_content(@connection_links) - -.pagination - = will_paginate @connection_links, :container => false, renderer: RemoteBootstrapPaginationLinkRenderer diff --git a/app/views/connection_links/_form.html.slim b/app/views/connection_links/_form.html.slim deleted file mode 100644 index a3774ec88..000000000 --- a/app/views/connection_links/_form.html.slim +++ /dev/null @@ -1,21 +0,0 @@ -= semantic_form_for [@referential, @connection_link] do |form| - = form.inputs do - = form.input :name - = form.input :connection_link_type, as: :select, collection: connection_link_type_label_pairs, include_blank: true - = form.input :comment - = form.input :link_distance, input_html: { title: t("formtastic.titles#{format_restriction_for_locales(@referential)}.connection_link.link_distance") } - = form.input :mobility_restricted_suitability, as: :select, :collection => [[t("true"), true], [t("false"), false]], include_blank: true - = form.input :stairs_availability, as: :select, :collection => [[t("true"), true], [t("false"), false]], include_blank: true - = form.input :lift_availability, as: :select, :collection => [[t("true"), true], [t("false"), false]], include_blank: true - - = form.input :objectid, :required => !@connection_link.new_record?, :input_html => { :title => t("formtastic.titles.connection_link.objectid")} - - = form.inputs :name => t('connection_links.show.durations') do - = form.input :default_duration, :as => :extended_time_picker, :size => 8, :step => :seconds, :label => @connection_link.human_attribute_name("default_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } - = form.input :frequent_traveller_duration, :as => :extended_time_picker, :size => 8, :step => :seconds, :include_seconds => true, :label => @connection_link.human_attribute_name("frequent_traveller_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } - = form.input :occasional_traveller_duration, :as => :extended_time_picker, :size => 8, :include_seconds => true, :label => @connection_link.human_attribute_name("occasional_traveller_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } - = form.input :mobility_restricted_traveller_duration, :as => :extended_time_picker,:size => 8, :include_seconds => true, :label => @connection_link.human_attribute_name("mobility_restricted_traveller_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } - - = form.actions do - = form.action :submit, as: :button - = form.action :cancel, as: :link diff --git a/app/views/connection_links/edit.html.slim b/app/views/connection_links/edit.html.slim deleted file mode 100644 index 08a6ddd36..000000000 --- a/app/views/connection_links/edit.html.slim +++ /dev/null @@ -1,3 +0,0 @@ -= title_tag t('connection_links.edit.title', :connection_link => @connection_link.name ) - -= render 'form'
\ No newline at end of file diff --git a/app/views/connection_links/index.html.slim b/app/views/connection_links/index.html.slim deleted file mode 100644 index 7651ae340..000000000 --- a/app/views/connection_links/index.html.slim +++ /dev/null @@ -1,24 +0,0 @@ -= title_tag t('connection_links.index.title') - -= search_form_for @q, :url => referential_connection_links_path(@referential), remote: true, :html => {:method => :get, class: "form-inline", :id => "search", role: "form"} do |f| - .panel.panel-default - .panel-heading - .input-group.col-md-12 - = f.text_field :name_cont, :placeholder => "#{t('.name')}", class: 'form-control' - .input-group-btn - button.btn.btn-default type="submit" - i.fa.fa-search - - / <!-- /input-group --> - / <!-- <a data-toggle="collapse" data-parent="#search" href="#advanced_search"> --> - / <!-- <i class="fa fa-plus"></i> <%= "#{t('.advanced_search')}" %> --> - / <!-- </a> --> - -#connection_links - = render 'connection_links' - -- content_for :sidebar do - ul.actions - li - - if policy(Chouette::ConnectionLink).create? && @referential.organisation == current_organisation - = link_to t('connection_links.actions.new'), new_referential_connection_link_path(@referential), class: 'add' diff --git a/app/views/connection_links/index.js.slim b/app/views/connection_links/index.js.slim deleted file mode 100644 index 2be61610e..000000000 --- a/app/views/connection_links/index.js.slim +++ /dev/null @@ -1 +0,0 @@ -| $('#connection_links').html("#{escape_javascript(render('connection_links'))}");
\ No newline at end of file diff --git a/app/views/connection_links/new.html.slim b/app/views/connection_links/new.html.slim deleted file mode 100644 index c4acdf622..000000000 --- a/app/views/connection_links/new.html.slim +++ /dev/null @@ -1,3 +0,0 @@ -= title_tag t('connection_links.new.title') - -= render 'form'
\ No newline at end of file diff --git a/app/views/connection_links/select_areas.html.slim b/app/views/connection_links/select_areas.html.slim deleted file mode 100644 index 85da40eb7..000000000 --- a/app/views/connection_links/select_areas.html.slim +++ /dev/null @@ -1,11 +0,0 @@ -= title_tag t('connection_links.select_areas.title', connection_link: @connection_link.name) - -= semantic_form_for [@referential, @connection_link] do |form| - div - = form.inputs do - = form.input :departure_id, :as => :search_stop_area, :json => referential_autocomplete_stop_areas_path(@referential, :format => :json)+"?filter=itl_excluded", :tokenLimit => 1, :hint_text => t('search_hint'), :no_result_text => t('no_result_text'),:searching_text => t('searching_term'), :input_html => { :"data-pre" => Rabl::Renderer.new('autocomplete_stop_areas/show', [@departure].compact, :view_path => 'app/views', :format => :json, :scope => self).render } - = form.input :arrival_id, :as => :search_stop_area, :json => referential_autocomplete_stop_areas_path(@referential, :format => :json)+"?filter=itl_excluded", :tokenLimit => 1, :hint_text => t('search_hint'), :no_result_text => t('no_result_text'),:searching_text => t('searching_term'), :input_html => { :"data-pre" => Rabl::Renderer.new('autocomplete_stop_areas/show', [@arrival].compact, :view_path => 'app/views', :format => :json, :scope => self).render } - - = form.actions do - = form.action :submit, as: :button - = form.action :cancel, as: :link
\ No newline at end of file diff --git a/app/views/connection_links/show.html.slim b/app/views/connection_links/show.html.slim deleted file mode 100644 index ca6593131..000000000 --- a/app/views/connection_links/show.html.slim +++ /dev/null @@ -1,94 +0,0 @@ -= title_tag t('connection_links.show.title', :connection_link => @connection_link.name) - -.connection_link_show - .summary - p - label = "#{@connection_link.human_attribute_name(:departure)} : " - - if @connection_link.departure.present? - = link_to @connection_link.departure.name, [@referential, @connection_link.departure] - - else - = @connection_link.human_attribute_name("undefined") - - p - label = "#{@connection_link.human_attribute_name(:arrival)} : " - - if @connection_link.arrival.present? - = link_to @connection_link.arrival.name, [@referential, @connection_link.arrival] - - else - = @connection_link.human_attribute_name("undefined") - - p - label = "#{@connection_link.human_attribute_name('connection_link_type')} : " - - if @connection_link.connection_link_type.blank? - = t("unknown") - - else - = t("connection_link_types.label.#{@connection_link.connection_link_type}") - - p - label = "#{@connection_link.human_attribute_name('comment')} : " - = @connection_link.comment - - p - label = "#{@connection_link.human_attribute_name('link_distance')} : " - = @connection_link.link_distance - - p - label = t('connection_links.show.durations') - - p - label.duration = "#{@connection_link.human_attribute_name('default_duration')} : " - - if @connection_link.default_duration.present? - = @connection_link.default_duration.strftime('%Hh %Mm %Ss') - - p - label.duration = "#{@connection_link.human_attribute_name('frequent_traveller_duration')} : " - - if @connection_link.frequent_traveller_duration.present? - = @connection_link.frequent_traveller_duration.strftime('%Hh %Mm %Ss') - - p - label.duration = "#{@connection_link.human_attribute_name('occasional_traveller_duration')} : " - - if @connection_link.occasional_traveller_duration.present? - = @connection_link.occasional_traveller_duration.strftime('%Hh %Mm %Ss') - - p - label.duration = "#{@connection_link.human_attribute_name('mobility_restricted_traveller_duration')} : " - -if @connection_link.mobility_restricted_traveller_duration.present? - = @connection_link.mobility_restricted_traveller_duration.strftime('%Hh %Mm %Ss') - - p - label = "#{@connection_link.human_attribute_name('mobility_restricted_suitability')} : " - - if !@connection_link.mobility_restricted_suitability.nil? - = t((@connection_link.mobility_restricted_suitability == true).to_s) - - else - = t("unknown") - - p - label = "#{@connection_link.human_attribute_name('stairs_availability')} : " - - if !@connection_link.stairs_availability.nil? - = t((@connection_link.stairs_availability == true).to_s) - - else - = t("unknown") - - p - label = "#{@connection_link.human_attribute_name('lift_availability')} : " - - if !@connection_link.lift_availability.nil? - = t((@connection_link.lift_availability == true).to_s) - - else - = t("unknown") - -- content_for :sidebar do - ul.actions - - if policy(Chouette::ConnectionLink).create? && @referential.organisation == current_organisation - li - = link_to t('connection_links.actions.new'), new_referential_connection_link_path(@referential), class: 'add' - - if policy(@connection_link).edit? - li - = link_to t('connection_links.actions.edit'), edit_referential_connection_link_path(@referential, @connection_link), class: 'edit' - - if policy(@connection_link).destroy? - li - = link_to t('connection_links.actions.destroy'), referential_connection_link_path(@referential, @connection_link), :method => :delete, :data => {:confirm => t('connection_links.actions.destroy_confirm')}, class: 'remove' - - if policy(@connection_link).edit? - li - = link_to t('connection_links.actions.select_areas'), select_areas_referential_connection_link_path(@referential, @connection_link), class: 'select' - br - - = creation_tag(@connection_link) diff --git a/app/views/connection_links/show.kml.slim b/app/views/connection_links/show.kml.slim deleted file mode 100644 index 59169dba3..000000000 --- a/app/views/connection_links/show.kml.slim +++ /dev/null @@ -1,16 +0,0 @@ -doctype XML - -kml xmlns="http://www.opengis.net/kml/2.2" - document - - if @connection_link.geometry - placemark id="route_#{@connection_link.id}" - name = @connection_link.name - = @connection_link.geometry.kml_representation.html_safe - - placemark id="#{@connection_link.departure.id}" - departure true - = @connection_link.departure.geometry.kml_representation.html_safe - - placemark id="#{@connection_link.arrival.id}" - arrival true - = @connection_link.arrival.geometry.kml_representation.html_safe diff --git a/app/views/export_tasks/_fields_gtfs_export.html.slim b/app/views/export_tasks/_fields_gtfs_export.html.slim deleted file mode 100644 index e95e86230..000000000 --- a/app/views/export_tasks/_fields_gtfs_export.html.slim +++ /dev/null @@ -1,3 +0,0 @@ -= form.input :time_zone, as: :time_zone, :input_html => { :value => @referential.time_zone ,:title => t("formtastic.titles.export_task.time_zone")} - -= form.input :object_id_prefix, :input_html => { :value => @referential.prefix ,:title => t("formtastic.titles.export_task.object_id_prefix")}
\ No newline at end of file diff --git a/app/views/export_tasks/_fields_hub_export.html.slim b/app/views/export_tasks/_fields_hub_export.html.slim deleted file mode 100644 index e69de29bb..000000000 --- a/app/views/export_tasks/_fields_hub_export.html.slim +++ /dev/null diff --git a/app/views/export_tasks/_fields_kml_export.html.slim b/app/views/export_tasks/_fields_kml_export.html.slim deleted file mode 100644 index e69de29bb..000000000 --- a/app/views/export_tasks/_fields_kml_export.html.slim +++ /dev/null diff --git a/app/views/export_tasks/_fields_neptune_export.html.slim b/app/views/export_tasks/_fields_neptune_export.html.slim deleted file mode 100644 index 43749c87e..000000000 --- a/app/views/export_tasks/_fields_neptune_export.html.slim +++ /dev/null @@ -1,2 +0,0 @@ -= form.input :projection_type, as: :hidden, :input_html => { :value => @referential.projection_type || "" } -= form.input :extensions , as: :boolean
\ No newline at end of file diff --git a/app/views/export_tasks/_fields_netex_export.html.slim b/app/views/export_tasks/_fields_netex_export.html.slim deleted file mode 100644 index e69de29bb..000000000 --- a/app/views/export_tasks/_fields_netex_export.html.slim +++ /dev/null diff --git a/app/views/export_tasks/new.html.slim b/app/views/export_tasks/new.html.slim deleted file mode 100644 index 5f89f5865..000000000 --- a/app/views/export_tasks/new.html.slim +++ /dev/null @@ -1,32 +0,0 @@ -= title_tag t(".title") - -ul.nav.nav-pills - - ExportTask.data_formats.each do |format| - li role="presentation" - a href="##{format}" class=("#{@export_task.data_format == format ? "#{format} active" : "#{format}"}") title="#{t(:"enumerize.data_format_detail.#{format}")}" data-toggle="tab" - = t(:"enumerize.data_format.#{format}") - -.tab-content - - @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 :data_format, as: :hidden - = form.input :referential_id, as: :hidden, :input_html => { :value => @referential.id } - = form.input :name - = form.input :references_type, as: :select, include_blank: t(".all"), collection: export_task.class.references_type.options.map { |o| o << {data:{"hidden-attributes" => export_task.class.optional_attributes(o.second).join(',') }} } - - - export_task.class.references_types.each do |type| - = form.input :reference_ids, as: :reference_ids, :json => references_referential_export_tasks_path(@referential, :format => :json) + "?filter=#{type}", :hint_text => t('search_hint'), :no_result_text => t('no_result_text'),:searching_text => t('searching_term'), :id => "#{export_task.data_format}_#{type}_reference_ids", :input_html => { :id => "#{export_task.data_format}_#{type}_reference_ids" }, :wrapper_html => { style: "display:none;", "data-type" => type.to_s } - - = form.input :start_date, as: :date_picker, :input_html => { :title => t("formtastic.titles.export_task.start_date")} - = form.input :end_date, as: :date_picker, :input_html => { :title => t("formtastic.titles.export_task.end_date")} - - = render partial: "fields_#{export_task.data_format}_export", :locals => { :form => form } - - = form.actions do - = form.action :submit, as: :button , :label => t('formtastic.export') - = form.action :cancel, as: :link - -= javascript_include_tag new_referential_export_task_path(@referential, :format => :js) diff --git a/app/views/export_tasks/new.js.coffee b/app/views/export_tasks/new.js.coffee deleted file mode 100644 index dd0e284a5..000000000 --- a/app/views/export_tasks/new.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -jQuery -> - $('#workspace.export_tasks .nav a.active').tab('show') diff --git a/app/views/help/toc.textile b/app/views/help/toc.textile index 9772ca1b6..754a6ebb5 100644 --- a/app/views/help/toc.textile +++ b/app/views/help/toc.textile @@ -27,8 +27,6 @@ h3. Sommaire ## "Séquences d'arrêts":routes
## "Missions":journey_patterns
## "Courses et horaires":vehicle_journeys
-## "Courses en fréquence":timebands.textile
-## "Correspondances":connection_links
## "Calendrier":time_tables
# Imports
## "Imports":imports
diff --git a/app/views/import_tasks/_fields_gtfs_import.html.slim b/app/views/import_tasks/_fields_gtfs_import.html.slim deleted file mode 100644 index 8c2ef8ed8..000000000 --- a/app/views/import_tasks/_fields_gtfs_import.html.slim +++ /dev/null @@ -1,6 +0,0 @@ -= form.input :references_type, as: :select, :include_blank => t("import_tasks.new.all"), :input_html => { :title => t("formtastic.titles.import_task.references_type") } -= form.input :object_id_prefix, :input_html => { :value => @referential.prefix } -= form.input :max_distance_for_commercial , as: :number , :input_html => { :title => t("formtastic.titles.import_task.max_distance_for_commercial"), :value => 0 } -= form.input :ignore_last_word , as: :boolean , :input_html => { :title => t("formtastic.titles.import_task.ignore_last_word"), :value => false } -= form.input :ignore_end_chars , as: :number , :input_html => { :title => t("formtastic.titles.import_task.ignore_end_chars"), :value => 0 } -= form.input :max_distance_for_connection_link , as: :number , :input_html => { :title => t("formtastic.titles.import_task.max_distance_for_connection_link"), :value => 0 }
\ No newline at end of file diff --git a/app/views/import_tasks/_fields_neptune_import.html.slim b/app/views/import_tasks/_fields_neptune_import.html.slim deleted file mode 100644 index e69de29bb..000000000 --- a/app/views/import_tasks/_fields_neptune_import.html.slim +++ /dev/null diff --git a/app/views/import_tasks/_fields_netex_import.slim b/app/views/import_tasks/_fields_netex_import.slim deleted file mode 100644 index e69de29bb..000000000 --- a/app/views/import_tasks/_fields_netex_import.slim +++ /dev/null diff --git a/app/views/import_tasks/new.html.slim b/app/views/import_tasks/new.html.slim deleted file mode 100644 index dad004759..000000000 --- a/app/views/import_tasks/new.html.slim +++ /dev/null @@ -1,27 +0,0 @@ -= title_tag t(".title") - -ul.nav.nav-pills - - ImportTask.data_formats.each do |format| - li role="presentation" - a href="##{format}" class="#{@import_task.data_format == format ? "#{format} active" : "#{format}" }" title="#{t(:"enumerize.data_format_detail.#{format}")}" data-toggle="tab" - = t(:"enumerize.data_format.#{format}") - -.tab-content - - @available_imports.each do |import_task| - = semantic_form_for [@referential, import_task], as: :import_task, :url => referential_import_tasks_path(@referential), :namespace => import_task.data_format, :html => { :id => "#{import_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 :data_format, as: :hidden - = form.input :referential_id, as: :hidden, :input_html => { :value => @referential.id } - = form.input :name - = form.input :no_save, as: :boolean - = form.input :resources, as: :file - - = render partial: "fields_#{import_task.data_format}_import", :locals => { :form => form } - - = form.actions do - = form.action :submit, as: :button , :label => t( 'formtastic.import' ) - = form.action :cancel, as: :link - -= javascript_include_tag new_referential_import_task_path(@referential, :format => :js) diff --git a/app/views/import_tasks/new.js.coffee b/app/views/import_tasks/new.js.coffee deleted file mode 100644 index 57dbe9e72..000000000 --- a/app/views/import_tasks/new.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -jQuery -> - $('#workspace.import_tasks .nav a.active').tab('show') diff --git a/app/views/lines/_form.html.slim b/app/views/lines/_form.html.slim index 909d6512e..4623abf8a 100644 --- a/app/views/lines/_form.html.slim +++ b/app/views/lines/_form.html.slim @@ -4,7 +4,7 @@ = f.input :name = f.input :network_id, as: :select, :collection => @line_referential.networks, include_blank: false = f.input :company_id, as: :select, :collection => @line_referential.companies, include_blank: true - = f.input :secondary_company_ids, :collection => @line_referential.companies, include_blank: false, input_html: { multiple: true, 'data-select2ed': true }, label: t('activerecord.attributes.line.secondary_company') + = f.input :secondary_company_ids, :collection => @line_referential.companies, include_blank: false, input_html: { multiple: true, 'data-select2ed': true }, label: Chouette::Line.tmf(:secondary_companies) = f.input :published_name = f.input :registration_number = f.input :number diff --git a/app/views/lines/index.html.slim b/app/views/lines/index.html.slim index 02bb5ec6e..a127a8a29 100644 --- a/app/views/lines/index.html.slim +++ b/app/views/lines/index.html.slim @@ -29,7 +29,8 @@ end \ ), \ TableBuilderHelper::Column.new( \ - key: :status, \ + key: :deactivated, \ + name: Chouette::Line.tmf(:status), \ class: :state, \ attribute: Proc.new { |n| line_status(n.status) } \ ), \ diff --git a/app/views/referential_stop_areas/_stop_area.html.slim b/app/views/referential_stop_areas/_stop_area.html.slim index bb9ed7ce3..e4dfe63fa 100644 --- a/app/views/referential_stop_areas/_stop_area.html.slim +++ b/app/views/referential_stop_areas/_stop_area.html.slim @@ -3,11 +3,11 @@ .panel-title.clearfix span.pull-right - if policy(stop_area).update? - = link_to edit_referential_stop_area_path(@referential, stop_area), class: 'btn btn-default btn-sm' do + = link_to edit_stop_area_referential_stop_area_path(stop_area.stop_area_referential, stop_area), class: 'btn btn-default btn-sm' do span.fa.fa-pencil - if policy(stop_area).destroy? - = link_to referential_stop_area_path(@referential, stop_area), method: :delete, :data => {:confirm => t('stop_areas.actions.destroy_confirm')}, class: 'btn btn-danger btn-sm' do + = link_to stop_area_referential_stop_area_path(stop_area.stop_area_referential, stop_area), method: :delete, :data => {:confirm => t('stop_areas.actions.destroy_confirm')}, class: 'btn btn-danger btn-sm' do span.fa.fa-trash-o h5 diff --git a/app/views/referential_stop_areas/edit.html.slim b/app/views/referential_stop_areas/edit.html.slim index d88230b58..4641cf0be 100644 --- a/app/views/referential_stop_areas/edit.html.slim +++ b/app/views/referential_stop_areas/edit.html.slim @@ -1,3 +1,3 @@ -- breadcrumb :referential_stop_area, @referential, @stop_area +- breadcrumb :stop_area, @stop_area.stop_area_referential, @stop_area - page_header_content_for @stop_area = render 'form' diff --git a/app/views/referential_stop_areas/index.html.slim b/app/views/referential_stop_areas/index.html.slim index ad04fb02e..39073540d 100644 --- a/app/views/referential_stop_areas/index.html.slim +++ b/app/views/referential_stop_areas/index.html.slim @@ -1,6 +1,6 @@ -- breadcrumb :referential_stop_areas, @referential +- breadcrumb :stop_areas, @referential.workbench.stop_area_referential -= search_form_for @q, :url => referential_stop_areas_path(@referential), remote: true, :html => {:method => :get, class: "form-inline", :id => "search", role: "form"} do |f| += search_form_for @q, :url => stop_area_referential_stop_areas_path(@referential.workbench.stop_area_referential), remote: true, :html => {:method => :get, class: "form-inline", :id => "search", role: "form"} do |f| .panel.panel-default .panel-heading .input-group.col-md-9.col-sm-9 @@ -29,6 +29,6 @@ ul.actions - if policy(Chouette::StopArea).create? li - = link_to t('stop_areas.actions.new'), new_referential_stop_area_path(@referential), class: 'add' + = link_to t('stop_areas.actions.new'), new_stop_area_referential_stop_area_path(@referential.workbench.stop_area_referential), class: 'add' li / = link_to t('stop_areas.actions.default_geometry'), default_geometry_referential_stop_areas_path(@referential), :method => :put, :class => "calculator" diff --git a/app/views/referential_stop_areas/new.html.slim b/app/views/referential_stop_areas/new.html.slim index 9342b673b..8fbef33de 100644 --- a/app/views/referential_stop_areas/new.html.slim +++ b/app/views/referential_stop_areas/new.html.slim @@ -1,2 +1,2 @@ -- breadcrumb :referential_stop_areas, @referential +- breadcrumb :stop_areas, @referential.workbench.stop_area_referential = render 'form' diff --git a/app/views/referential_stop_areas/show.html.slim b/app/views/referential_stop_areas/show.html.slim index beee0383f..d464eb438 100644 --- a/app/views/referential_stop_areas/show.html.slim +++ b/app/views/referential_stop_areas/show.html.slim @@ -1,4 +1,4 @@ -- breadcrumb :referential_stop_area, @referential, @stop_area +- breadcrumb :stop_area, @stop_area.stop_area_referential, @stop_area - page_header_content_for @stop_area .page_content @@ -7,7 +7,7 @@ .col-lg-6.col-md-6.col-sm-12.col-xs-12 = definition_list t('metadatas'), { t('id_reflex') => @stop_area.try(:user_objectid), - Chouette::StopArea.tmf(:status) => stop_area_status(@stop_area), + Chouette::StopArea.tmf(:status) => stop_area_status(@stop_area.status), Chouette::StopArea.tmf(:comment) => @stop_area.try(:comment), Chouette::StopArea.tmf(:stop_area_type) => t("area_types.label.#{@stop_area.stop_area_type}"), Chouette::StopArea.tmf(:registration_number) => @stop_area.registration_number, diff --git a/app/views/referential_vehicle_journeys/_consolidated_line.html.slim b/app/views/referential_vehicle_journeys/_consolidated_line.html.slim index c73c65961..9a27c0ecf 100644 --- a/app/views/referential_vehicle_journeys/_consolidated_line.html.slim +++ b/app/views/referential_vehicle_journeys/_consolidated_line.html.slim @@ -78,7 +78,7 @@ strong= link_to journey.id, [@referential, journey.route.line, journey.route, :vehicle_journeys] div = link_to journey.published_journey_name, [@referential, journey.route.line, journey.route, :vehicle_journeys], title: journey.published_journey_name - div= journey.journey_pattern.get_objectid.short_id + div= journey.journey_pattern_only_objectid.get_objectid.short_id div - journey.purchase_windows[0..3].each do |tt| span.vj_tt @@ -105,7 +105,7 @@ ruby: headline = vehicle_journey_stop_headline prev_sp, sp prev_sp = sp - vjas = journey.vehicle_journey_at_stops.where(stop_point_id: sp.id).last + vjas = journey.vehicle_journey_at_stops[sp.id] .td class="#{vjas && sp.highlighted? ? 'highlighted' : ''} #{vjas.nil? ? 'disabled' : ''} #{headline.present? ? 'headlined' : ''}" div title="#{sp.stop_area.city_name ? "#{sp.stop_area.city_name} (#{sp.stop_area.zip_code})" : ''}" data-headline=headline class=(headline.present? ? 'headlined' : '') - if vjas.present? diff --git a/app/views/routes/show.html.slim b/app/views/routes/show.html.slim index 2218bd85f..615913faa 100644 --- a/app/views/routes/show.html.slim +++ b/app/views/routes/show.html.slim @@ -36,7 +36,7 @@ TableBuilderHelper::Column.new( \ key: :status, \ name: Chouette::StopArea.tmf('status'), \ - attribute: Proc.new { |s| stop_area_status(s.try(:stop_area)) } \ + attribute: Proc.new { |s| stop_area_status(s.try(:stop_area).try(:status) ) } \ ), \ TableBuilderHelper::Column.new( \ key: :zip_code, \ diff --git a/app/views/routing_constraint_zones/_stop_points.html.slim b/app/views/routing_constraint_zones/_stop_points.html.slim index 4e85ba8b2..c2da4bb2d 100644 --- a/app/views/routing_constraint_zones/_stop_points.html.slim +++ b/app/views/routing_constraint_zones/_stop_points.html.slim @@ -1,7 +1,7 @@ - stop_points.each do |stop_point| .wrapper div - = link_to referential_stop_area_path(@referential, stop_point.stop_area.id), class: 'navlink', title: "Voir l'arrêt" do + = link_to stop_area_referential_stop_area_path(stop_point.stop_area.stop_are_referential, stop_point.stop_area.id), class: 'navlink', title: "Voir l'arrêt" do span = stop_point.stop_area.name div diff --git a/app/views/routing_constraint_zones/show.html.slim b/app/views/routing_constraint_zones/show.html.slim index 8c8e9b17a..2d444fe90 100644 --- a/app/views/routing_constraint_zones/show.html.slim +++ b/app/views/routing_constraint_zones/show.html.slim @@ -16,15 +16,15 @@ = table_builder_2 @routing_constraint_zone.route.stop_points, [ \ TableBuilderHelper::Column.new( \ - name: "Arrêts de l'itinéraire", \ + name: t('.route_stop_points'), \ attribute: 'name', \ link_to: lambda do |stop_point| \ - referential_stop_area_path(@referential, stop_point.stop_area) \ + stop_area_referential_stop_area_path(stop_point.stop_area.stop_area_referential, stop_point.stop_area) \ end \ ), TableBuilderHelper::Column.new( \ - name: "Arrêts inclus dans l'ITL", \ - attribute: Proc.new{ |rsp| (@routing_constraint_zone.stop_point_ids.include? rsp.id) ? 'Oui' : 'Non' } \ + name: t('.stop_points'), \ + attribute: Proc.new{ |rsp| (@routing_constraint_zone.stop_point_ids.include? rsp.id) ? t('yes') : t('no') } \ ) \ ], sortable: false, diff --git a/app/views/shared/_header.html.slim b/app/views/shared/_header.html.slim index afe802b49..a653e5cdf 100644 --- a/app/views/shared/_header.html.slim +++ b/app/views/shared/_header.html.slim @@ -67,7 +67,7 @@ nav.navbar.navbar-default.navbar-fixed-top role="navigation" = Referential.human_attribute_name("lines") li - = link_to referential_stop_areas_path(@referential) do + = link_to stop_area_referential_stop_areas_path(@referential.workbench.stop_area_referential) do span.badge.pull-right = @referential.stop_areas.size = Referential.human_attribute_name("stop_areas") @@ -81,10 +81,6 @@ nav.navbar.navbar-default.navbar-fixed-top role="navigation" span.badge.pull-right = @referential.time_tables.size = Referential.human_attribute_name("time_tables") - li - = link_to referential_timebands_path(@referential) do - span.badge.pull-right = @referential.timebands.size - = Referential.human_attribute_name("timebands") li = link_to Referential.human_attribute_name("exports"), referential_exports_path(@referential) li diff --git a/app/views/stop_area_copies/new.html.slim b/app/views/stop_area_copies/new.html.slim deleted file mode 100644 index b506d35f4..000000000 --- a/app/views/stop_area_copies/new.html.slim +++ /dev/null @@ -1,28 +0,0 @@ -= title_tag t("stop_area_copies.new.title.#{@stop_area_copy.hierarchy}") - -= semantic_form_for [@referential, @stop_area, @stop_area_copy] do |form| - br - = form.inputs do - = form.input :source_id, as: :hidden - = form.input :hierarchy, as: :hidden - - - if @stop_area_copy.hierarchy == "child" - - if @stop_area.area_type.underscore == "stop_place" - = form.input :area_type, - as: :select, - collection: label_stop_area_types( "stop_place","commercial_stop_point" ), - include_blank: false - - else - = form.input :area_type, - as: :select, - collection: label_stop_area_types( "boarding_position","quay" ), - include_blank: false - - else - = form.input :area_type, - as: :select, - collection: label_stop_area_types(@stop_area_copy.area_type), - include_blank: false - - = form.actions do - = form.action :submit, as: :button , label: t('formtastic.duplicate') - = form.action :cancel, as: :link diff --git a/app/views/stop_areas/_filters.html.slim b/app/views/stop_areas/_filters.html.slim index cca48bb17..88ed6a772 100644 --- a/app/views/stop_areas/_filters.html.slim +++ b/app/views/stop_areas/_filters.html.slim @@ -9,38 +9,16 @@ span.fa.fa-search .ffg-row - = f.input :zip_code_cont, placeholder: t('.zip_code'), label: Chouette::StopArea.human_attribute_name(:zip_code), required: false, wrapper_html: {class: filter_item_class(params[:q], :zip_code_cont)} - = f.input :city_name_cont, placeholder: t('.city_name'), label: Chouette::StopArea.human_attribute_name(:city_name), required: false, wrapper_html: {class: filter_item_class(params[:q], :city_name_cont)} + = f.input :zip_code_cont, placeholder: t('.zip_code'), label: Chouette::StopArea.tmf('zip_code'), required: false, wrapper_html: {class: filter_item_class(params[:q], :zip_code_cont)} + = f.input :city_name_cont, placeholder: t('.city_name'), label: Chouette::StopArea.tmf('city_name'), required: false, wrapper_html: {class: filter_item_class(params[:q], :city_name_cont)} .form-group.togglable class=filter_item_class(params[:q], :area_type_eq_any) - = f.label Chouette::StopArea.human_attribute_name(:area_type), required: false, class: 'control-label' + = f.label Chouette::StopArea.tmf('area_type'), required: false, class: 'control-label' = f.input :area_type_eq_any, checked: params[:q] && params[:q][:area_type_eq_any], collection: Chouette::AreaType.options, as: :check_boxes, label: false, label_method: lambda{|w| ("<span>" + w[0] + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list' } - - .form-group.togglable class=filter_item_class(params[:q], :status) + + .form-group.togglable class=filter_item_class(params[:q], :by_status) = f.label Chouette::StopArea.tmf('status'), required: false, class: 'control-label' - .form-group.checkbox_list - = f.simple_fields_for :status do |p| - = p.input :in_creation, - label: ("<span>#{t('activerecord.attributes.stop_area.in_creation')}<span class='fa fa-pencil text-info'></span></span>").html_safe, - as: :boolean, - wrapper_html: { class: 'checkbox-wrapper' }, - checked_value: true, - unchecked_value: false, - input_html: { checked: @status.try(:[], :in_creation) } - = p.input :confirmed, - label: ("<span>#{t('activerecord.attributes.stop_area.confirmed')}<span class='fa fa-check-circle text-success'></span></span>").html_safe, - as: :boolean, - wrapper_html: { class: 'checkbox-wrapper' }, - checked_value: true, - unchecked_value: false, - input_html: { checked: @status.try(:[], :confirmed) } - = p.input :deactivated, - label: ("<span>#{t('activerecord.attributes.stop_area.deleted')}<span class='fa fa-exclamation-circle text-danger'></span></span>").html_safe, - as: :boolean, - wrapper_html: { class: 'checkbox-wrapper' }, - checked_value: true, - unchecked_value: false, - input_html: { checked: @status.try(:[], :deactivated) } + = f.input :by_status, checked: params[:q] && params[:q][:by_status], collection: [:in_creation, :confirmed, :deactivated], as: :check_boxes, label: false, label_method: lambda{|w| ("<span>" + stop_area_status(w) + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list' } .actions = link_to t('actions.erase'), @workbench, class: 'btn btn-link' diff --git a/app/views/stop_areas/index.html.slim b/app/views/stop_areas/index.html.slim index 62b873c36..e5ca82ee2 100644 --- a/app/views/stop_areas/index.html.slim +++ b/app/views/stop_areas/index.html.slim @@ -33,7 +33,7 @@ ), \ TableBuilderHelper::Column.new( \ key: :status, \ - attribute: Proc.new { |s| stop_area_status(s) } \ + attribute: Proc.new { |s| stop_area_status(s.status) } \ ), \ TableBuilderHelper::Column.new( \ key: :zip_code, \ diff --git a/app/views/stop_areas/show.html.slim b/app/views/stop_areas/show.html.slim index c10d22bfb..c1965c161 100644 --- a/app/views/stop_areas/show.html.slim +++ b/app/views/stop_areas/show.html.slim @@ -21,7 +21,7 @@ Chouette::StopArea.tmf('city_name') => @stop_area.city_name, Chouette::StopArea.tmf('country_code') => @stop_area.country_code.presence || '-', Chouette::StopArea.tmf('time_zone') => @stop_area.time_zone.presence || '-', - Chouette::StopArea.tmf('status') => stop_area_status(@stop_area), + Chouette::StopArea.tmf('status') => stop_area_status(@stop_area.status), Chouette::StopArea.tmf('comment') => @stop_area.try(:comment), }) - @stop_area.custom_fields.each do |code, field| diff --git a/app/views/timebands/_form.html.slim b/app/views/timebands/_form.html.slim deleted file mode 100644 index 433d777dc..000000000 --- a/app/views/timebands/_form.html.slim +++ /dev/null @@ -1,9 +0,0 @@ -= semantic_form_for [@referential, @timeband] do |form| - = form.inputs do - = form.input :name - = form.input :start_time - = form.input :end_time - - = form.actions do - = form.action :submit, as: :button - = form.action :cancel, as: :link
\ No newline at end of file diff --git a/app/views/timebands/_sidebar.html.slim b/app/views/timebands/_sidebar.html.slim deleted file mode 100644 index 07dcebdad..000000000 --- a/app/views/timebands/_sidebar.html.slim +++ /dev/null @@ -1,9 +0,0 @@ -- content_for :sidebar do - ul.actions - li = link_to t('timebands.actions.new'), new_referential_timeband_path(@referential), class: "add" - - - if @timeband - li - = link_to t('timebands.actions.edit'), edit_referential_timeband_path(@referential, @timeband), class: "edit" - li - = link_to t('timebands.actions.destroy'), referential_timeband_path(@referential, @timeband), :method => :delete, :data => {:confirm => t('timebands.actions.destroy_confirm')}, class: "remove"
\ No newline at end of file diff --git a/app/views/timebands/edit.html.slim b/app/views/timebands/edit.html.slim deleted file mode 100644 index c70de82ef..000000000 --- a/app/views/timebands/edit.html.slim +++ /dev/null @@ -1,4 +0,0 @@ -- breadcrumb :timeband, @referential, @timeband -= title_tag t('timebands.edit.title', timeband: @timeband.name) - -= render 'form' diff --git a/app/views/timebands/index.html.slim b/app/views/timebands/index.html.slim deleted file mode 100644 index 6dcf348f9..000000000 --- a/app/views/timebands/index.html.slim +++ /dev/null @@ -1,23 +0,0 @@ -- breadcrumb :timebands, @referential -= title_tag t('timebands.index.title') - -- if @timebands.any? - table.table.table-striped.table-condensed - thead - tr - th = t('activerecord.attributes.timeband.name') - th = t('activerecord.attributes.timeband.start_time') - th = t('activerecord.attributes.timeband.end_time') - th - - tbody - - @timebands.each do |timeband| - tr - td = link_to timeband.name, referential_timeband_path(@referential, timeband) - td = l(timeband.start_time, format: :hour) - td = l(timeband.end_time, format: :hour) - td - = link_to '', edit_referential_timeband_path(@referential, timeband), class: "edit" - = link_to '', referential_timeband_path(@referential, timeband), :method => :delete, :data => {:confirm => t('timebands.actions.destroy_confirm')}, class: "remove" - -== render 'sidebar' diff --git a/app/views/timebands/new.html.slim b/app/views/timebands/new.html.slim deleted file mode 100644 index d9fc27823..000000000 --- a/app/views/timebands/new.html.slim +++ /dev/null @@ -1,4 +0,0 @@ -- breadcrumb :timebands, @referential -= title_tag t('timebands.new.title') - -== render 'form' diff --git a/app/views/timebands/show.html.slim b/app/views/timebands/show.html.slim deleted file mode 100644 index d45611c56..000000000 --- a/app/views/timebands/show.html.slim +++ /dev/null @@ -1,9 +0,0 @@ -- breadcrumb :timeband, @referential, @timeband -= title_tag t( 'timebands.show.title', timeband: @timeband.name ) - -.summary - p - label = "#{@timeband.name} : " - = "#{l(@timeband.start_time, format: :hour)} - #{l(@timeband.end_time, format: :hour)}" - -== render 'sidebar' diff --git a/app/views/vehicle_journey_frequencies/_form_footer.html.slim b/app/views/vehicle_journey_frequencies/_form_footer.html.slim deleted file mode 100644 index 922e867a8..000000000 --- a/app/views/vehicle_journey_frequencies/_form_footer.html.slim +++ /dev/null @@ -1,4 +0,0 @@ -- if vehicle_journey.new_record? - = javascript_include_tag new_referential_line_route_vehicle_journey_frequency_path(@referential, @line, @route, format: :js) -- else - = javascript_include_tag edit_referential_line_route_vehicle_journey_frequency_path(@referential, @line, @route, vehicle_journey, format: :js)
\ No newline at end of file diff --git a/app/views/vehicle_journey_frequencies/_form_vehicle_journey_at_stops.html.slim b/app/views/vehicle_journey_frequencies/_form_vehicle_journey_at_stops.html.slim deleted file mode 100644 index 45b37dee9..000000000 --- a/app/views/vehicle_journey_frequencies/_form_vehicle_journey_at_stops.html.slim +++ /dev/null @@ -1,44 +0,0 @@ -li.input - = form.label vehicle_journey.human_attribute_name(:vehicle_journey_at_stop_ids), class: 'label' - - table.table-striped.ce-TimeBandFormTable - thead - tr - th = t('vehicle_journeys.form.stop_title') - th - th = t('vehicle_journeys.form.arrival') - th = t('vehicle_journeys.form.departure') - - tbody.journey_pattern_dependent_list - == render partial: 'vehicle_journey_at_stop_fields', collection: vehicle_journey.vehicle_journey_at_stops, as: :vehicle_journey_at_stop, locals: { vehicle_journey_at_stops_size: vehicle_journey.vehicle_journey_at_stops.size } - - tfoot - tr - td - td - td - = button_tag 'data-ce-action' => 'to_departures', class: 'ce-hide btn btn-primary' do - = t('vehicle_journeys.form.to_departures').html_safe - i.fa.fa-angle-double-right - td - = button_tag 'data-ce-action' => 'to_arrivals', class: 'ce-hide btn btn-primary' do - i.fa.fa-angle-double-left - = t('vehicle_journeys.form.to_arrivals').html_safe - -li.input - = form.label vehicle_journey.human_attribute_name(:journey_frequency_ids), class: 'label' - - ul.ce-FrequencyFormFields - li = t('activerecord.attributes.journey_frequency.timeband') - li = t('activerecord.attributes.journey_frequency.first_departure_time') - li = t('activerecord.attributes.journey_frequency.last_departure_time') - li = t('activerecord.attributes.journey_frequency.scheduled_headway_interval') - li - li - - - i = 0 - = form.semantic_fields_for :journey_frequencies do |journey_frequency| - == render 'journey_frequency_fields', f: journey_frequency, no_destroy: ((i += 1) == 1 ? true : false) - - .actions-add-fields - = link_to_add_association t('journey_frequencies.form.add_line'), form, :journey_frequencies, class: 'btn btn-primary'
\ No newline at end of file diff --git a/app/views/vehicle_journey_frequencies/_journey_frequency_fields.html.slim b/app/views/vehicle_journey_frequencies/_journey_frequency_fields.html.slim deleted file mode 100644 index c649abd9b..000000000 --- a/app/views/vehicle_journey_frequencies/_journey_frequency_fields.html.slim +++ /dev/null @@ -1,16 +0,0 @@ -- no_destroy = false unless local_assigns[:no_destroy] - -.nested-fields - ul.ce-FrequencyFormFields - = f.input :timeband_id, as: :search_timeband, json: referential_autocomplete_timebands_path(@referential, format: :json), hint_text: t('search_hint'), no_result_text: t('no_result_text'), searching_text: t('searching_term'), label: false, input_html: { :"data-pre" => Rabl::Renderer.new( 'autocomplete_timebands/index', Chouette::Timeband.where(id: f.object.timeband_id), view_path: 'app/views', format: :json, scope: :self ).render } - = f.input :first_departure_time, label: false - = f.input :last_departure_time, label: false - = f.input :scheduled_headway_interval, label: false - = f.input :exact_time, label: t('activerecord.attributes.journey_frequency.exact_time') - - li - label.label - - - unless no_destroy - = link_to_remove_association f do - i.fa.fa-trash
\ No newline at end of file diff --git a/app/views/vehicle_journey_frequencies/_show_journey_frequencies.html.slim b/app/views/vehicle_journey_frequencies/_show_journey_frequencies.html.slim deleted file mode 100644 index 4510f26f0..000000000 --- a/app/views/vehicle_journey_frequencies/_show_journey_frequencies.html.slim +++ /dev/null @@ -1,21 +0,0 @@ -h3 = t('vehicle_journeys.show.journey_frequencies') - -.journey_frequencies.content - table.table.table-hover.table-striped - thead - tr - th = t('activerecord.attributes.journey_frequency.timeband') - th = t('activerecord.attributes.journey_frequency.first_departure_time') - th = t('activerecord.attributes.journey_frequency.last_departure_time') - th = t('activerecord.attributes.journey_frequency.scheduled_headway_interval') - th = t('activerecord.attributes.journey_frequency.exact_time') - - tbody - - @vehicle_journey_frequency.journey_frequencies.each do |journey_frequency| - tr class="#{cycle :odd, :even}"" - td - = link_to journey_frequency.timeband.fullname, referential_timeband_path(@referential, journey_frequency.timeband) if journey_frequency.timeband - td = l(journey_frequency.first_departure_time, format: :hour) - td = l(journey_frequency.last_departure_time, format: :hour) - td = l(journey_frequency.scheduled_headway_interval, format: :hour) - td = '<i class="fa fa-check"></i>'.html_safe if journey_frequency.exact_time
\ No newline at end of file diff --git a/app/views/vehicle_journey_frequencies/_show_sidebar.html.slim b/app/views/vehicle_journey_frequencies/_show_sidebar.html.slim deleted file mode 100644 index 61695ef86..000000000 --- a/app/views/vehicle_journey_frequencies/_show_sidebar.html.slim +++ /dev/null @@ -1,15 +0,0 @@ -- content_for :sidebar do - ul.actions - li - = link_to t('vehicle_journeys.actions.new'), new_referential_line_route_vehicle_journey_path(@referential, @line, @route), class: "add" - - li - = link_to t('vehicle_journeys.actions.new_frequency'), new_referential_line_route_vehicle_journey_frequency_path(@referential, @line, @route), class: "add" - - li - = link_to t('vehicle_journeys.actions.edit_frequency'), edit_referential_line_route_vehicle_journey_frequency_path(@referential, @line, @route, @vehicle_journey_frequency), class: "edit" - - li - = link_to t('vehicle_journeys.actions.destroy'), referential_line_route_vehicle_journey_frequency_path(@referential, @line, @route, @vehicle_journey_frequency), method: :delete, data: { confirm: t('vehicle_journeys.actions.destroy_confirm') }, class: "remove" - - = creation_tag(@vehicle_journey_frequency)
\ No newline at end of file diff --git a/app/views/vehicle_journey_frequencies/_show_vehicle_journey_at_stops.html.slim b/app/views/vehicle_journey_frequencies/_show_vehicle_journey_at_stops.html.slim deleted file mode 100644 index 24517309c..000000000 --- a/app/views/vehicle_journey_frequencies/_show_vehicle_journey_at_stops.html.slim +++ /dev/null @@ -1,22 +0,0 @@ -.vehicle_journey_at_stops.content - table.table-striped.ce-TimeBandFormTable - thead - tr - th.stop.title = t('vehicle_journeys.show.stop_title') - th - th.hour.title = t('vehicle_journeys.show.arrival') - th.hour.title = t('vehicle_journeys.show.departure') - - tbody - - @vehicle_journey_frequency.vehicle_journey_at_stops.each do |vjas| - tr class="#{cycle :odd, :even}" - td = link_to vjas.stop_point.stop_area.name, [@referential, vjas.stop_point.stop_area] - td.ce-TimeBandFormTable-circleLine - span.ce-TimeBandFormTable-circle - span.ce-TimeBandFormTable-line - - td class="hour #{'missing' if vjas.arrival_time.nil?}" - = l(vjas.arrival_time, format: :hour) if vjas.arrival_time - - td class="hour #{'missing' if vjas.departure_time.nil?}" - = l(vjas.departure_time, format: :hour) if vjas.departure_time
\ No newline at end of file diff --git a/app/views/vehicle_journey_frequencies/_vehicle_journey_at_stop_fields.html.slim b/app/views/vehicle_journey_frequencies/_vehicle_journey_at_stop_fields.html.slim deleted file mode 100644 index 6352cebdf..000000000 --- a/app/views/vehicle_journey_frequencies/_vehicle_journey_at_stop_fields.html.slim +++ /dev/null @@ -1,23 +0,0 @@ -- vjas = vehicle_journey_at_stop -- tab_counter_arrival = 2 * vehicle_journey_at_stop_counter + 100 -- tab_counter_departure = (vehicle_journey_at_stops_size * 2) + 2 * vehicle_journey_at_stop_counter + 100 - -tr class="time input optional #{'no_stop' if vjas._destroy} #{cycle :odd, :even}" - td - = {id: vjas.id, _destroy: (vjas._destroy ? 1 : 0), stop_point_id: vjas.stop_point_id, :'departure_time(3i)' => 1, :'departure_time(2i)' => 1, :'departure_time(1i)' => 1, :'arrival_time(3i)' => 1, :'arrival_time(2i)' => 1, :'arrival_time(1i)' => 2000}.map{ |k, v| "<input name=\"vehicle_journey_frequency[vehicle_journey_at_stops_attributes][#{vehicle_journey_at_stop_counter}][#{k}]\" type=\"hidden\" value=\"#{v}\">" }.join("\n").html_safe - - = vjas.stop_point.stop_area.name - - td.ce-TimeBandFormTable-circleLine - span.ce-TimeBandFormTable-circle - span.ce-TimeBandFormTable-line - - td class="arrival_time #{'missing' unless vjas.arrival_time} #{'invalid_position' if vjas.errors[:arrival_time].present?}" - = select_hour(vjas.arrival_time ? vjas.arrival_time.hour : 0, { prefix: 'vehicle_journey_frequency', field_name: "vehicle_journey_at_stops_attributes[#{vehicle_journey_at_stop_counter}][arrival_time(4i)]" }, class: 'hour', tabindex: tab_counter_arrival + 1) - - = select_minute(vjas.arrival_time ? vjas.arrival_time.min : 0, { prefix: 'vehicle_journey_frequency', field_name: "vehicle_journey_at_stops_attributes[#{vehicle_journey_at_stop_counter}][arrival_time(5i)]" }, class: 'minute', tabindex: tab_counter_arrival + 2) - - td class="departure_time #{'missing' unless vjas.departure_time} #{'invalid_position' if vjas.errors[:departure_time].present?}" - = select_hour(vjas.departure_time ? vjas.departure_time.hour : 0, { prefix: 'vehicle_journey_frequency', field_name: "vehicle_journey_at_stops_attributes[#{vehicle_journey_at_stop_counter}][departure_time(4i)]" }, class: 'hour', tabindex: tab_counter_departure + 1) - - = select_minute(vjas.departure_time ? vjas.departure_time.min : 0, { prefix: 'vehicle_journey_frequency', field_name: "vehicle_journey_at_stops_attributes[#{vehicle_journey_at_stop_counter}][departure_time(5i)]" }, class: 'minute', tabindex: tab_counter_departure + 2)
\ No newline at end of file diff --git a/app/views/vehicle_journey_frequencies/_vehicle_journeys_matrix.html.slim b/app/views/vehicle_journey_frequencies/_vehicle_journeys_matrix.html.slim deleted file mode 100644 index be6e76e08..000000000 --- a/app/views/vehicle_journey_frequencies/_vehicle_journeys_matrix.html.slim +++ /dev/null @@ -1,11 +0,0 @@ -ul.ce-VehicleJourneyFrequenciesMatrix - - @vehicle_journeys.each do |vj| - li - ul - - vj.journey_frequencies.each do |jf| - - left, width = journey_frequency_percent(jf) - - li style="left:#{left};width:#{width};" data-style="primary" data-container="body" rel="popover" data-toggle="popover" data-title="#{link_to(vehicle_title(vj, jf), [@referential, @line, @route, vj] )} #{link_to('<span class="fa fa-pencil"></span>'.html_safe, send("edit_referential_line_route_vehicle_journey#{'_frequency' if vj.frequency?}_path", @referential, @line, @route, vj), class: "btn btn-default btn-sm" )}" data-placement= "top" data-content="#{render 'vehicle_journeys/show_popover', { vehicle_journey: vj }}" - - span.ce-VehicleJourneyFrequenciesMatrix-firstDepartureTime = l(jf.first_departure_time, format: :hour) - span.ce-VehicleJourneyFrequenciesMatrix-lastDepartureTime = l(jf.last_departure_time, format: :hour)
\ No newline at end of file diff --git a/app/views/vehicle_journey_frequencies/edit.html.slim b/app/views/vehicle_journey_frequencies/edit.html.slim deleted file mode 100644 index af5f1d88e..000000000 --- a/app/views/vehicle_journey_frequencies/edit.html.slim +++ /dev/null @@ -1,3 +0,0 @@ -= title_tag edit_vehicle_title(@vehicle_journey_frequency) - -== render 'vehicle_journeys/form', vehicle_journey: @vehicle_journey_frequency, form_url: referential_line_route_vehicle_journey_frequency_path(@referential, @line, @route, id: @vehicle_journey_frequency)
\ No newline at end of file diff --git a/app/views/vehicle_journey_frequencies/edit.js.slim b/app/views/vehicle_journey_frequencies/edit.js.slim deleted file mode 100644 index de74b80c7..000000000 --- a/app/views/vehicle_journey_frequencies/edit.js.slim +++ /dev/null @@ -1,10 +0,0 @@ -| $(document).ready(function() { -| $("#vehicle_journey_frequency_journey_pattern_id").change( -| function(){ -| var url = "#{select_journey_pattern_referential_line_route_vehicle_journey_path( @referential, @line, @route, @vehicle_journey_frequency)}?journey_pattern_id="+ -| $("#vehicle_journey_frequency_journey_pattern_input select option:selected").attr("value"); -| url += "&journey_category=frequency"; -| $.get(url); -| } -| ); -| });
\ No newline at end of file diff --git a/app/views/vehicle_journey_frequencies/new.html.slim b/app/views/vehicle_journey_frequencies/new.html.slim deleted file mode 100644 index 86a9d144c..000000000 --- a/app/views/vehicle_journey_frequencies/new.html.slim +++ /dev/null @@ -1,3 +0,0 @@ -= title_tag t('vehicle_journeys.new.title_frequency') - -== render 'vehicle_journeys/form', vehicle_journey: @vehicle_journey_frequency, form_url: referential_line_route_vehicle_journey_frequencies_path(@referential, @line, @route)
\ No newline at end of file diff --git a/app/views/vehicle_journey_frequencies/new.js.slim b/app/views/vehicle_journey_frequencies/new.js.slim deleted file mode 100644 index f4d742f72..000000000 --- a/app/views/vehicle_journey_frequencies/new.js.slim +++ /dev/null @@ -1,13 +0,0 @@ -| $(document).ready(function() { -| $("#vehicle_journey_frequency_journey_pattern_id").change( -| function(){ -| var vehicle_journey_journey_pattern_id = $("#vehicle_journey_frequency_journey_pattern_input select option:selected").attr("value"); -| if (vehicle_journey_journey_pattern_id > 0) { -| var url = "#{referential_line_route_journey_patterns_path(@referential.id,@line.id,@route.id)}"; -| url = url + "/" + vehicle_journey_journey_pattern_id + -| "/new_vehicle_journey?journey_category=frequency"; -| $.get(url); -| } -| } -| ); -| });
\ No newline at end of file diff --git a/app/views/vehicle_journey_frequencies/select_journey_pattern.js.slim b/app/views/vehicle_journey_frequencies/select_journey_pattern.js.slim deleted file mode 100644 index 205fee59e..000000000 --- a/app/views/vehicle_journey_frequencies/select_journey_pattern.js.slim +++ /dev/null @@ -1 +0,0 @@ -| $('.journey_pattern_dependent_list').html("#{escape_javascript(render(partial: 'vehicle_journey_frequencies/vehicle_journey_at_stop_fields', collection: @vehicle_journey.vehicle_journey_at_stops, as: :vehicle_journey_at_stop, locals: { vehicle_journey_at_stops_size: @vehicle_journey.vehicle_journey_at_stops.size })).html_safe}");
\ No newline at end of file diff --git a/app/views/vehicle_journey_frequencies/show.html.slim b/app/views/vehicle_journey_frequencies/show.html.slim deleted file mode 100644 index 9701dbba9..000000000 --- a/app/views/vehicle_journey_frequencies/show.html.slim +++ /dev/null @@ -1,3 +0,0 @@ -== render 'vehicle_journeys/show_details', vehicle_journey: @vehicle_journey_frequency -== render 'show_journey_frequencies' -== render 'show_sidebar' diff --git a/app/views/workbenches/show.html.slim b/app/views/workbenches/show.html.slim index 213c9e5f2..979e7ff04 100644 --- a/app/views/workbenches/show.html.slim +++ b/app/views/workbenches/show.html.slim @@ -6,8 +6,8 @@ - if policy(Workbench).update? = link_to t('workbenches.actions.configure'), edit_workbench_path(@workbench), class: 'btn btn-primary' - if policy(Referential).create? - = link_to t('actions.import'), workbench_imports_path(@workbench), class: 'btn btn-primary' - = link_to t('actions.export'), workbench_exports_path(@workbench), class: 'btn btn-primary' + = link_to t('actions.import'), workbench_imports_path(@workbench), class: 'btn btn-primary' unless @workbench.workgroup.import_types.empty? + = link_to t('actions.export'), workbench_exports_path(@workbench), class: 'btn btn-primary' unless @workbench.workgroup.export_types.empty? = link_to t('actions.add'), new_workbench_referential_path(@workbench), class: 'btn btn-primary' = link_to t('workbenches.actions.show_output'), workbench_output_path(@workbench), class: 'btn btn-primary' |
