On 10/26/2011 04:32 PM, tsedovic(a)redhat.com wrote:
From: Tomas Sedovic<tsedovic(a)redhat.com>
---
src/app/stylesheets/custom.scss | 19 +++++++++++++++++++
.../views/deployments/_pretty_view_show.html.haml | 11 ++++++-----
2 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/src/app/stylesheets/custom.scss b/src/app/stylesheets/custom.scss
index 4059954..7d2c7d0 100644
--- a/src/app/stylesheets/custom.scss
+++ b/src/app/stylesheets/custom.scss
@@ -216,3 +216,22 @@ form.generic section.services {
font-weight: normal;
}
}
+
+.instances_list {
+ li {
+ list-style-type: none;
+ }
+
+ .state {
+ font-weight: bold;
+ }
+
+ li.instance {
+ margin-top: 1em;
+ font-weight: bold;
+
+ ul {
+ font-weight: normal;
+ }
+ }
+}
diff --git a/src/app/views/deployments/_pretty_view_show.html.haml
b/src/app/views/deployments/_pretty_view_show.html.haml
index 76ba477..df12258 100644
--- a/src/app/views/deployments/_pretty_view_show.html.haml
+++ b/src/app/views/deployments/_pretty_view_show.html.haml
@@ -2,7 +2,7 @@
%h2=t 'instances.instances'
%ul.instances_list
- @deployment.instances.each do |instance|
- %li
+ %li.instance
= instance.name
%ul
%li
@@ -10,7 +10,7 @@
= instance.public_addresses
%li
= t 'deployments.pretty_view_show.state'
- = instance.state
+ %span.state= instance.state
- if instance.instance_key
%li
= link_to t('deployments.pretty_view_show.download_key'),
key_instance_path(instance)
@@ -22,10 +22,11 @@
%script#instanceTemplate{ :type => 'text/x-jquery-tmpl' }
:plain
-<li>${name}
+<li class="instance">${name}
<ul>
-<li>#{t('deployments.pretty_view_show.ip_address')}:
${public_addresses}</li>
-<li>#{t('deployments.pretty_view_show.state')}: ${state}</li>
+<li>#{t('deployments.pretty_view_show.ip_address')}
${public_addresses}</li>
+<li>#{t('deployments.pretty_view_show.state')}
+<span class="state">${state}</span></li>
{{if has_key}}
<li><a
href="#{key_instance_path('replace_id').sub('replace_id',
'${id}')}">#{t('deployments.pretty_view_show.download_key')}</a></li>
{{/if}}
self-ack & pushed.
This doesn't actually change functionality, only makes the Deployment
details page less hideous.