aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/assets/stylesheets/application.sass1
-rw-r--r--app/assets/stylesheets/components/_labels.sass14
-rw-r--r--app/helpers/newapplication_helper.rb4
-rw-r--r--app/views/layouts/navigation/_main_nav_left.html.slim10
-rw-r--r--app/views/referentials/show.html.slim42
5 files changed, 45 insertions, 26 deletions
diff --git a/app/assets/stylesheets/application.sass b/app/assets/stylesheets/application.sass
index df62cea93..4e18317bb 100644
--- a/app/assets/stylesheets/application.sass
+++ b/app/assets/stylesheets/application.sass
@@ -12,6 +12,7 @@
@import 'components/buttons'
@import 'components/alerts'
+@import 'components/labels'
@import 'components/select2'
@import 'components/forms'
@import 'components/tables'
diff --git a/app/assets/stylesheets/components/_labels.sass b/app/assets/stylesheets/components/_labels.sass
new file mode 100644
index 000000000..216939972
--- /dev/null
+++ b/app/assets/stylesheets/components/_labels.sass
@@ -0,0 +1,14 @@
+//--------//
+// LABELS //
+//--------//
+
+.label
+ display: inline-block
+ font-size: 1em
+ font-weight: inherit
+ padding: 0.35em 0.4em
+ border-radius: 2px
+
+ &.label-default
+ background-color: #fff
+ color: $blue
diff --git a/app/helpers/newapplication_helper.rb b/app/helpers/newapplication_helper.rb
index 42d21105a..413378d6a 100644
--- a/app/helpers/newapplication_helper.rb
+++ b/app/helpers/newapplication_helper.rb
@@ -206,9 +206,7 @@ module NewapplicationHelper
content_tag :span, '', class: "fa fa-lg fa-#{pageicon}"
end
ptitle = content_tag :div, '', class: 'page-title' do
- info = content_tag :span, '', class: 'small fa fa-info-circle', title: desc
-
- content_tag :h1, pagetitle.concat(info).html_safe
+ content_tag :h1, pagetitle, title: desc
end
picon + ptitle
diff --git a/app/views/layouts/navigation/_main_nav_left.html.slim b/app/views/layouts/navigation/_main_nav_left.html.slim
index d1ab41901..6d22e6080 100644
--- a/app/views/layouts/navigation/_main_nav_left.html.slim
+++ b/app/views/layouts/navigation/_main_nav_left.html.slim
@@ -1,9 +1,11 @@
+- @localizationUrl = "#{params[:controller]}##{params[:action]}"
+
.nav-menu#menu_left
.openMenu title='Ouvrir le menu'
.menu-content
.closeMenu title='Fermer le menu'
- .brandname IBOO
+ .brandname = "IBOO"
#menu-items.panel-group
.menu-item.panel
@@ -14,7 +16,7 @@
#miOne.panel-collapse.collapse
.list-group
- = link_to root_path, class: "list-group-item #{(params[:controller] == 'referentials' && params[:action] == 'index') ? 'active' : ''}" do
+ = link_to root_path, class: "list-group-item #{(@localizationUrl == 'referentials#index') ? 'active' : ''}" do
span Tableau de bord
= link_to '#', class: 'list-group-item' do
span Offre de mon organisation
@@ -59,9 +61,9 @@
#miFour.panel-collapse.collapse
.list-group
- = link_to line_referential_path(1), class: 'list-group-item' do
+ = link_to line_referential_path(1), class: "list-group-item #{(@localizationUrl == 'line_referentials#show') ? 'active' : ''}" do
span Synchronisation iLLICO
- = link_to stop_area_referential_path(1), class: 'list-group-item' do
+ = link_to stop_area_referential_path(1), class: "list-group-item #{(@localizationUrl == 'stop_area_referentials#show') ? 'active' : ''}" do
span Synchronisation iCAR
.menu-item.panel
diff --git a/app/views/referentials/show.html.slim b/app/views/referentials/show.html.slim
index f5c93129a..bf202d87a 100644
--- a/app/views/referentials/show.html.slim
+++ b/app/views/referentials/show.html.slim
@@ -7,40 +7,44 @@
/ Below is secundary actions & optional contents (filters, ...)
.row
- .col-lg-12.text-right
- / Actions are: controler, rapport de controle, dupliquer, purger, conserver, supprimer
- = link_to t('actions.clone'), new_referential_path(from: @referential.id), class: 'btn btn-primary'
-
- button.btn.btn-primary type='button' data-toggle='modal' data-target='#purgeModal' Purger
-
- - if @referential.archived?
- = link_to t('actions.unarchive'), unarchive_referential_path(@referential.id), method: :put, class: 'btn btn-primary'
- - else
- = link_to t('actions.archive'), archive_referential_path(@referential.id), method: :put, class: 'btn btn-primary'
-
- = link_to t('actions.destroy'), referential_path(@referential), method: :delete, data: {confirm: t('referentials.actions.destroy_confirm')}, class: 'btn btn-primary'
-
- .row.mt-xs
.col-lg-12
.page_metalist
.pm-col
+ - if @referential.archived?
+ .pm-item
+ span.label.label-default
+ strong = "#{@referential.human_attribute_name(:archived_at)} : "
+ = l(@referential.archived_at, format: :short)
+ - else
+ .pm-item
+ strong = "#{@referential.human_attribute_name(:archived_at)} : "
+
.pm-item
strong = "#{@referential.human_attribute_name(:validity_period)} : "
- if @referential.validity_period
= t('validity_range', debut: l(@referential.try(:validity_period).try(:begin), format: :short), end: l(@referential.try(:validity_period).try(:end), format: :short))
+ .pm-col
.pm-item
strong = "Organisation : "
= @referential.organisation.name
-
- .pm-col
.pm-item
strong = "#{@referential.human_attribute_name(:published_at)} : "
= ""
- .pm-item
- strong = "#{@referential.human_attribute_name(:archived_at)} : "
- = l(@referential.archived_at, format: :short) if @referential.archived?
+ .row
+ .col-lg-12.text-right
+ / Actions are: controler, rapport de controle, dupliquer, purger, conserver, supprimer
+ = link_to t('actions.clone'), new_referential_path(from: @referential.id), class: 'btn btn-primary'
+
+ button.btn.btn-primary type='button' data-toggle='modal' data-target='#purgeModal' Purger
+
+ - if @referential.archived?
+ = link_to t('actions.unarchive'), unarchive_referential_path(@referential.id), method: :put, class: 'btn btn-primary'
+ - else
+ = link_to t('actions.archive'), archive_referential_path(@referential.id), method: :put, class: 'btn btn-primary'
+
+ = link_to t('actions.destroy'), referential_path(@referential), method: :delete, data: {confirm: t('referentials.actions.destroy_confirm')}, class: 'btn btn-primary'
.row.mt-xs
.col-lg-5.col-md-6.col-sm-6.col-xs-8