aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/referential_companies/show.html.slim90
-rw-r--r--app/views/referential_lines/show.html.slim4
-rw-r--r--app/views/referential_networks/show.html.slim79
3 files changed, 63 insertions, 110 deletions
diff --git a/app/views/referential_companies/show.html.slim b/app/views/referential_companies/show.html.slim
index a1a767bbd..99b08d8ff 100644
--- a/app/views/referential_companies/show.html.slim
+++ b/app/views/referential_companies/show.html.slim
@@ -1,58 +1,32 @@
-= title_tag t('companies.show.title', company: @company.name)
-
-.company_show
- .summary
- p
- label = "#{Chouette::Company.human_attribute_name('short_name')} : "
- = @company.short_name
-
- p
- label = "#{Chouette::Company.human_attribute_name('organizational_unit')} : "
- = @company.organizational_unit
-
- p
- label = "#{Chouette::Company.human_attribute_name('operating_department_name')} : "
- = @company.operating_department_name
-
- p
- label = "#{Chouette::Company.human_attribute_name('code')} : "
- = @company.code
-
- p
- label = "#{Chouette::Company.human_attribute_name('phone')} : "
- = @company.phone
-
- p
- label = "#{Chouette::Company.human_attribute_name('fax')} : "
- = @company.fax
-
- p
- label = "#{Chouette::Company.human_attribute_name('email')} : "
- = @company.email
-
- p
- label = "#{Chouette::Company.human_attribute_name('time_zone')} : "
- = @company.time_zone
-
- p
- label = "#{Chouette::Company.human_attribute_name('url')} : "
- = @company.url
-
- p
- label = "#{Chouette::Company.human_attribute_name('registration_number')} : "
- = @company.registration_number
-
-- content_for :sidebar do
- ul.actions
- - if policy(Chouette::Company).create?
- li
- = link_to t('companies.actions.new'), new_referential_company_path(@referential), class: 'add'
- - if policy(@company).update?
- li
- = link_to t('companies.actions.edit'), edit_referential_company_path(@referential, @company), class: 'edit'
- - if policy(@company).destroy?
- li
- = link_to t('companies.actions.destroy'), referential_company_path(@referential, @company), :method => :delete, :data => {:confirm => t('companies.actions.destroy_confirm')}, class: 'remove'
- br
-
- = creation_tag(@company)
+/ PageHeader
+= pageheader 'map-marker',
+ @company.name,
+ 'Lorem ipsum dolor sit amet',
+ t('last_update', time: l(@company.updated_at, format: :short)) do
+
+ / Below is secundary actions & optional contents (filters, ...)
+ .row
+ .col-lg-12.text-right.mb-sm
+ - if policy(Chouette::Company).create?
+ = link_to t('companies.actions.new'), new_referential_company_path(@referential), class: 'btn btn-primary'
+ - if policy(@company).update?
+ = link_to t('companies.actions.edit'), edit_referential_company_path(@referential, @company), class: 'btn btn-primary'
+ - if policy(@company).destroy?
+ = link_to t('companies.actions.destroy'), referential_company_path(@referential, @company), method: :delete, data: {confirm: t('companies.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::Company.human_attribute_name(:short_name) => @company.short_name,
+ Chouette::Company.human_attribute_name(:organizational_unit) => @company.organizational_unit,
+ Chouette::Company.human_attribute_name(:operating_department_name) => @company.operating_department_name,
+ Chouette::Company.human_attribute_name(:code) => @company.code,
+ Chouette::Company.human_attribute_name(:phone) => @company.phone,
+ Chouette::Company.human_attribute_name(:fax) => @company.fax,
+ Chouette::Company.human_attribute_name(:email) => @company.email,
+ Chouette::Company.human_attribute_name(:time_zone) => @company.time_zone,
+ Chouette::Company.human_attribute_name(:url) => @company.url,
+ Chouette::Company.human_attribute_name(:registration_number) => @company.registration_number }
diff --git a/app/views/referential_lines/show.html.slim b/app/views/referential_lines/show.html.slim
index 0f1eab298..0f7c4820f 100644
--- a/app/views/referential_lines/show.html.slim
+++ b/app/views/referential_lines/show.html.slim
@@ -1,9 +1,9 @@
/ PageHeader
= pageheader 'map-marker',
@line.name,
- 'Lorem ipsum dolor sit amet' do
+ 'Lorem ipsum dolor sit amet',
+ t('last_update', time: l(@line.updated_at, format: :short)) do
- / t('last_update', time: l(@line.updated_at, format: :short)),
/ Below is secundary actions & optional contents (filters, ...)
.row
.col-lg-12.text-right.mb-sm
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 }