[PATCH conductor] Fixing jQuery template on deployments#show
ifarkas at redhat.com
ifarkas at redhat.com
Tue Dec 13 14:37:13 UTC 2011
From: Imre Farkas <ifarkas at redhat.com>
---
.../views/deployments/_pretty_view_show.html.haml | 11 ++++++++---
src/config/locales/en.yml | 1 +
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/app/views/deployments/_pretty_view_show.html.haml b/src/app/views/deployments/_pretty_view_show.html.haml
index f7ceade..c8cfec6 100644
--- a/src/app/views/deployments/_pretty_view_show.html.haml
+++ b/src/app/views/deployments/_pretty_view_show.html.haml
@@ -11,7 +11,7 @@
%dd= count_uptime(instance.uptime)
%li
%dt.ip_address= t('deployments.pretty_view_show.ip_address')
- %dd= instance.public_addresses.present? ? instance.public_addresses : '-'
+ %dd= instance.public_addresses.present? ? instance.public_addresses : t('deployments.pretty_view_show.no_ip_address')
%li
%dt.state= t('deployments.pretty_view_show.state')
%dd= instance.state
@@ -43,7 +43,13 @@
</li>
<li>
<dt class="ip_address">#{t('deployments.pretty_view_show.ip_address')}</dt>
- <dd>${public_addresses}</dd>
+ <dd>
+ {{if public_addresses}}
+ ${public_addresses}
+ {{else}}
+ #{t('deployments.pretty_view_show.no_ip_address')}
+ {{/if}}
+ </dd>
</li>
<li>
<dt class="state">#{t('deployments.pretty_view_show.state')}</dt>
@@ -63,7 +69,6 @@
<li>#{button_to(t('deployments.pretty_view_show.stop'), stop_instance_path('replace_id').sub('replace_id', '${id}'), :disabled => true)}</li>
{{/if}}
-
{{if reboot_enabled}}
<li>#{button_to(t('deployments.pretty_view_show.reboot'), reboot_instance_path('replace_id').sub('replace_id', '${id}'), :disabled => false)}</li>
{{else}}
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 99050d5..dc25790 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -228,6 +228,7 @@ en:
delete_selected: Delete Selected
pretty_view_show:
ip_address: "IP Address:"
+ no_ip_address: '-'
state: "State:"
download_key: Download key
reboot: "Restart"
--
1.7.6.4
More information about the aeolus-devel
mailing list