[PATCH] BZ 790824 hide build select unless build exists; make sure build select button is always visible if form is visible
Tzu-Mainn Chen
tzumainn at redhat.com
Wed Feb 15 21:29:43 UTC 2012
---
src/app/views/images/show.html.haml | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/src/app/views/images/show.html.haml b/src/app/views/images/show.html.haml
index e26a720..a9190ec 100644
--- a/src/app/views/images/show.html.haml
+++ b/src/app/views/images/show.html.haml
@@ -15,10 +15,11 @@
%header
%h2= t('.provider_images')
.section-controls
- = t'.view_build'
- = form_tag image_path(@image.id), :method => :get do
- = select_tag :build, options_for_build_select(@builds, @build, @latest_build)
- = submit_tag t('.select_build'), :id => 'seletect_build_button'
+ - if @builds.any?
+ = t'.view_build'
+ = form_tag image_path(@image.id), :method => :get do
+ = select_tag :build, options_for_build_select(@builds, @build, @latest_build)
+ = submit_tag t('.select_build'), :id => 'select_build_button'
- if check_privilege(Privilege::USE, PoolFamily)
- if @image.imported?
= t('.can_not_build_imported_image')
@@ -87,14 +88,6 @@
.clear
-:javascript
- $(document).ready(function(){
- $("#seletect_build_button").hide();
- $("#build").change(function() {
- $("#seletect_build_button").click();
- });
- });
-
%script#imageBuildsTemplate{ :type => 'text/x-jquery-tmpl' }
:plain
{{each(driver, groups) account_groups}}
--
1.7.6.5
More information about the aeolus-devel
mailing list