NACK. Please rebase and fix this against the current HEAD. Someone else changed the markup of the Edit User page and I would probably mess it up if I tried to fix it.
Thomas ----- Original Message ----- From: "Jakub Steiner" <[email protected]> To: [email protected] Sent: Monday, September 27, 2010 3:42:43 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [deltacloud-devel] [PATCH] layout for the user page. decided not to do the modal dialog for edit user as the navbar is in place when logged in. --- src/app/stylesheets/aggregator.scss | 74 ++++++++++++++++++++--------------- src/app/views/users/_form.haml | 37 +++++++++-------- src/app/views/users/edit.haml | 15 +++---- src/app/views/users/show.haml | 50 +++++++++++++----------- 4 files changed, 95 insertions(+), 81 deletions(-) diff --git a/src/app/stylesheets/aggregator.scss b/src/app/stylesheets/aggregator.scss index 1abab1e..a130375 100644 --- a/src/app/stylesheets/aggregator.scss +++ b/src/app/stylesheets/aggregator.scss @@ -95,6 +95,14 @@ input[type='submit'],button,.button { margin-left: 3px; margin: 40px 4px 4px; } + &.formbutton { + display: inline-block; + margin-left: 3px; + margin: 40px 4px 4px; + } + &.actionlink { + margin: 40px 0 0; + } &.disabled { cursor: default; background: transparent; @@ -503,7 +511,7 @@ li.operation>ul, li.administration>ul, li.build>ul, li.runtime>ul { .modalbox { margin: 150px auto; @include box-shadow(0,1px,5px,rgba(0, 0, 0, 0.6)); - width: 500px; + width: 550px; overflow: hidden; h2 { background-color: $formheadbg; @@ -531,45 +539,47 @@ li.operation>ul, li.administration>ul, li.build>ul, li.runtime>ul { /* FORMS */ +label { + display: inline-block; + font-weight: bold; +} + /* simple two column label + input pairs */ -.dcloud_form { - fieldset { - overflow: hidden; - margin: 10px 0 0; - text-align: right; - label { - display: inline-block; - font-weight: bold; - padding: 4px 10px 0 0; - max-width: 10em; - } +fieldset { + overflow: hidden; + margin: 10px 0 0; + text-align: right; + label { + padding: 4px 10px 0 0; + max-width: 10em; + } + input { + display: inline-block; + width: 20em; + } + .fieldWithErrors { + display: inline-block; + border: 0; margin: 0; padding: 0; input { - display: inline-block; - width: 20em; + background-color: lighten($errorcl, 45%); + color: $errorcl; } - .fieldWithErrors { - display: inline-block; - border: 0; margin: 0; padding: 0; - input { - background-color: lighten($errorcl, 45%); - color: $errorcl; - } - label { - color: $errorcl; - } + label { + color: $errorcl; } } - .indented { - margin: 10px 0 0; - text-align: right; - input[type="text"],label,a,div,p { - text-align: left; - display: inline-block; - width: 20em; - } +} +.indented { + margin: 10px 0 0; + text-align: right; + input[type="text"],label,a,div,p { + text-align: left; + display: inline-block; + width: 20em; } } + /* WIZARD TILES */ ul.tiles { diff --git a/src/app/views/users/_form.haml b/src/app/views/users/_form.haml index 8311c16..f69fc22 100644 --- a/src/app/views/users/_form.haml +++ b/src/app/views/users/_form.haml @@ -1,18 +1,19 @@ -%fieldset - = form.label :login, "Choose a username:" - = form.text_field :login -%fieldset - = form.label :password, form.object.new_record? ? "Choose a password:" : "Change password:" - = form.password_field :password -%fieldset - = form.label :password_confirmation, "Confirm password:" - = form.password_field :password_confirmation -%fieldset - = form.label :first_name - = form.text_field :first_name -%fieldset - = form.label :last_name - = form.text_field :last_name -%fieldset - = form.label :email - = form.text_field :email +%section.wrap + %fieldset.grid_8 + = form.label :login, "Choose a username:" + = form.text_field :login + %fieldset.grid_8.clear + = form.label :password, form.object.new_record? ? "Choose a password:" : "Change password:" + = form.password_field :password + %fieldset.grid_8.clear + = form.label :password_confirmation, "Confirm password:" + = form.password_field :password_confirmation + %fieldset.grid_8.clear + = form.label :first_name + = form.text_field :first_name + %fieldset.grid_8.clear + = form.label :last_name + = form.text_field :last_name + %fieldset.grid_8.clear + = form.label :email + = form.text_field :email diff --git a/src/app/views/users/edit.haml b/src/app/views/users/edit.haml index e4a1ac7..06d9e7c 100644 --- a/src/app/views/users/edit.haml +++ b/src/app/views/users/edit.haml @@ -1,8 +1,7 @@ -.formwindow - %h2 Edit an Account - - form_for @user, :url => account_path, :html => {:id => "login"} do |f| - = f.error_messages - = render :partial => "form", :object => f - = f.submit "Make Changes", :class => "formbutton" - %br/ - = link_to "Cancel", account_path, :class => "formbuton" +%h2 Edit an Account +- form_for @user, :url => account_path, :html => {:id => "login"} do |f| + = f.error_messages + = render :partial => "form", :object => f + %div.clear + = link_to "Cancel", account_path, :class => "formbutton button" + = f.submit "Make Changes", :class => "formbutton button" diff --git a/src/app/views/users/show.haml b/src/app/views/users/show.haml index 6afa2cd..fd7254f 100644 --- a/src/app/views/users/show.haml +++ b/src/app/views/users/show.haml @@ -1,25 +1,29 @@ -.dcloud_form +.dcloud_form.grid_16 %h2 User Profile for #{h @user.login} - %p - %b Username: - = h @user.login - %p - %b Login count: - = h @user.login_count - %p - %b Last request at: - = h @user.last_request_at - %p - %b Last login at: - = h @user.last_login_at - %p - %b Current login at: - = h @user.current_login_at - %p - %b Last login ip: - = h @user.last_login_ip - %p - %b Current login ip: - = h @user.current_login_ip - = link_to 'Edit', edit_account_path, :class => 'actionlink' + %ul.block + %li.block.grid_3.alpha + %label Username: + %li.block.grid_5 + = h @user.login + %li.block.grid_3 + %label Login Count: + %li.block.grid_5.omega + = h @user.login_count + %li.block.grid_3.alpha.clear + %label Last Request at: + %li.block.grid_5 + = h @user.last_request_at + %li.block.grid_3 + %label Current Login at: + %li.block.grid_5.omega + = h @user.current_login_at + %li.block.grid_3.alpha.clear + %label Last Login IP: + %li.block.grid_5 + = h @user.last_login_ip + %li.block.grid_3 + %label Current Login IP: + %li.block.grid_5.omega + = h @user.current_login_ip + = link_to 'Edit', edit_account_path, :class => 'actionlink button' -- 1.7.2.3 _______________________________________________ deltacloud-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/deltacloud-devel _______________________________________________ deltacloud-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/deltacloud-devel
