aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorcedricnjanga2018-01-30 06:37:52 -0800
committercedricnjanga2018-01-30 06:37:52 -0800
commit7ec19d8dc153e1491cb1a693b11b3b0a351f316c (patch)
tree6da6a8bbcf1ae789a460fece5cf7e961562c5222 /app/views
parentf32d869cc3f34a939764cc3fa4d612a5d6544d08 (diff)
parent617a54cf63d7f11111b168534d49cdc04a5865d4 (diff)
downloadchouette-core-7ec19d8dc153e1491cb1a693b11b3b0a351f316c.tar.bz2
Merge branch 'master' into 5683-add_workgroup_id_to_calendars
Diffstat (limited to 'app/views')
-rw-r--r--app/views/calendars/index.html.slim4
-rw-r--r--app/views/calendars/show.html.slim22
-rw-r--r--app/views/companies/index.html.slim4
-rw-r--r--app/views/companies/show.html.slim18
-rw-r--r--app/views/compliance_check_sets/index.html.slim1
-rw-r--r--app/views/compliance_check_sets/show.html.slim13
-rw-r--r--app/views/compliance_control_sets/index.html.slim4
-rw-r--r--app/views/compliance_control_sets/show.html.slim12
-rw-r--r--app/views/compliance_controls/show.html.slim2
-rw-r--r--app/views/import_resources/index.html.slim1
-rw-r--r--app/views/imports/index.html.slim3
-rw-r--r--app/views/imports/show.html.slim10
-rw-r--r--app/views/layouts/navigation/_page_header.html.slim29
-rw-r--r--app/views/lines/index.html.slim4
-rw-r--r--app/views/lines/show.html.slim10
-rw-r--r--app/views/networks/index.html.slim3
-rw-r--r--app/views/networks/show.html.slim10
-rw-r--r--app/views/purchase_windows/index.html.slim4
-rw-r--r--app/views/purchase_windows/show.html.slim9
-rw-r--r--app/views/referential_companies/index.html.slim4
-rw-r--r--app/views/referential_lines/show.html.slim13
-rw-r--r--app/views/referential_networks/index.html.slim3
-rw-r--r--app/views/referential_networks/show.html.slim9
-rw-r--r--app/views/referential_stop_areas/_form.html.slim2
-rw-r--r--app/views/referential_stop_areas/show.html.slim9
-rw-r--r--app/views/referentials/show.html.slim20
-rw-r--r--app/views/routes/show.html.slim17
-rw-r--r--app/views/routing_constraint_zones/index.html.slim3
-rw-r--r--app/views/routing_constraint_zones/show.html.slim9
-rw-r--r--app/views/stop_areas/index.html.slim4
-rw-r--r--app/views/stop_areas/show.html.slim9
-rw-r--r--app/views/time_tables/index.html.slim4
-rw-r--r--app/views/time_tables/show.html.slim15
-rw-r--r--app/views/workbench_outputs/show.html.slim2
-rw-r--r--app/views/workbenches/show.html.slim4
35 files changed, 41 insertions, 249 deletions
diff --git a/app/views/calendars/index.html.slim b/app/views/calendars/index.html.slim
index 60bc9793d..309f0e6f9 100644
--- a/app/views/calendars/index.html.slim
+++ b/app/views/calendars/index.html.slim
@@ -1,7 +1,4 @@
- breadcrumb :calendars, current_workgroup
-- content_for :page_header_actions do
- - if policy(Calendar).create?
- = link_to(t('actions.add'), new_workgroup_calendar_path(current_workgroup), class: 'btn btn-default')
.page_content
.container-fluid
@@ -35,7 +32,6 @@
attribute: Proc.new { |c| t("#{c.try(:shared)}") } \
) \
],
- links: [:show, :edit],
cls: 'table has-filter'
= new_pagination @calendars, 'pull-right'
diff --git a/app/views/calendars/show.html.slim b/app/views/calendars/show.html.slim
index 9f7512173..cd2be2bd1 100644
--- a/app/views/calendars/show.html.slim
+++ b/app/views/calendars/show.html.slim
@@ -1,25 +1,13 @@
- breadcrumb :calendar, @workgroup, @calendar
- page_header_content_for @calendar
-- content_for :page_header_content do
- .row.mb-sm
- .col-lg-12.text-right
- - @calendar.action_links.each do |link|
- = link_to link.href,
- method: link.method,
- data: link.data,
- class: 'btn btn-primary' do
- = link.content
-- if policy(@calendar).edit?
- - content_for :page_header_actions do
- = link_to(t('actions.edit'), edit_workgroup_calendar_path(@workgroup, @calendar), class: 'btn btn-default')
.page_content
.container-fluid
.row
.col-lg-6.col-md-6.col-sm-12.col-xs-12
= definition_list t('metadatas'),
- { 'Nom court' => @calendar.try(:short_name),
- Calendar.human_attribute_name(:shared) => t("#{@calendar.shared}"),
- 'Organisation' => @calendar.organisation.name,
- Calendar.human_attribute_name(:dates) => @calendar.dates.collect{|d| l(d, format: :short)}.join(', ').html_safe,
- Calendar.human_attribute_name(:date_ranges) => @calendar.periods.map{|d| t('validity_range', debut: l(d.begin, format: :short), end: l(d.end, format: :short))}.join('<br>').html_safe }
+ { 'Nom court' => resource.try(:short_name),
+ Calendar.human_attribute_name(:shared) => t("#{resource.shared}"),
+ 'Organisation' => resource.organisation.name,
+ Calendar.human_attribute_name(:dates) => resource.dates.collect{|d| l(d, format: :short)}.join(', ').html_safe,
+ Calendar.human_attribute_name(:date_ranges) => resource.periods.map{|d| t('validity_range', debut: l(d.begin, format: :short), end: l(d.end, format: :short))}.join('<br>').html_safe }
diff --git a/app/views/companies/index.html.slim b/app/views/companies/index.html.slim
index e031f3776..9f1502e54 100644
--- a/app/views/companies/index.html.slim
+++ b/app/views/companies/index.html.slim
@@ -1,7 +1,4 @@
- breadcrumb :companies, @line_referential
-- content_for :page_header_actions do
- - if policy(Chouette::Company).create?
- = link_to(t('companies.actions.new'), new_line_referential_company_path(@line_referential), class: 'btn btn-primary')
.page_content
.container-fluid
@@ -34,7 +31,6 @@
end \
) \
],
- links: [:show],
cls: 'table has-search'
= new_pagination @companies, 'pull-right'
diff --git a/app/views/companies/show.html.slim b/app/views/companies/show.html.slim
index 0d6b4aae3..ca0a410b3 100644
--- a/app/views/companies/show.html.slim
+++ b/app/views/companies/show.html.slim
@@ -1,25 +1,13 @@
- breadcrumb :company, @company
-- content_for :page_header_content do
- .row
- .col-lg-12.text-right.mb-sm
- - if policy(Chouette::Company).create?
- = link_to t('companies.actions.new'), new_line_referential_company_path(@line_referential), class: 'btn btn-primary'
- - if policy(@company).update?
- = link_to t('companies.actions.edit'), edit_line_referential_company_path(@line_referential, @company), class: 'btn btn-primary'
- - if policy(@company).destroy?
- = link_to line_referential_company_path(@line_referential, @company), method: :delete, data: {confirm: t('companies.actions.destroy_confirm')}, class: 'btn btn-primary' do
- span.fa.fa-trash
- span = t('companies.actions.destroy')
- page_header_content_for @company
-
.page_content
.container-fluid
.row
.col-lg-6.col-md-6.col-sm-12.col-xs-12
= definition_list t('metadatas'),
{ 'ID Codif' => @company.try(:get_objectid).try(:short_id),
- Chouette::Company.human_attribute_name(:phone) => @company.phone,
- Chouette::Company.human_attribute_name(:email) => @company.email,
- Chouette::Company.human_attribute_name(:url) => @company.url }
+ Chouette::Company.human_attribute_name(:phone) => resource.phone,
+ Chouette::Company.human_attribute_name(:email) => resource.email,
+ Chouette::Company.human_attribute_name(:url) => resource.url }
diff --git a/app/views/compliance_check_sets/index.html.slim b/app/views/compliance_check_sets/index.html.slim
index f15e85bdd..ead467174 100644
--- a/app/views/compliance_check_sets/index.html.slim
+++ b/app/views/compliance_check_sets/index.html.slim
@@ -41,7 +41,6 @@
), \
],
sortable: true,
- links: [:show],
cls: 'table has-filter has-search'
- unless @compliance_check_sets.any?
.row.mt-xs
diff --git a/app/views/compliance_check_sets/show.html.slim b/app/views/compliance_check_sets/show.html.slim
index 4db2e805f..4df14ab06 100644
--- a/app/views/compliance_check_sets/show.html.slim
+++ b/app/views/compliance_check_sets/show.html.slim
@@ -1,15 +1,4 @@
-- breadcrumb :compliance_check_set, @workbench, @compliance_check_set
-/ PageHeader
-- content_for :page_header_content do
- .row
- .col-lg-12.text-right.mb-sm
- - @compliance_check_set.action_links.each do |link|
- = link_to link.href,
- method: link.method,
- data: link.data,
- class: 'btn btn-primary' do
- = link.content
-
+- breadcrumb :compliance_check_sets, @workbench, @compliance_check_set
- page_header_content_for @compliance_check_set
/ PageContent
diff --git a/app/views/compliance_control_sets/index.html.slim b/app/views/compliance_control_sets/index.html.slim
index 28d2254bf..144a4e5b9 100644
--- a/app/views/compliance_control_sets/index.html.slim
+++ b/app/views/compliance_control_sets/index.html.slim
@@ -1,7 +1,4 @@
- breadcrumb :compliance_control_sets
-- content_for :page_header_actions do
- - if policy(ComplianceControlSet).create?
- = link_to(t('compliance_control_sets.actions.new'), new_compliance_control_set_path, class: 'btn btn-default')
.page_content
.container-fluid
@@ -38,7 +35,6 @@
) \
],
sortable: true,
- links: [:show],
cls: 'table has-filter has-search'
= new_pagination @compliance_control_sets, 'pull-right'
diff --git a/app/views/compliance_control_sets/show.html.slim b/app/views/compliance_control_sets/show.html.slim
index d915bbdaf..59100681d 100644
--- a/app/views/compliance_control_sets/show.html.slim
+++ b/app/views/compliance_control_sets/show.html.slim
@@ -1,17 +1,5 @@
- breadcrumb :compliance_control_set, @compliance_control_set
- page_header_content_for @compliance_control_set
-- content_for :page_header_content do
- .row.mb-sm
- .col-lg-12.text-right
- - @compliance_control_set.action_links.each do |link|
- - if link.is_a?(HTMLElement)
- = link.to_html(class: 'btn btn-primary')
- - else
- = link_to link.href,
- method: link.method,
- data: link.data,
- class: 'btn btn-primary' do
- = link.content
.page_content
.container-fluid
diff --git a/app/views/compliance_controls/show.html.slim b/app/views/compliance_controls/show.html.slim
index 54b07abf1..8a65bb864 100644
--- a/app/views/compliance_controls/show.html.slim
+++ b/app/views/compliance_controls/show.html.slim
@@ -1,6 +1,4 @@
- breadcrumb :compliance_control, @compliance_control
-- content_for :page_header_actions do
- = link_to(t('actions.edit'), edit_compliance_control_set_compliance_control_path(params[:compliance_control_set_id], params[:id]), class: 'btn btn-default')
- page_header_content_for @compliance_control
diff --git a/app/views/import_resources/index.html.slim b/app/views/import_resources/index.html.slim
index 0c21a9e09..6b4e60026 100644
--- a/app/views/import_resources/index.html.slim
+++ b/app/views/import_resources/index.html.slim
@@ -43,7 +43,6 @@
end \
), \
],
- links: [],
cls: 'table has-search'
- else
.col-lg-12
diff --git a/app/views/imports/index.html.slim b/app/views/imports/index.html.slim
index 856b715e0..4fc077bd6 100644
--- a/app/views/imports/index.html.slim
+++ b/app/views/imports/index.html.slim
@@ -1,6 +1,4 @@
- breadcrumb :imports, @workbench
-- content_for :page_header_actions do
- = link_to(t('imports.actions.new'), new_workbench_import_path(workbench_id: @workbench), class: 'btn btn-primary')
.page_content
.container-fluid
@@ -34,7 +32,6 @@
attribute: 'creator' \
) \
],
- links: [:show],
cls: 'table has-search'
= new_pagination @imports, 'pull-right'
diff --git a/app/views/imports/show.html.slim b/app/views/imports/show.html.slim
index cf137867b..7a9d02077 100644
--- a/app/views/imports/show.html.slim
+++ b/app/views/imports/show.html.slim
@@ -1,13 +1,4 @@
- breadcrumb :import, @workbench, @import
-- content_for :page_header_content do
- .row
- .col-lg-12.text-right.mb-sm
- - @import.action_links.each do |link|
- = link_to link.href,
- method: link.method,
- data: link.data,
- class: 'btn btn-primary' do
- = link.content
- page_header_content_for @import
@@ -54,7 +45,6 @@
sortable: false, \
) \
],
- links: [],
cls: 'table',
overhead: [ \
{}, \
diff --git a/app/views/layouts/navigation/_page_header.html.slim b/app/views/layouts/navigation/_page_header.html.slim
index 90fd7d855..e407e53da 100644
--- a/app/views/layouts/navigation/_page_header.html.slim
+++ b/app/views/layouts/navigation/_page_header.html.slim
@@ -1,23 +1,36 @@
-div.page_header
- div.container-fluid
- div.row
- div.col-lg-9.col-md-8.col-sm-7.col-xs-7
+- action_links = resource.action_links(params[:action]) rescue nil
+- action_links ||= decorated_collection.action_links(params[:action]) rescue nil
+
+.page_header
+ .container-fluid
+ .row
+ .col-lg-9.col-md-8.col-sm-7.col-xs-7
- if defined?(resource_class)
- div.page-icon
+ .page-icon
span.sb class="sb-#{resource_class.model_name.name.underscore}"
- div.page-title
+ .page-title
- if content_for? :page_header_title
h1 = yield :page_header_title
- else
- if defined?(resource_class)
h1 = t("#{resource_class.model_name.name.underscore.pluralize}.#{params[:action]}.title")
- div.col-lg-3.col-md-4.col-sm-5.col-xs-5.text-right
- div.page-action
+ .col-lg-3.col-md-4.col-sm-5.col-xs-5.text-right
+ .page-action
- if content_for? :page_header_meta
= yield :page_header_meta
- if content_for? :page_header_actions
= yield :page_header_actions
+ - if action_links&.primary&.any?
+ - action_links.primary.each do |link|
+ = link.to_html do |l|
+ - l.class "btn btn-default #{l.disabled ? "disabled" : ""}"
+ - if action_links&.secondary&.any?
+ .row.mb-sm
+ .col-lg-12.text-right
+ - action_links.secondary.each do |link|
+ = link.to_html do |l|
+ - l.class "btn btn-primary #{l.disabled ? "disabled" : ""}"
- if content_for? :page_header_content
= yield :page_header_content
diff --git a/app/views/lines/index.html.slim b/app/views/lines/index.html.slim
index b62263263..2d64e5f73 100644
--- a/app/views/lines/index.html.slim
+++ b/app/views/lines/index.html.slim
@@ -1,7 +1,4 @@
- breadcrumb :lines, @line_referential
-- content_for :page_header_actions do
- - if policy(Chouette::Line).create?
- = link_to(t('lines.actions.new'), new_line_referential_line_path(@line_referential), class: 'btn btn-primary')
.page_content
.container-fluid
@@ -52,7 +49,6 @@
attribute: Proc.new { |n| n.transport_submode.present? ? t("enumerize.transport_submode.#{n.try(:transport_submode)}") : "-" } \
) \
],
- links: [:show],
cls: 'table has-filter has-search'
= new_pagination @lines, 'pull-right'
diff --git a/app/views/lines/show.html.slim b/app/views/lines/show.html.slim
index 83244f739..34b907bdd 100644
--- a/app/views/lines/show.html.slim
+++ b/app/views/lines/show.html.slim
@@ -1,14 +1,4 @@
- breadcrumb :line, @line
-- content_for :page_header_content do
- .row
- .col-lg-12.text-right.mb-sm
- - @line.action_links.each do |link|
- = link_to link.href,
- method: link.method,
- data: link.data,
- class: "btn btn-primary #{link.disabled ? "disabled" : ""}" do
- = link.content
-
- page_header_content_for @line
.page_content
diff --git a/app/views/networks/index.html.slim b/app/views/networks/index.html.slim
index b13c73e9e..6aeb140cc 100644
--- a/app/views/networks/index.html.slim
+++ b/app/views/networks/index.html.slim
@@ -1,7 +1,4 @@
- breadcrumb :networks, @line_referential
-- content_for :page_header_actions do
- - if policy(Chouette::Network).create?
- = link_to(t('networks.actions.new'), new_line_referential_network_path(@line_referential), class: 'btn btn-primary')
.page_content
.container-fluid
diff --git a/app/views/networks/show.html.slim b/app/views/networks/show.html.slim
index 8e40a13b2..527fb8d5b 100644
--- a/app/views/networks/show.html.slim
+++ b/app/views/networks/show.html.slim
@@ -1,14 +1,6 @@
- breadcrumb :network, @network
- page_header_content_for @network
-- content_for :page_header_content do
- .row
- .col-lg-12.text-right.mb-sm
- - @network.action_links.each do |link|
- = link_to link.href,
- method: link.method,
- data: link.data,
- class: 'btn btn-primary' do
- = link.content
+
.page_content
.container-fluid
.row
diff --git a/app/views/purchase_windows/index.html.slim b/app/views/purchase_windows/index.html.slim
index 04f9fb0a8..0dba86935 100644
--- a/app/views/purchase_windows/index.html.slim
+++ b/app/views/purchase_windows/index.html.slim
@@ -1,7 +1,4 @@
- breadcrumb :purchase_windows, @referential
-- content_for :page_header_actions do
- - if policy(Chouette::PurchaseWindow).create?
- = link_to(t('actions.add'), new_referential_purchase_window_path(@referential), class: 'btn btn-default')
.page_content
.container-fluid
@@ -32,7 +29,6 @@
sortable: false \
) \
],
- links: [:show],
cls: 'table has-filter'
= new_pagination @purchase_windows, 'pull-right'
diff --git a/app/views/purchase_windows/show.html.slim b/app/views/purchase_windows/show.html.slim
index 4ddde1706..4e836f424 100644
--- a/app/views/purchase_windows/show.html.slim
+++ b/app/views/purchase_windows/show.html.slim
@@ -1,14 +1,5 @@
- breadcrumb :purchase_window, @referential, @purchase_window
- page_header_content_for @purchase_window
-- content_for :page_header_content do
- .row.mb-sm
- .col-lg-12.text-right
- - @purchase_window.action_links.each do |link|
- = link_to link.href,
- method: link.method,
- data: link.data,
- class: 'btn btn-primary' do
- = link.content
.page_content
.container-fluid
diff --git a/app/views/referential_companies/index.html.slim b/app/views/referential_companies/index.html.slim
index 07de2bc9d..3bff448c7 100644
--- a/app/views/referential_companies/index.html.slim
+++ b/app/views/referential_companies/index.html.slim
@@ -1,7 +1,4 @@
- breadcrumb :referential_companies, @referential
-- content_for :page_header_actions do
- - if policy(Chouette::Company).create?
- = link_to(t('companies.actions.new'), new_referential_company_path(@referential), class: 'btn btn-default')
.page_content
.container-fluid
@@ -46,7 +43,6 @@
attribute: 'url' \
) \
],
- links: [:show],
cls: 'table has-search'
= new_pagination @companies, 'pull-right'
diff --git a/app/views/referential_lines/show.html.slim b/app/views/referential_lines/show.html.slim
index cfba8cab3..02d605d8c 100644
--- a/app/views/referential_lines/show.html.slim
+++ b/app/views/referential_lines/show.html.slim
@@ -1,13 +1,4 @@
- breadcrumb :referential_line, @referential, @line
-- content_for :page_header_content do
- .row
- .col-lg-12.text-right.mb-sm
- - @line.action_links.each do |link|
- = link_to link.href,
- method: link.method,
- data: link.data,
- class: 'btn btn-primary' do
- = link.content
- page_header_content_for @line
.page_content
@@ -79,8 +70,8 @@
attribute: Proc.new{ |r| r.try(:journey_patterns).count } \
) \
],
- links: [:show, :edit],
- cls: 'table has-search'
+ cls: 'table has-search',
+ action: :index
= new_pagination @routes, 'pull-right'
diff --git a/app/views/referential_networks/index.html.slim b/app/views/referential_networks/index.html.slim
index d556e7e5e..efa28dc05 100644
--- a/app/views/referential_networks/index.html.slim
+++ b/app/views/referential_networks/index.html.slim
@@ -1,7 +1,4 @@
- breadcrumb :referential_networks, @referential
-- if policy(Chouette::Network).create?
- - content_for :page_header_actions do
- = link_to(t('networks.actions.new'), new_referential_network_path(@referential), class: 'btn btn-default')
.page_content
.container-fluid
diff --git a/app/views/referential_networks/show.html.slim b/app/views/referential_networks/show.html.slim
index 7de304671..3d13d9211 100644
--- a/app/views/referential_networks/show.html.slim
+++ b/app/views/referential_networks/show.html.slim
@@ -1,14 +1,5 @@
- breadcrumb :referential_network, @referential, @network
- page_header_content_for @network
-- content_for :page_header_content do
- .row
- .col-lg-12.text-right.mb-sm
- - @network.action_links.each do |link|
- = link_to link.href,
- method: link.method,
- data: link.data,
- class: 'btn btn-primary' do
- = link.content
/ PageContent
.page_content
diff --git a/app/views/referential_stop_areas/_form.html.slim b/app/views/referential_stop_areas/_form.html.slim
index 50f5d4aaf..8181ec3f3 100644
--- a/app/views/referential_stop_areas/_form.html.slim
+++ b/app/views/referential_stop_areas/_form.html.slim
@@ -7,7 +7,7 @@
= form.inputs do
= form.input :id, as: :hidden
= form.input :name, :input_html => { :title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.name")}
- = form.input :stop_area_type, as: :select, :input_html => { :disabled => !@stop_area.new_record? }, :collection => Chouette::StopArea.area_type.options, :include_blank => false }
+ = form.input :stop_area_type, as: :select, :input_html => { :disabled => !@stop_area.new_record? }, :collection => Chouette::StopArea.area_type.options, :include_blank => false
.location_info
h3 = t("stop_areas.stop_area.localisation")
diff --git a/app/views/referential_stop_areas/show.html.slim b/app/views/referential_stop_areas/show.html.slim
index 0470b4654..cb04ab7a6 100644
--- a/app/views/referential_stop_areas/show.html.slim
+++ b/app/views/referential_stop_areas/show.html.slim
@@ -1,14 +1,5 @@
- breadcrumb :referential_stop_area, @referential, @stop_area
- page_header_content_for @stop_area
-- content_for :page_header_content do
- .row
- .col-lg-12.text-right.mb-sm
- - @stop_area.action_links.each do |link|
- = link_to link.href,
- method: link.method,
- data: link.data,
- class: 'btn btn-primary' do
- = link.content
.page_content
.container-fluid
diff --git a/app/views/referentials/show.html.slim b/app/views/referentials/show.html.slim
index cbb622c44..6c88f5b81 100644
--- a/app/views/referentials/show.html.slim
+++ b/app/views/referentials/show.html.slim
@@ -1,21 +1,5 @@
- breadcrumb @referential
- page_header_content_for @referential
-- content_for :page_header_actions do
- - unless (@referential.referential_read_only? || !policy(@referential).edit?)
- = link_to(t('actions.edit'), edit_referential_path(@referential), class: 'btn btn-default')
-
-- content_for :page_header_content do
- .row.mb-sm
- .col-lg-12.text-right
- - @referential.action_links.each do |link|
- - if link.is_a?(HTMLElement)
- = link.to_html(class: 'btn btn-primary')
- - else
- = link_to link.href,
- method: link.method,
- data: link.data,
- class: 'btn btn-primary' do
- = link.content
.page_content
.container-fluid
@@ -72,8 +56,8 @@
attribute: Proc.new { |n| n&.company&.name || "-" } \
) \
],
- links: [:show],
- cls: 'table has-filter has-search'
+ cls: 'table has-filter has-search',
+ action: :index
= new_pagination @reflines, 'pull-right'
diff --git a/app/views/routes/show.html.slim b/app/views/routes/show.html.slim
index 644f79022..375d7c57b 100644
--- a/app/views/routes/show.html.slim
+++ b/app/views/routes/show.html.slim
@@ -1,18 +1,5 @@
- breadcrumb :route, @referential, @route
- page_header_content_for @route
-- content_for :page_header_actions do
- - if policy(@route).edit?
- = link_to(t('actions.edit'), edit_referential_line_route_path(@referential, @line, @route), class: 'btn btn-default')
-
-- content_for :page_header_content do
- .row.mb-sm
- .col-lg-12.text-right
- - @route.action_links.each do |link|
- = link_to link.href,
- method: link.method,
- data: link.data,
- class: 'btn btn-primary' do
- = link.content
.page_content
.container-fluid
@@ -67,9 +54,9 @@
attribute: Proc.new { |s| t("stop_points.stop_point.for_alighting.#{s.for_alighting}") } \
) \
],
- links: [:show],
sortable: false,
- cls: 'table has-stoppoints'
+ cls: 'table has-stoppoints',
+ action: :index
- else
= replacement_msg t('stop_areas.search_no_results')
diff --git a/app/views/routing_constraint_zones/index.html.slim b/app/views/routing_constraint_zones/index.html.slim
index 7c54fca68..2f67b467e 100644
--- a/app/views/routing_constraint_zones/index.html.slim
+++ b/app/views/routing_constraint_zones/index.html.slim
@@ -1,7 +1,4 @@
- breadcrumb :routing_constraint_zones, @referential, @line
-- content_for :page_header_actions do
- - if (policy(Chouette::RoutingConstraintZone).create? && @referential.organisation == current_organisation)
- = link_to(t('actions.new'), new_referential_line_routing_constraint_zone_path(@referential, @line), class: 'btn btn-primary')
.page_content
.container-fluid
diff --git a/app/views/routing_constraint_zones/show.html.slim b/app/views/routing_constraint_zones/show.html.slim
index 3d1988545..8c8e9b17a 100644
--- a/app/views/routing_constraint_zones/show.html.slim
+++ b/app/views/routing_constraint_zones/show.html.slim
@@ -1,14 +1,5 @@
- breadcrumb :routing_constraint_zone, @referential, @line, @routing_constraint_zone
- page_header_content_for @routing_constraint_zone
-- content_for :page_header_content do
- .row
- .col-lg-12.text-right.mb-sm
- - @routing_constraint_zone.action_links.each do |link|
- = link_to link.href,
- method: link.method,
- data: link.data,
- class: 'btn btn-primary' do
- = link.content
.page_content
.container-fluid
diff --git a/app/views/stop_areas/index.html.slim b/app/views/stop_areas/index.html.slim
index 63e99fd75..71c7f995c 100644
--- a/app/views/stop_areas/index.html.slim
+++ b/app/views/stop_areas/index.html.slim
@@ -1,7 +1,4 @@
- breadcrumb :stop_areas, @stop_area_referential
-- content_for :page_header_actions do
- - if policy(Chouette::StopArea).create?
- = link_to(t('stop_areas.actions.new'), new_stop_area_referential_stop_area_path(@stop_area_referential), class: 'btn btn-primary')
.page_content
.container-fluid
@@ -51,7 +48,6 @@
attribute: Proc.new { |s| Chouette::AreaType.find(s.area_type).try :label } \
), \
],
- links: [:show],
cls: 'table has-filter has-search'
= new_pagination @stop_areas, 'pull-right'
diff --git a/app/views/stop_areas/show.html.slim b/app/views/stop_areas/show.html.slim
index f9de34a98..b5ec8ac00 100644
--- a/app/views/stop_areas/show.html.slim
+++ b/app/views/stop_areas/show.html.slim
@@ -1,14 +1,5 @@
- breadcrumb :stop_area, @stop_area_referential, @stop_area
- page_header_content_for @stop_area
-- content_for :page_header_content do
- .row
- .col-lg-12.text-right.mb-sm
- - @stop_area.action_links.each do |link|
- = link_to link.href,
- method: link.method,
- data: link.data,
- class: 'btn btn-primary' do
- = link.content
/ PageContent
.page_content
diff --git a/app/views/time_tables/index.html.slim b/app/views/time_tables/index.html.slim
index b684b0bcb..f58fbb5ea 100644
--- a/app/views/time_tables/index.html.slim
+++ b/app/views/time_tables/index.html.slim
@@ -1,7 +1,4 @@
- breadcrumb :time_tables, @referential
-- content_for :page_header_actions do
- - if (policy(Chouette::TimeTable).create? && @referential.organisation == current_organisation)
- = link_to(t('actions.add'), new_referential_time_table_path(@referential), class: 'btn btn-default')
.page_content
.container-fluid
@@ -54,7 +51,6 @@
attribute: Proc.new { |tt| l(tt.updated_at, format: :short) } \
) \
],
- links: [:show, :edit],
cls: 'table has-search'
= new_pagination @time_tables, 'pull-right'
diff --git a/app/views/time_tables/show.html.slim b/app/views/time_tables/show.html.slim
index df9789055..6d15323f3 100644
--- a/app/views/time_tables/show.html.slim
+++ b/app/views/time_tables/show.html.slim
@@ -4,21 +4,6 @@
- content_for :page_header_title, t('time_tables.show.title', name: @time_table.comment), flush: true
-- content_for :page_header_actions do
- - if policy(@time_table).edit?
- = link_to(t('actions.edit'), edit_referential_time_table_path(@referential, @time_table), class: 'btn btn-default')
-
-- content_for :page_header_content do
- .row.mb-sm
- .col-lg-12.text-right
- - @time_table.action_links.each do |link|
- = link_to link.href,
- method: link.method,
- data: link.data,
- class: 'btn btn-primary' do
- = link.content
-
-
.page_content
.container-fluid
.row
diff --git a/app/views/workbench_outputs/show.html.slim b/app/views/workbench_outputs/show.html.slim
index dc0a54204..4f71fb7ef 100644
--- a/app/views/workbench_outputs/show.html.slim
+++ b/app/views/workbench_outputs/show.html.slim
@@ -20,7 +20,7 @@
), \
TableBuilderHelper::Column.new( \
key: :name, \
- attribute: 'name', \
+ attribute: 'full_names', \
link_to: lambda do |merge| \
workbench_merge_path merge.workbench, merge \
end \
diff --git a/app/views/workbenches/show.html.slim b/app/views/workbenches/show.html.slim
index 8907f3f08..a162ca334 100644
--- a/app/views/workbenches/show.html.slim
+++ b/app/views/workbenches/show.html.slim
@@ -59,8 +59,8 @@
) \
],
selectable: ->(ref){ @workbench.referentials.include?(ref) },
- links: [:show, :edit],
- cls: 'table has-filter has-search'
+ cls: 'table has-filter has-search',
+ action: :index
= multiple_selection_toolbox([:delete], collection_name: 'referentials')