From c495d4bb70b85db944a41be139c78c68c5623357 Mon Sep 17 00:00:00 2001
From: Zog
Date: Thu, 19 Apr 2018 16:46:04 +0200
Subject: Refs #6572; Updte wording
---
app/assets/stylesheets/base.sass | 4 ++++
app/helpers/referentials_helper.rb | 11 +++--------
app/views/referentials/show.html.slim | 20 ++++++++++----------
config/locales/actions.fr.yml | 4 ++--
4 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/app/assets/stylesheets/base.sass b/app/assets/stylesheets/base.sass
index 83d92076c..43831fb6b 100644
--- a/app/assets/stylesheets/base.sass
+++ b/app/assets/stylesheets/base.sass
@@ -16,3 +16,7 @@
// OL3
@import 'OpenLayers/ol'
+
+span.sb, span.fa
+ & + span
+ margin-left: 0.3em
diff --git a/app/helpers/referentials_helper.rb b/app/helpers/referentials_helper.rb
index c0a60410a..1f396d43a 100644
--- a/app/helpers/referentials_helper.rb
+++ b/app/helpers/referentials_helper.rb
@@ -25,14 +25,9 @@ module ReferentialsHelper
end.html_safe
end
- def referential_state referential
- out = if referential.archived?
- "
#{t('activerecord.attributes.referential.archived_at')}
"
- else
- "#{"referentials.states.#{referential.state}".t}
"
- end
-
- out.html_safe
+ def referential_state referential, icon: true
+ state_icon = icon && icon_for_referential_state(@referential.state)
+ "#{state_icon}#{"referentials.states.#{referential.state}".t}
".html_safe
end
def referential_overview referential
diff --git a/app/views/referentials/show.html.slim b/app/views/referentials/show.html.slim
index 5849bc582..9785c074d 100644
--- a/app/views/referentials/show.html.slim
+++ b/app/views/referentials/show.html.slim
@@ -13,16 +13,16 @@
= definition_list t('metadatas'), attributes
- unless @referential.ready?
- - operation = @referential.last_operation
- .jumbotron
- = import_status(operation.status)
- - url = operation.is_a?(Import::Base) ? [operation.workbench, operation.parent || operation] : [@referential, operation]
- = link_to url do
- |
- span
- strong= operation.try(:name) || operation.created_at.l(format: :short)
- |
- span= "(#{operation.class.ts})"
+ - if operation = @referential.last_operation
+ .jumbotron
+ = import_status(operation.status)
+ - url = operation.is_a?(Import::Base) ? [operation.workbench, operation.parent || operation] : [@referential, operation]
+ = link_to url do
+ |
+ span
+ strong= operation.try(:name) || operation.created_at.l(format: :short)
+ |
+ span= "(#{operation.class.ts})"
- else
- if params[:q].present? or @reflines.any?
diff --git a/config/locales/actions.fr.yml b/config/locales/actions.fr.yml
index ed1a86189..9e1a132a7 100644
--- a/config/locales/actions.fr.yml
+++ b/config/locales/actions.fr.yml
@@ -13,8 +13,8 @@ fr:
remove: Retirer
new: 'Créer'
show: 'Consulter'
- archive: 'Conserver'
- unarchive: 'Déconserver'
+ archive: 'Archiver'
+ unarchive: 'Désarchiver'
clone: 'Dupliquer'
duplicate: 'Dupliquer'
clean_up: 'Purger'
--
cgit v1.2.3