[PATCH conductor] Deployable forms styling

jtomasek at redhat.com jtomasek at redhat.com
Fri Dec 16 13:53:40 UTC 2011


From: Jiri Tomasek <jtomasek at redhat.com>

---
 src/app/stylesheets/layout.scss                    |   18 ++++++++++++------
 src/app/views/deployables/_form.html.haml          |    8 ++++----
 src/app/views/deployables/_from_url.html.haml      |   15 ++++++---------
 src/app/views/deployables/_new.html.haml           |    6 ++----
 .../views/deployables/_new_from_image.html.haml    |    2 +-
 src/app/views/deployables/_upload.html.haml        |   13 +++++--------
 src/config/locales/en.yml                          |   20 +++++++++++---------
 7 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/src/app/stylesheets/layout.scss b/src/app/stylesheets/layout.scss
index a43aa2e..15112ac 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -3287,16 +3287,22 @@ body.administer form.generic{
     padding: 6px 0px;
   }
 
-  textarea.edit_xml{
-    box-sizing: border-box; -webkit-box-sizing:border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-    width: 100%;
-    padding: 5px 3px;
-    height: 300px;
-    border: 1px solid #C4C4C4;
+  textarea{
+    padding: 5px 4px;
+    margin: 0px;
     resize: vertical;
+    border: 1px solid #C4C4C4;
     box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.50);
     -moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.50);
     -webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.50);
+    height: 100px;
+
+    &.long{ width: 400px }
+    &.edit_xml{
+      box-sizing: border-box; -webkit-box-sizing:border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
+      width: 100%;
+      height: 300px;
+    }
   }
 }
 
diff --git a/src/app/views/deployables/_form.html.haml b/src/app/views/deployables/_form.html.haml
index e6a123f..c58529d 100644
--- a/src/app/views/deployables/_form.html.haml
+++ b/src/app/views/deployables/_form.html.haml
@@ -8,17 +8,17 @@
       = form.text_area :xml, :class => 'edit_xml'
   - else
     %p
-      = label_tag :catalog_id, t('catalog_entries.form.catalog')
+      = label_tag :catalog_id, t('.catalog')
       %span.text_instead_input= @catalog.name
     %p
-      = form.label :name, t('catalog_entries.index.name')
-      = form.text_field :name, :class => 'em long'
+      = form.label :name, t('deployables.index.name')
+      = form.text_field :name, :class => 'long'
     %p
       = form.label :description, t('.description')
       = form.text_area :description, :class => 'long'
     %p
       = form.label :xml, t('.deployable_xml')
-      %span.text_instead_input= link_to t("catalog_entries.properties.edit_deployable_xml"), edit_catalog_deployable_path(@catalog.id, @deployable.id, :edit_xml=>true)
+      %span.text_instead_input= link_to t("deployables.properties.edit_deployable_xml"), edit_catalog_deployable_path(@catalog.id, @deployable.id, :edit_xml=>true)
 
 %fieldset.align-center
   = link_to t('cancel'), catalog_path(@catalog), :class => 'button danger'
diff --git a/src/app/views/deployables/_from_url.html.haml b/src/app/views/deployables/_from_url.html.haml
index d351ecb..7c6da31 100644
--- a/src/app/views/deployables/_from_url.html.haml
+++ b/src/app/views/deployables/_from_url.html.haml
@@ -3,23 +3,20 @@
     = render 'layouts/error_messages', :object => @deployable
   %fieldset
     %p
-      = form.label :catalog_id, t('catalog_entries.form.catalog')
+      = form.label :catalog_id, t('deployables.form.catalog')
       %span.text_instead_input= @catalog.name
-      .clear
-  %fieldset
     %p
-      = form.label :name, t('catalog_entries.index.name')
+      = form.label :name, t('deployables.index.name')
       = form.text_field :name, :class => 'em long'
     %p
-      = form.label :description, t('catalog_entries.form.description')
+      = form.label :description, t('deployables.form.description')
       = form.text_area :description, :class => 'long'
-  %fieldset
     %p
-      = label_tag :url, t('catalog_entries.form.deployable_xml_url')
-      = text_field_tag :url
+      = label_tag :url, t('deployables.form.deployable_xml_url')
+      = text_field_tag :url, nil, :class => 'long'
     %p
       = check_box_tag(:edit_xml, true, false)
-      = label_tag :edit_xml, t('catalog_entries.form.edit_xml_after_save')
+      = label_tag :edit_xml, t('deployables.form.edit_xml_after_save')
 
   %fieldset.align-center
     = link_to t('cancel'), catalog_path(@catalog), :class => 'button danger'
