aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/networks
diff options
context:
space:
mode:
authorXinhui2017-11-23 14:14:04 +0100
committerXinhui2017-11-28 12:21:33 +0100
commit6820faf7849ff704c55cde29c8b2efc320ff63d7 (patch)
treefca06b0663ff2150349cafe6fd5839d3ea7115af /app/views/networks
parent1e61b1792c4c0be9e55b6469610fca982d8a9e54 (diff)
downloadchouette-core-6820faf7849ff704c55cde29c8b2efc320ff63d7.tar.bz2
Replace pageheader by render partial
Diffstat (limited to 'app/views/networks')
-rw-r--r--app/views/networks/edit.html.slim2
-rw-r--r--app/views/networks/index.html.slim12
-rw-r--r--app/views/networks/new.html.slim3
-rw-r--r--app/views/networks/show.html.slim11
4 files changed, 10 insertions, 18 deletions
diff --git a/app/views/networks/edit.html.slim b/app/views/networks/edit.html.slim
index 2d511e15d..ad9f61347 100644
--- a/app/views/networks/edit.html.slim
+++ b/app/views/networks/edit.html.slim
@@ -1,4 +1,4 @@
- breadcrumb :network, @network
-= title_tag t('networks.edit.title', network: @network.name)
+= render partial: 'layouts/navigation/page_header', locals: {object: @network}
= render 'form'
diff --git a/app/views/networks/index.html.slim b/app/views/networks/index.html.slim
index 6004f5859..ce3a10710 100644
--- a/app/views/networks/index.html.slim
+++ b/app/views/networks/index.html.slim
@@ -1,12 +1,10 @@
- breadcrumb :networks, @line_referential
-/ PageHeader
-= pageheader 'reseau',
- t('networks.index.title'),
- 'Lorem ipsum dolor sit amet',
- '',
- (policy(Chouette::Network).create? ? link_to(t('networks.actions.new'), new_line_referential_network_path(@line_referential), class: 'btn btn-primary') : '')
+- 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')
+
+= render partial: 'layouts/navigation/page_header'
-/ PageContent
.page_content
.container-fluid
- if params[:q].present? or @networks.any?
diff --git a/app/views/networks/new.html.slim b/app/views/networks/new.html.slim
index cf04ab03f..0461a3d8c 100644
--- a/app/views/networks/new.html.slim
+++ b/app/views/networks/new.html.slim
@@ -1,4 +1,3 @@
- breadcrumb :networks, @line_referential
-= title_tag t('networks.new.title')
-
+= render partial: 'layouts/navigation/page_header'
= render 'form'
diff --git a/app/views/networks/show.html.slim b/app/views/networks/show.html.slim
index 89aa1e50a..54f5e537e 100644
--- a/app/views/networks/show.html.slim
+++ b/app/views/networks/show.html.slim
@@ -1,11 +1,5 @@
- breadcrumb :network, @network
-/ PageHeader
-= pageheader 'reseau',
- @network.name,
- '',
- t('last_update', time: l(@network.updated_at, format: :short)) do
-
- / Below is secundary actions & optional contents (filters, ...)
+- content_for :page_header_content do
.row
.col-lg-12.text-right.mb-sm
- @network.action_links.each do |link|
@@ -15,7 +9,8 @@
class: 'btn btn-primary' do
= link.content
-/ PageContent
+= render partial: 'layouts/navigation/page_header', locals: {object: @network}
+
.page_content
.container-fluid
.row