[PATCH 2/2] BZ 790826 change rebuild_all text depending on context
Tzu-Mainn Chen
tzumainn at redhat.com
Tue Feb 21 19:19:39 UTC 2012
---
src/app/views/images/show.html.haml | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/app/views/images/show.html.haml b/src/app/views/images/show.html.haml
index 82c00f5..0f8607f 100644
--- a/src/app/views/images/show.html.haml
+++ b/src/app/views/images/show.html.haml
@@ -28,7 +28,13 @@
- if @image.imported?
= t('.can_not_build_imported_image')
-else
- = button_to t('.rebuild_all'), rebuild_all_image_path(@image.id), :class => 'button pill'
+ - if @builds.any?
+ - build_text = '.rebuild'
+ - else
+ - build_text = '.build'
+ - if @account_groups.size > 1
+ - build_text << '_all'
+ = button_to t(build_text), rebuild_all_image_path(@image.id), :class => 'button pill'
- if @build and @build.id == @latest_build
= button_to t('.push_all'), push_all_image_path(@image.id, :build_id => @build.id), :class => 'button pill'
.content
--
1.7.6.5
More information about the aeolus-devel
mailing list