[PATCH] RM3523 Quickfixes - On deployment overview display quota information only when relevant
jtomasek at redhat.com
jtomasek at redhat.com
Mon Aug 13 14:15:58 UTC 2012
From: Jiri Tomasek <jtomasek at redhat.com>
To add html tags to i18n message variables, the yaml key has to end with "_html"
http://stackoverflow.com/questions/5367705/rails-3-i18n-interpolating-html-tags-into-text
---
src/app/stylesheets/layout.scss | 2 ++
src/app/views/deployments/_overview.html.haml | 8 ++++++--
src/config/locales/en.yml | 5 ++---
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/app/stylesheets/layout.scss b/src/app/stylesheets/layout.scss
index 1f154ac..9f37bc0 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -41,6 +41,7 @@ section.maincontent{
}
strong, em, b, i{ font-family: $font-family-em; }
+strong{ font-weight: bold; }
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Application Input Controls -- v.0.0.1 [input] (input.scss)
@@ -591,6 +592,7 @@ section.content-section{
padding: 0px 40px 0px 0px;
margin-bottom: 4px;
+ &.no-icon{ padding: 0px; }
&.activity{ background: transparent url('../../images/admin_h2_icons.png') right 0px no-repeat; }
&.roles{ background: transparent url('../../images/admin_h2_icons.png') right -29px no-repeat; }
&.settings{ background: transparent url('../../images/admin_h2_icons.png') right -56px no-repeat; }
diff --git a/src/app/views/deployments/_overview.html.haml b/src/app/views/deployments/_overview.html.haml
index d4a90fd..957cc21 100644
--- a/src/app/views/deployments/_overview.html.haml
+++ b/src/app/views/deployments/_overview.html.haml
@@ -11,8 +11,12 @@
%section.content-section
%header.align-center
- %h2= t('.header', :deployment => @deployment.name, :pool => @pool.name)
- %p= t('.confirmation', :deployment => @deployment.name, :pool => @pool.name, :quota => number_to_percentage(@additional_quota, :precision => 0))
+ %h2.no-icon= t('.header', :deployment => @deployment.name, :pool => @pool.name)
+ %p
+ = t('.confirmation_html', :deployment => content_tag(:strong, @deployment.name),
+ :pool => @pool.name)
+ - unless @additional_quota == 0
+ = t('.quota_info', :quota => number_to_percentage(@additional_quota, :precision => 0))
.content
%fieldset
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 151a84e..cc8e8a1 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -313,9 +313,8 @@ en:
overview:
pool_name: "%{pool} Pool"
header: Deploy "%{deployment}" to %{pool} Pool?
- confirmation:
- Are you sure you wish to deploy "%{deployment}" to the %{pool} Pool? Doing
- so will utilize %{quota} of your overall deployment quota.
+ confirmation_html: 'Are you sure you wish to deploy "%{deployment}" to the %{pool} Pool?'
+ quota_info: "Doing so will utilize %{quota} of your overall deployment quota."
deployable_xml: Deployable XML
name: Name
description: Description
--
1.7.7.6
More information about the aeolus-devel
mailing list