aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/api/v1/journey_patterns/show.rabl7
-rw-r--r--app/views/imports/index.html.slim2
-rw-r--r--app/views/merges/_form.html.slim5
-rw-r--r--app/views/merges/show.html.slim7
-rw-r--r--app/views/referential_vehicle_journeys/_filters.html.slim10
-rw-r--r--app/views/referentials/_form.html.slim6
-rw-r--r--app/views/workbench_outputs/show.html.slim11
7 files changed, 42 insertions, 6 deletions
diff --git a/app/views/api/v1/journey_patterns/show.rabl b/app/views/api/v1/journey_patterns/show.rabl
index 86876f3fb..815b1cf0b 100644
--- a/app/views/api/v1/journey_patterns/show.rabl
+++ b/app/views/api/v1/journey_patterns/show.rabl
@@ -5,16 +5,21 @@ extends "api/v1/trident_objects/show"
attributes attr, :unless => lambda { |m| m.send( attr).nil?}
end
+if has_feature? :costs_in_journey_patterns
+ attribute :costs
+end
+
node(:route_short_description) do |journey_pattern|
partial("api/v1/routes/short_description", :object => journey_pattern.route)
end
node(:vehicle_journey_object_ids) do |journey_pattern|
- journey_pattern.vehicle_journeys.map(&:objectid)
+ journey_pattern.vehicle_journeys.pluck(:objectid)
end unless root_object.vehicle_journeys.empty?
child :stop_points => :stop_area_short_descriptions do |stop_points|
node do |stop_point|
+ cache stop_point.stop_area_id
partial("api/v1/stop_areas/short_description", :object => stop_point.stop_area)
end
end
diff --git a/app/views/imports/index.html.slim b/app/views/imports/index.html.slim
index 79452bbfc..856b715e0 100644
--- a/app/views/imports/index.html.slim
+++ b/app/views/imports/index.html.slim
@@ -34,7 +34,7 @@
attribute: 'creator' \
) \
],
- links: [],
+ links: [:show],
cls: 'table has-search'
= new_pagination @imports, 'pull-right'
diff --git a/app/views/merges/_form.html.slim b/app/views/merges/_form.html.slim
index ff85ad76b..b97a4b03e 100644
--- a/app/views/merges/_form.html.slim
+++ b/app/views/merges/_form.html.slim
@@ -4,4 +4,9 @@
.col-lg-12
= form.input :referentials, :collection => @mergeable_referentials, include_blank: false, input_html: { multiple: true, 'data-select2ed': true }
+
+ .row
+ .col-lg-12
+ = form.input :creator, input_html: { disabled: true }
+
= form.button :submit, t('actions.submit'), class: 'btn btn-default formSubmitr', form: 'wb_merge_form'
diff --git a/app/views/merges/show.html.slim b/app/views/merges/show.html.slim
index 579995ebf..47e5aa029 100644
--- a/app/views/merges/show.html.slim
+++ b/app/views/merges/show.html.slim
@@ -7,7 +7,8 @@
.col-lg-6.col-md-6.col-sm-12.col-xs-12
= definition_list t('metadatas'),
{ @merge.class.human_attribute_name(:referentials) => @merge.referentials.map(&:name).join(', '),
+ @merge.class.human_attribute_name(:operator) => @merge.creator,
@merge.class.human_attribute_name(:status) => @merge.status,
- @merge.class.human_attribute_name(:created_at) => @merge.created_at,
- @merge.class.human_attribute_name(:started_at) => @merge.started_at,
- @merge.class.human_attribute_name(:ended_at) => @merge.ended_at }
+ @merge.class.human_attribute_name(:created_at) => @merge.created_at ? l(@merge.created_at) : '-',
+ @merge.class.human_attribute_name(:started_at) => @merge.started_at ? l(@merge.started_at) : '-',
+ @merge.class.human_attribute_name(:ended_at) => @merge.ended_at ? l(@merge.ended_at) : '-' }
diff --git a/app/views/referential_vehicle_journeys/_filters.html.slim b/app/views/referential_vehicle_journeys/_filters.html.slim
index 963da8cea..4506251c3 100644
--- a/app/views/referential_vehicle_journeys/_filters.html.slim
+++ b/app/views/referential_vehicle_journeys/_filters.html.slim
@@ -5,6 +5,16 @@
span.input-group-btn
button.btn.btn-default#search-btn type='submit'
span.fa.fa-search
+ .ffg-row
+ .form-group.togglable
+ = f.label Chouette::VehicleJourney.human_attribute_name(:company), required: false, class: 'control-label'
+ = f.input :company_id_eq_any, collection: @all_companies.select(:id, :name).order(name: :asc), as: :check_boxes, label: false, label_method: lambda{|l| ("<span>" + l.name + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list'}
+ .form-group.togglable.name-filter
+ = f.label Chouette::VehicleJourney.human_attribute_name(:published_journey_name), required: false, class: 'control-label'
+ .inputs.form-inline.checkbox_list
+ = f.input :published_journey_name_gteq, label: false, wrapper_html: { class: 'w45'}
+ .form-group.w10.to= I18n.t('vehicle_journeys.form.to')
+ = f.input :published_journey_name_lteq, label: false, wrapper_html: { class: 'w45'}
.actions
= link_to 'Effacer', referential_vehicle_journeys_path(@referential), class: 'btn btn-link'
diff --git a/app/views/referentials/_form.html.slim b/app/views/referentials/_form.html.slim
index 1611ee6dd..9927f05bd 100644
--- a/app/views/referentials/_form.html.slim
+++ b/app/views/referentials/_form.html.slim
@@ -51,4 +51,8 @@
.hidden = form.input :workbench_id, as: :hidden
- = form.button :submit, t('actions.submit'), class: 'btn btn-default formSubmitr', form: 'referential_form'
+ = form.button :submit,
+ t('actions.submit'),
+ class: 'btn btn-default formSubmitr',
+ data: { disable_with: t('actions.processing') },
+ form: 'referential_form'
diff --git a/app/views/workbench_outputs/show.html.slim b/app/views/workbench_outputs/show.html.slim
index 67dc6e8d4..dc0a54204 100644
--- a/app/views/workbench_outputs/show.html.slim
+++ b/app/views/workbench_outputs/show.html.slim
@@ -19,10 +19,21 @@
attribute: Proc.new { |n| import_status(n.status) }, \
), \
TableBuilderHelper::Column.new( \
+ key: :name, \
+ attribute: 'name', \
+ link_to: lambda do |merge| \
+ workbench_merge_path merge.workbench, merge \
+ end \
+ ), \
+ TableBuilderHelper::Column.new( \
key: :started_at, \
attribute: Proc.new { |n| l(n.started_at, format: :long) if n.started_at }, \
), \
TableBuilderHelper::Column.new( \
+ key: :ended_at, \
+ attribute: Proc.new { |n| l(n.ended_at, format: :long) if n.ended_at }, \
+ ), \
+ TableBuilderHelper::Column.new( \
key: :creator, \
attribute: 'creator' \
) \