From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/stylesheets/custom.scss | 113 +-------------------
src/app/stylesheets/layout.scss | 84 ++++++++++++---
.../catalog_entries/_new_from_image.html.haml | 39 ++++----
src/app/views/images/edit_xml.html.haml | 21 ++--
src/app/views/images/new.html.haml | 92 ++++++++--------
src/app/views/images/overview.html.haml | 22 ++--
src/app/views/users/new.html.haml | 4 +-
7 files changed, 158 insertions(+), 217 deletions(-)
diff --git a/src/app/stylesheets/custom.scss b/src/app/stylesheets/custom.scss
index 44112f5..f8f1cc8 100644
--- a/src/app/stylesheets/custom.scss
+++ b/src/app/stylesheets/custom.scss
@@ -236,117 +236,6 @@ form.generic section.services {
}
}
-section.admin-content-section.image-upload {
- padding: 1em 1em 3em 1em;
-
- .description {
- text-align: center;
- font-weight: bold;
- margin-bottom: 3em;
- }
-
- fieldset {
- input[type="text"] {
- padding: 3px;
- border: 1px solid #ccc;
- width: 300px;
- }
- input[type="checkbox"] {
- margin-top: 7px;
- }
- label {
- padding: 6px 7px 5px;
- text-align: right;
- float: left;
- width: 200px;
- }
- }
-
- #image-file-form,#image-url-form {
- width: 600px;
- margin: auto;
- padding-top: 2em;
- }
-
- #image-upload-tabs {
- padding-left: 200px;
-
- li {
- list-style-type: none;
- display: inline-block;
- margin-right: 3em;
-
- a {
- display: inline-block;
- padding-bottom: 6px;
- text-decoration: none;
- color: #666;
- font-weight: 200;
- font-size: 16px;
-
- &.selected {
- border-bottom: 4px solid #0084B7;
- font-weight: bold;
- color: black;
- }
- }
- }
- }
-
- .buttons.container {
- padding-top: 3em;
- padding-left: 200px;
- }
-
-}
-
-
-section.admin-content-section.edit-xml {
- padding-bottom: 2em;
-
- #editor {
- position: relative;
- width: 100%;
- height: 300px;
- margin-bottom: 2em;
-
- textarea {
- position: absolute;
- display: block;
- width: 100%;
- height: 100%;
- border: 1px solid #ccc;
- }
- }
-
- .buttons.container {
- width: 240px;
- margin: auto;
- }
-}
-
-section.admin-content-section.image-upload-overview {
- background: url(../../images/template-valid.png) no-repeat 80% 25%;
-
- .overview {
- margin-top: 30px;
- margin-left: 50px;
- width: 400px;
- height: 200px;
- text-align: center;
-
- .description {
- margin: 1em 0 2em 0;
- }
- }
-
- .buttons.container {
- width: 240px;
- padding-top: 2em;
- margin: auto;
- }
-}
-
.catalog_deployments_and_images{
color: #606060;
position: relative;
@@ -367,4 +256,4 @@ section.admin-content-section.image-upload-overview {
padding-top:5px;
list-style-type: none;
}
-}
\ No newline at end of file
+}
diff --git a/src/app/stylesheets/layout.scss b/src/app/stylesheets/layout.scss
index a0733e5..1dd93bc 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -1600,26 +1600,28 @@ section.admin-content-section{
color: #666;
}
}
-
- /* nav */
nav.faceted{
float: right;
- ul{ list-style: none; display: inline-block; font-family: $font-family-primary; }
- li{ display: inline-block; margin-bottom: 1px; }
- li + li{ margin-left: 40px; }
- a{
- display: inline-block;
- padding-bottom: 6px;
- text-decoration: none;
- color: #666;
- font-weight: 200;
- font-size: 16px;
- }
- a.active{
- border-bottom: 4px solid #0084b7;
- font-weight: bold;
- color: #000;
- }
+ }
+ }
+
+ /* nav */
+ nav.faceted{
+ ul{ list-style: none; display: inline-block; font-family: $font-family-primary; }
+ li{ display: inline-block; margin-bottom: 1px; }
+ li + li{ margin-left: 40px; }
+ a{
+ display: inline-block;
+ padding-bottom: 6px;
+ text-decoration: none;
+ color: #666;
+ font-weight: 200;
+ font-size: 16px;
+ }
+ a.active{
+ border-bottom: 4px solid #0084b7;
+ font-weight: bold;
+ color: #000;
}
}
@@ -1633,10 +1635,56 @@ section.admin-content-section{
margin-top: 0px;
}
+ p.description{ margin-bottom: 20px }
+
}
header.admin-page-header + section.admin-content-section{margin-top: 26px;}
section.admin-content-section + section.admin-content-section {margin-top: 26px;}
+section.admin-content-section{ margin-bottom: 10px; }
+
+/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Build Push
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+section.admin-content-section{
+ .content.buildpush{
+ fieldset{margin-top: 20px;}
+
+ 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;
+ resize: vertical;
+ 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);
+ }
+
+ div.centered{
+ width: 600px; margin: 10px auto;
+ }
+
+ div.lefted{
+ padding-right: 380px;
+ margin: 0px 50px;
+ min-height: 160px;
+ h2{
+ font-family: $font-family-primary;
+ font-size: 21px;
+ font-weight: 200;
+ margin-bottom: 4px;
+ padding-right: 40px;
+ text-align: center;
+ }
+ p{ text-align: center; margin: 10px 0px 10px 0px; }
+ }
+ div.lefted.image-upload-overview{background: url(../../images/template-valid.png)
no-repeat 600px top;}
+ div.lefted.new-catalog-entry-from-image{background:
url(../../images/template-valid.png) no-repeat 600px top;}
+ }
+}
+
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
User Card
diff --git a/src/app/views/catalog_entries/_new_from_image.html.haml
b/src/app/views/catalog_entries/_new_from_image.html.haml
index 81215e5..fd20f3c 100644
--- a/src/app/views/catalog_entries/_new_from_image.html.haml
+++ b/src/app/views/catalog_entries/_new_from_image.html.haml
@@ -1,24 +1,25 @@
-%section.admin-content-section
- %header.admin-page-header
- %h2=t('.catalog_entry_name', :name => @catalog_entry.deployable.name)
+%header.admin-page-header
+ %h1.deployables= t('.catalog_entry_name', :name =>
@catalog_entry.deployable.name)
- .content
+%section.admin-content-section
+ .content.buildpush
= form_for @catalog_entry, :html => {:class => 'generic'} do |form|
= hidden_field_tag :create_from_image, params[:create_from_image]
- if @catalog_entry.errors.any?
= render 'layouts/error_messages', :object => @catalog_entry
- %fieldset
- %p
- %h2
- =t('.title')
- =t('.description', :name => @image.name)
- %p
- = form.label :name, t('catalog_entries.new.hw_profile')
- = select_tag :hardware_profile,
options_from_collection_for_select(@hw_profiles, :id, :name, params[:hardware_profile])
- %p
- = form.label :catalog_id, t('catalog_entries.form.catalog')
- = form.select :catalog_id, @catalogs.collect{|c| [c.name, c.id]}
-
- %fieldset.options
- = link_to "#{t'catalog_entries.form.cancel'}", catalogs_path,
:class => 'button danger'
- = submit_tag "#{t'catalog_entries.form.save'}", :name =>
'save', :class => 'button', :id => 'save_button'
+ .lefted.new-catalog-entry-from-image
+ %h2= t('.title')
+ %p= t('.description', :name => @image.name)
+ %fieldset
+ %div
+ = form.label :name, t('catalog_entries.new.hw_profile')
+ = select_tag :hardware_profile,
options_from_collection_for_select(@hw_profiles, :id, :name, params[:hardware_profile])
+ .clear
+ %div
+ = form.label :catalog_id, t('catalog_entries.form.catalog')
+ = form.select :catalog_id, @catalogs.collect{|c| [c.name, c.id]}
+ .clear
+ .centered
+ %fieldset.align-center
+ = 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/images/edit_xml.html.haml
b/src/app/views/images/edit_xml.html.haml
index de500cc..0f4ee68 100644
--- a/src/app/views/images/edit_xml.html.haml
+++ b/src/app/views/images/edit_xml.html.haml
@@ -3,18 +3,19 @@
%h1.images= @name
#obj_actions.button-container
= t :return_to
- = link_to t('images.environment', :environment => @environment.name),
pool_family_path(@environment)
+ = link_to t('images.environment', :environment => @environment.name),
pool_family_path(@environment), :class => 'rounded-link'
-%section.admin-content-section.edit-xml
+%section.admin-content-section
%header
%h2= t('.edit')
- = form_tag(overview_images_path, {:method => :post}) do
- = hidden_field_tag :environment, @environment.id
- = hidden_field_tag :name, @name
- #editor
- %textarea{ :name => :image_xml }<= @xml
+ .content.tight.buildpush
+ = form_tag(overview_images_path, {:method => :post}) do
+ = hidden_field_tag :environment, @environment.id
+ = hidden_field_tag :name, @name
+ = text_area_tag :image_xml, @xml, :class => 'edit_xml'
- .buttons.container
- = link_to t(:cancel), pool_family_path(@environment), :class => 'button
danger'
- = submit_tag t('.save_and_continue'), :class => 'button
primary'
+ .centered
+ %fieldset.align-center
+ = link_to t(:cancel), pool_family_path(@environment), :class => 'button
danger'
+ = submit_tag t('.save_and_continue'), :class => 'button
primary'
diff --git a/src/app/views/images/new.html.haml b/src/app/views/images/new.html.haml
index 434330e..e9ec326 100644
--- a/src/app/views/images/new.html.haml
+++ b/src/app/views/images/new.html.haml
@@ -3,53 +3,57 @@
%h1.images= t('.new_image')
#obj_actions.button-container
= t :return_to
- = link_to t('images.environment', :environment => @environment.name),
pool_family_path(@environment)
+ = link_to t('images.environment', :environment => @environment.name),
pool_family_path(@environment), :class => 'rounded-link'
-%section.admin-content-section.image-upload
- %p.description= t('.description', :environment => @environment.name)
+%section.admin-content-section
+ .content.buildpush
+ .centered
+ %p.description.align-center
+ %strong= t('.description', :environment => @environment.name)
- %nav#image-upload-tabs.faceted
- %ul.tabs
- %li
- %a{ :href => '#image-file-form', :class => 'selected'}=
t('.upload')
- %li
- %a{ :href => '#image-url-form'}= t('.from_url')
+ %nav#image-upload-tabs.faceted
+ %ul.tabs
+ %li
+ %a{ :href => '#image-file-form', :class => 'active'}=
t('.upload')
+ %li
+ %a{ :href => '#image-url-form'}= t('.from_url')
+ .clear
- %section#image-file-form
- = form_tag(edit_xml_images_path, { :multipart => true }) do
- = hidden_field_tag :environment, @environment.id
- %fieldset
- %p
- = label_tag :name, t('.name')
- = text_field_tag :name, @name
- %p
- = label_tag :image_file, t('.choose_file')
- = file_field_tag :image_file
- %p
- = label_tag :edit, t('.edit_file')
- = check_box_tag :edit, 1, true
+ %section#image-file-form
+ = form_tag(edit_xml_images_path, { :multipart => true, :class =>
'generic' }) do
+ = hidden_field_tag :environment, @environment.id
+ %fieldset
+ %p
+ = label_tag :name, t('.name')
+ = text_field_tag :name, @name
+ %p
+ = label_tag :image_file, t('.choose_file')
+ = file_field_tag :image_file
+ %p
+ = label_tag :edit, t('.edit_file')
+ = check_box_tag :edit, 1, true
- .buttons.container
- = link_to t(:cancel), pool_family_path(@environment), :class => "button
danger"
- = submit_tag t(:continue), :id => "file_button", :class =>
"button primary"
+ %fieldset.align-center
+ = link_to t(:cancel), pool_family_path(@environment), :class =>
"button danger"
+ = submit_tag t(:continue), :id => "file_button", :class =>
"button primary"
- %section#image-url-form
- = form_tag(edit_xml_images_path, { :multipart => true }) do
- = hidden_field_tag :environment, @environment.id
- %fieldset
- %p
- = label_tag :name, t('.name')
- = text_field_tag :name, @name
- %p
- = label_tag :image_url, t('.image_url')
- = text_field_tag :image_url, params[:image_url]
- %p
- = label_tag :edit, t('.edit_file')
- = check_box_tag :edit, 1, true
+ %section#image-url-form
+ = form_tag(edit_xml_images_path, { :multipart => true, :class =>
'generic' }) do
+ = hidden_field_tag :environment, @environment.id
+ %fieldset
+ %p
+ = label_tag :name, t('.name')
+ = text_field_tag :name, @name
+ %p
+ = label_tag :image_url, t('.image_url')
+ = text_field_tag :image_url, params[:image_url]
+ %p
+ = label_tag :edit, t('.edit_file')
+ = check_box_tag :edit, 1, true
- .buttons.container
- = link_to t(:cancel), pool_family_path(@environment), :class => "button
danger"
- = submit_tag t(:continue), :id => "url_button", :class =>
"button primary"
+ %fieldset.align-center
+ = link_to t(:cancel), pool_family_path(@environment), :class =>
"button danger"
+ = submit_tag t(:continue), :id => "url_button", :class =>
"button primary"
:javascript
(function() {
@@ -62,14 +66,14 @@
$('#image-upload-tabs a').each(function() {
var $tab = $(this);
var $form = linkedForm($tab);
- $form.toggle($tab.hasClass('selected'));
+ $form.toggle($tab.hasClass('active'));
})
}
refreshTabs();
Conductor.nicelyHookAjaxClick($('#image-upload-tabs a'), function() {
- $('#image-upload-tabs a.selected').removeClass('selected')
- $(this).addClass('selected')
+ $('#image-upload-tabs a.active').removeClass('active')
+ $(this).addClass('active')
refreshTabs()
})
})()
diff --git a/src/app/views/images/overview.html.haml
b/src/app/views/images/overview.html.haml
index edb52a2..bf920c3 100644
--- a/src/app/views/images/overview.html.haml
+++ b/src/app/views/images/overview.html.haml
@@ -3,23 +3,23 @@
%h1.images= @name
#obj_actions.button-container
= t :return_to
- = link_to t('images.environment', :environment => @environment.name),
pool_family_path(@environment)
-
-%section.admin-content-section.image-upload-overview
- .overview
- %header
- %h2= t('.valid_image')
-
- %p.description= t('.description', :name => @name)
+ = link_to t('images.environment', :environment => @environment.name),
pool_family_path(@environment), :class => 'rounded-link'
+%section.admin-content-section
+ .content.buildpush
= form_tag(images_path, {:method => :post}) do
= hidden_field_tag :environment, @environment.id
= hidden_field_tag :name, @name
%input{ :type => :hidden, :name => :image_xml, :value => @xml}
- = check_box_tag :make_deployable, 1, true
- = label_tag :make_deployable, t('.make_deployable', :name => @name)
+ .lefted.image-upload-overview
+ %h2= t('.valid_image')
+ %p.description= t('.description', :name => @name)
- .buttons.container
+ %fieldset.align-center
+ = check_box_tag :make_deployable, 1, true
+ = label_tag :make_deployable, t('.make_deployable', :name => @name)
+ .centered
+ %fieldset.align-center
= submit_tag t('.back'), :name => 'back', :id =>
'back_button', :class => 'button'
= submit_tag t('.save_template'), :name => 'save', :id =>
'save_button', :class => 'button primary'
diff --git a/src/app/views/users/new.html.haml b/src/app/views/users/new.html.haml
index e6e914d..bda4e93 100644
--- a/src/app/views/users/new.html.haml
+++ b/src/app/views/users/new.html.haml
@@ -8,10 +8,8 @@
%section.admin-content-section.users
.content
.align-center
- %p
+ %p.description
%strong=t'users.new.neccessary_information'
- %br
- %br
#user_card.user_form_card
%header.user-card-header
%h2
--
1.7.7.3