aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/referential_networks
diff options
context:
space:
mode:
authorjpl2017-02-14 16:24:42 +0100
committerjpl2017-02-14 16:24:42 +0100
commita9b42b07109ba40045e06e5e9a6c7564004d574c (patch)
tree06172c37f1ea04dfd253073553075669172e9851 /app/views/referential_networks
parent10168a528708e3db3b3c80b4e48f39ec7d209d1c (diff)
downloadchouette-core-a9b42b07109ba40045e06e5e9a6c7564004d574c.tar.bz2
Refs #2604: updating networks and company related to lines
Diffstat (limited to 'app/views/referential_networks')
-rw-r--r--app/views/referential_networks/show.html.slim79
1 files changed, 29 insertions, 50 deletions
diff --git a/app/views/referential_networks/show.html.slim b/app/views/referential_networks/show.html.slim
index d579d311b..b61fe3fb7 100644
--- a/app/views/referential_networks/show.html.slim
+++ b/app/views/referential_networks/show.html.slim
@@ -1,50 +1,29 @@
-= title_tag t('networks.show.title', network: @network.name)
-
-.network_show
- = @map.to_html
-
- .summary
- p
- label = "#{Chouette::Network.human_attribute_name('registration_number')} : "
- = @network.registration_number
-
- p
- label = "#{Chouette::Network.human_attribute_name('comment')} : "
- = @network.comment
-
- p
- label = "#{Chouette::Network.human_attribute_name('version_date')} : "
- - if @network.version_date.present?
- = l @network.version_date
-
- p
- label = "#{Chouette::Network.human_attribute_name('description')} : "
- = @network.description
-
- p
- label = "#{Chouette::Network.human_attribute_name('source_name')} : "
- = @network.source_name
-
- p
- label = "#{Chouette::Network.human_attribute_name('source_type_name')} : "
- - if @network.source_type_name.present?
- = t("source_types.label.#{@network.source_type_name}")
-
- p
- label = "#{Chouette::Network.human_attribute_name('source_identifier')} : "
- = @network.source_identifier
-
-- content_for :sidebar do
- ul.actions
- - if policy(Chouette::Network).create?
- li
- = link_to t('networks.actions.new'), new_referential_network_path(@referential), class: 'add'
- - if policy(@network).update?
- li
- = link_to t('networks.actions.edit'), edit_referential_network_path(@referential, @network), class: 'edit'
- - if policy(@network).destroy?
- li
- = link_to t('networks.actions.destroy'), referential_network_path(@referential, @network), method: :delete, data: { :confirm => t('networks.actions.destroy_confirm')}, class: 'remove'
- br
-
- = creation_tag(@network)
+/ PageHeader
+= pageheader 'map-marker',
+ @network.name,
+ 'Lorem ipsum dolor sit amet',
+ t('last_update', time: l(@network.updated_at, format: :short)) do
+
+ / Below is secundary actions & optional contents (filters, ...)
+ .row
+ .col-lg-12.text-right.mb-sm
+ - if policy(Chouette::Network).create?
+ = link_to t('networks.actions.new'), new_referential_network_path(@referential), class: 'btn btn-primary'
+ - if policy(@network).update?
+ = link_to t('networks.actions.edit'), edit_referential_network_path(@referential, @network), class: 'btn btn-primary'
+ - if policy(@network).destroy?
+ = link_to t('networks.actions.destroy'), referential_network_path(@referential, @network), method: :delete, data: { confirm: t('networks.actions.destroy_confirm')}, class: 'btn btn-primary'
+
+/ PageContent
+.page_content
+ .container-fluid
+ .row
+ .col-lg-6.col-md-6.col-sm-12.col-xs-12
+ = definition_list t('metadatas'),
+ { Chouette::Network.human_attribute_name(:registration_number) => @network.registration_number,
+ Chouette::Network.human_attribute_name(:comment) => @network.comment,
+ Chouette::Network.human_attribute_name(:version_date) => (@network.version_date.present? ? l(@network.version_date, format: :short) : '-'),
+ Chouette::Network.human_attribute_name(:description) => @network.description,
+ Chouette::Network.human_attribute_name(:source_name) => @network.source_name,
+ Chouette::Network.human_attribute_name(:source_type_name) => (@network.source_type_name.present? ? t("source_types.label.#{@network.source_type_name}") : '-'),
+ Chouette::Network.human_attribute_name(:source_identifier) => @network.source_identifier }