diff --git a/src/app/views/deployables/_new.html.haml b/src/app/views/deployables/_new.html.haml
index 2b431a5..bdef9a0 100644
--- a/src/app/views/deployables/_new.html.haml
+++ b/src/app/views/deployables/_new.html.haml
@@ -5,8 +5,6 @@
     %h2=t'catalog_entries.new.add_catalog_entry'
 
 %section.admin-content-section.image-upload
-  %p.description=t'.choose_option_to_upload'
-
   %nav#image-upload-tabs.faceted
     %ul.tabs
       %li
@@ -14,8 +12,8 @@
       %li
         = link_to t('catalog_entries.new.from_url'), new_catalog_deployable_path(@catalog, :from_url => true), :id => "from_url", :class => "#{'active' if @form_option == 'from_url'}"
 
-    .form_option
-      = render :partial => @form_option
+  .form_option
+    = render :partial => @form_option
 
 :javascript
   $(document).ready(function() {
diff --git a/src/app/views/deployables/_new_from_image.html.haml b/src/app/views/deployables/_new_from_image.html.haml
index 9d9175a..0c8edd6 100644
--- a/src/app/views/deployables/_new_from_image.html.haml
+++ b/src/app/views/deployables/_new_from_image.html.haml
@@ -34,5 +34,5 @@
             .clear
       .centered
         %fieldset.align-center
-          = link_to "#{t'catalog_entries.form.cancel'}", catalogs_path, :class => 'button danger'
+          = link_to t('catalog_entries.form.cancel'), catalogs_path, :class => 'button danger'
           = submit_tag "#{t'catalog_entries.form.save'}", :name => 'save', :class => 'button primary', :id => 'save_button'
diff --git a/src/app/views/deployables/_upload.html.haml b/src/app/views/deployables/_upload.html.haml
index 6afaa8f..054ecab 100644
--- a/src/app/views/deployables/_upload.html.haml
+++ b/src/app/views/deployables/_upload.html.haml
@@ -3,23 +3,20 @@
     = render 'layouts/error_messages', :object => @deployable
   %fieldset
     %p
-      = label_tag :catalog_id, t('catalog_entries.form.catalog')
+      = label_tag :catalog_id, t('deployables.form.catalog')
       %span.text_instead_input= @catalog.name
-      .clear
-  %fieldset
     %p
-      = form.label :name, t('catalog_entries.index.name')
+      = form.label :name, t('deployables.index.name')
       = form.text_field :name, :class => 'em long'
     %p
-      = form.label :description, t('catalog_entries.form.description')
+      = form.label :description, t('deployables.form.description')
       = form.text_area :description, :class => 'long'
     %p
-      = form.label :xml, t('catalog_entries.form.choose_xml')
+      = form.label :xml, t('deployables.form.choose_xml')
       = form.file_field :xml
-  %fieldset
     %p
       = check_box_tag(:edit_xml, true, false)
-      = label_tag :edit_xml, t('catalog_entries.form.edit_xml_after_save')
+      = label_tag :edit_xml, t('deployables.form.edit_xml_after_save')
 
   %fieldset.align-center
     = link_to t('cancel'), catalog_path(@catalog), :class => 'button danger'
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 235aff1..1d50b90 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -610,15 +610,6 @@ en:
       name: Name
       hw_profile: Default Hardware Profile
       catalog_detail: "%{name} Catalog"
-    form:
-      choose_xml: "Choose Deployable XML file:"
-      catalog: "Catalog: "
-      description: Description
-      cancel: Cancel
-      save: Save
-      deployable_xml: "Deployable XML:"
-      edit_xml_after_save: "Edit XML file after save"
-      deployable_xml_url: "URL of Deployable XML:"
     show:
       edit: Edit
       edit_xml: Edit XML
@@ -816,6 +807,15 @@ en:
         pushed: "All Images are pushed and recent."
       build_missing: "Build missing"
       push_missing: "Push missing"
+    form:
+      choose_xml: "Choose Deployable XML file:"
+      catalog: "Catalog: "
+      description: Description
+      cancel: Cancel
+      save: Save
+      deployable_xml: "Deployable XML:"
+      edit_xml_after_save: "Edit XML file after save"
+      deployable_xml_url: "URL of Deployable XML:"
     flash:
       error:
         attribute_not_exist: "Some attribute(s) is missing in XML, please check the file!"
@@ -825,6 +825,8 @@ en:
     error:
       attribute_not_exists: invalid
       hwp_not_exists: "Hardware profile %{name} specified in XML doesn't exist."
+    properties:
+      edit_deployable_xml: Edit Deployable XML
   name: Name
   summary: Summary
   settings:
-- 
1.7.7.3




More information about the aeolus-devel mailing list