From: Jozef Zigmund jzigmund@redhat.com
--- src/app/stylesheets/custom.scss | 11 +++++++++++ src/app/views/users/_form.haml | 28 +++++++++++++++++++++++----- src/app/views/users/edit.haml | 7 ++++--- src/app/views/users/new.haml | 7 ++++--- 4 files changed, 42 insertions(+), 11 deletions(-)
diff --git a/src/app/stylesheets/custom.scss b/src/app/stylesheets/custom.scss index d019798..967137b 100644 --- a/src/app/stylesheets/custom.scss +++ b/src/app/stylesheets/custom.scss @@ -47,3 +47,14 @@ ul.deployment-array.small li.deployment { height: 90px; } + +div#user_card header.user-card-header h2#first_name { + color: white; + padding: 15px 10px 10px 60px; + background: transparent url('../../images/user_card_icon.png') no-repeat 12px 10px; +} + +div#user_card header.user-card-header h2#first_name + h2#last_name { + padding: 0px; + background: transparent; +} \ No newline at end of file diff --git a/src/app/views/users/_form.haml b/src/app/views/users/_form.haml index 43f49f8..0289025 100644 --- a/src/app/views/users/_form.haml +++ b/src/app/views/users/_form.haml @@ -1,20 +1,20 @@ - if @user.errors.any? = render 'layouts/error_messages', :object => @user
-%fieldset +%fieldset.kokot %p = form.label :first_name, t(:first_name) - = form.text_field :first_name + = form.text_field :first_name, :class =>"check_change" %p = form.label :last_name, t(:last_name) - = form.text_field :last_name + = form.text_field :last_name, :class =>"check_change" %p = form.label :email, t(:email) - = form.text_field :email + = form.text_field :email, :class =>"check_change" %fieldset %p = form.label :login, t(:choose_name) - = form.text_field :login, :class => "em" + = form.text_field :login, :class => "em check_change" %p = form.label :password, form.object.new_record? ? t(:choose_password) : t(:change_password) = form.password_field :password @@ -48,3 +48,21 @@
%fieldset.options = form.submit "Save User", :class => "submit button pill" + +:javascript + $('.check_change').change(function(){ + switch(this.id){ + case 'user_last_name': + $('h2#last_name').text(this.value); + break; + case 'user_first_name': + $('h2#first_name').text(this.value); + break; + case 'user_email': + $('dd#email').text(this.value); + break; + case 'user_login': + $('dd#login').text(this.value); + break; + } + }); diff --git a/src/app/views/users/edit.haml b/src/app/views/users/edit.haml index ddbb891..aebcfd7 100644 --- a/src/app/views/users/edit.haml +++ b/src/app/views/users/edit.haml @@ -12,12 +12,13 @@ .content #user_card.user_form_card %header.user-card-header - %h2= @user.name + %h2#first_name= @user.first_name + %h2#last_name= @user.last_name .user-card-content %dl %dt E-mail Address - %dd= @user.email + %dd#email= @user.email %dt Username - %dd= @user.login + %dd#login= @user.login = form_for @user, :url => user_path(@user), :html => { :method => :put, :class => 'generic' } do |f| = render :partial => "form", :locals => { :form => f, :cancel_path => users_path } diff --git a/src/app/views/users/new.haml b/src/app/views/users/new.haml index d5d76d9..ca41a1b 100644 --- a/src/app/views/users/new.haml +++ b/src/app/views/users/new.haml @@ -14,13 +14,14 @@ %br #user_card.user_form_card %header.user-card-header - %h2 Kenneth Keiter + %h2 Kenneth + %h2#last_name Keiter .user-card-content %dl %dt E-mail Address - %dd kkeiter@redhat.com + %dd#email kkeiter@redhat.com %dt Username - %dd kkeiter + %dd#login kkeiter = form_for @user, :url => users_path, :html => {:class => 'generic'} do |f| -if current_user = render :partial => "form", :locals => { :form => f }
On Friday 30 of September 2011 14:10:43 jzigmund@redhat.com wrote:
From: Jozef Zigmund jzigmund@redhat.com
src/app/stylesheets/custom.scss | 11 +++++++++++ src/app/views/users/_form.haml | 28 +++++++++++++++++++++++----- src/app/views/users/edit.haml | 7 ++++--- src/app/views/users/new.haml | 7 ++++--- 4 files changed, 42 insertions(+), 11 deletions(-)
diff --git a/src/app/stylesheets/custom.scss b/src/app/stylesheets/custom.scss index d019798..967137b 100644 --- a/src/app/stylesheets/custom.scss +++ b/src/app/stylesheets/custom.scss @@ -47,3 +47,14 @@ ul.deployment-array.small li.deployment { height: 90px; }
+div#user_card header.user-card-header h2#first_name {
- color: white;
- padding: 15px 10px 10px 60px;
- background: transparent url('../../images/user_card_icon.png')
no-repeat 12px 10px; +}
+div#user_card header.user-card-header h2#first_name + h2#last_name {
- padding: 0px;
- background: transparent;
+} \ No newline at end of file diff --git a/src/app/views/users/_form.haml b/src/app/views/users/_form.haml index 43f49f8..0289025 100644 --- a/src/app/views/users/_form.haml +++ b/src/app/views/users/_form.haml @@ -1,20 +1,20 @@
- if @user.errors.any? = render 'layouts/error_messages', :object => @user
-%fieldset +%fieldset.kokot
Really?
%p = form.label :first_name, t(:first_name)
- = form.text_field :first_name
- = form.text_field :first_name, :class =>"check_change" %p = form.label :last_name, t(:last_name)
- = form.text_field :last_name
- = form.text_field :last_name, :class =>"check_change" %p = form.label :email, t(:email)
- = form.text_field :email
- = form.text_field :email, :class =>"check_change"
%fieldset %p = form.label :login, t(:choose_name)
- = form.text_field :login, :class => "em"
- = form.text_field :login, :class => "em check_change" %p = form.label :password, form.object.new_record? ? t(:choose_password)
: t(:change_password) = form.password_field :password @@ -48,3 +48,21 @@
%fieldset.options = form.submit "Save User", :class => "submit button pill"
+:javascript
- $('.check_change').change(function(){
- switch(this.id){
case 'user_last_name':
$('h2#last_name').text(this.value);
break;
case 'user_first_name':
$('h2#first_name').text(this.value);
break;
case 'user_email':
$('dd#email').text(this.value);
break;
case 'user_login':
$('dd#login').text(this.value);
break;
- }
- });
diff --git a/src/app/views/users/edit.haml b/src/app/views/users/edit.haml index ddbb891..aebcfd7 100644 --- a/src/app/views/users/edit.haml +++ b/src/app/views/users/edit.haml @@ -12,12 +12,13 @@ .content #user_card.user_form_card %header.user-card-header
%h2= @user.name
%h2#first_name= @user.first_name
%h2#last_name= @user.last_name .user-card-content %dl %dt E-mail Address
%dd= @user.email
%dd#email= @user.email %dt Username
%dd= @user.login
= form_for @user, :url => user_path(@user), :html => { :method =>%dd#login= @user.login
:put, :class => 'generic' } do |f| = render :partial => "form", :locals => { :form => f, :cancel_path => users_path } diff --git a/src/app/views/users/new.haml b/src/app/views/users/new.haml index d5d76d9..ca41a1b 100644 --- a/src/app/views/users/new.haml +++ b/src/app/views/users/new.haml @@ -14,13 +14,14 @@ %br #user_card.user_form_card %header.user-card-header
%h2 Kenneth Keiter
%h2 Kenneth
%h2#last_name Keiter .user-card-content %dl %dt E-mail Address
%dd kkeiter@redhat.com
%dd#email kkeiter@redhat.com %dt Username
%dd kkeiter
= form_for @user, :url => users_path, :html => {:class => 'generic'}%dd#login kkeiter
do |f| -if current_user = render :partial => "form", :locals => { :form => f }
In new action first name is hardcoded in user card.
On 10/03/2011 03:43 PM, Tomas Hrcka wrote:
On Friday 30 of September 2011 14:10:43 jzigmund@redhat.com wrote:
From: Jozef Zigmundjzigmund@redhat.com
src/app/stylesheets/custom.scss | 11 +++++++++++ src/app/views/users/_form.haml | 28 +++++++++++++++++++++++----- src/app/views/users/edit.haml | 7 ++++--- src/app/views/users/new.haml | 7 ++++--- 4 files changed, 42 insertions(+), 11 deletions(-)
diff --git a/src/app/stylesheets/custom.scss b/src/app/stylesheets/custom.scss index d019798..967137b 100644 --- a/src/app/stylesheets/custom.scss +++ b/src/app/stylesheets/custom.scss @@ -47,3 +47,14 @@ ul.deployment-array.small li.deployment { height: 90px; }
+div#user_card header.user-card-header h2#first_name {
- color: white;
- padding: 15px 10px 10px 60px;
- background: transparent url('../../images/user_card_icon.png')
no-repeat 12px 10px; +}
+div#user_card header.user-card-header h2#first_name + h2#last_name {
- padding: 0px;
- background: transparent;
+} \ No newline at end of file diff --git a/src/app/views/users/_form.haml b/src/app/views/users/_form.haml index 43f49f8..0289025 100644 --- a/src/app/views/users/_form.haml +++ b/src/app/views/users/_form.haml @@ -1,20 +1,20 @@
- if @user.errors.any? = render 'layouts/error_messages', :object => @user
-%fieldset +%fieldset.kokot
Really?
%p = form.label :first_name, t(:first_name)
- = form.text_field :first_name
- = form.text_field :first_name, :class =>"check_change" %p = form.label :last_name, t(:last_name)
- = form.text_field :last_name
- = form.text_field :last_name, :class =>"check_change" %p = form.label :email, t(:email)
- = form.text_field :email
- = form.text_field :email, :class =>"check_change" %fieldset %p = form.label :login, t(:choose_name)
- = form.text_field :login, :class => "em"
- = form.text_field :login, :class => "em check_change" %p = form.label :password, form.object.new_record? ? t(:choose_password)
: t(:change_password) = form.password_field :password @@ -48,3 +48,21 @@
%fieldset.options = form.submit "Save User", :class => "submit button pill"
+:javascript
- $('.check_change').change(function(){
- switch(this.id){
case 'user_last_name':
$('h2#last_name').text(this.value);
break;
case 'user_first_name':
$('h2#first_name').text(this.value);
break;
case 'user_email':
$('dd#email').text(this.value);
break;
case 'user_login':
$('dd#login').text(this.value);
break;
- }
- });
diff --git a/src/app/views/users/edit.haml b/src/app/views/users/edit.haml index ddbb891..aebcfd7 100644 --- a/src/app/views/users/edit.haml +++ b/src/app/views/users/edit.haml @@ -12,12 +12,13 @@ .content #user_card.user_form_card %header.user-card-header
%h2= @user.name
%h2#first_name= @user.first_name
%h2#last_name= @user.last_name .user-card-content %dl %dt E-mail Address
%dd= @user.email
%dd#email= @user.email %dt Username
%dd= @user.login
%dd#login= @user.login = form_for @user, :url => user_path(@user), :html => { :method =>
:put, :class => 'generic' } do |f| = render :partial => "form", :locals => { :form => f, :cancel_path => users_path } diff --git a/src/app/views/users/new.haml b/src/app/views/users/new.haml index d5d76d9..ca41a1b 100644 --- a/src/app/views/users/new.haml +++ b/src/app/views/users/new.haml @@ -14,13 +14,14 @@ %br #user_card.user_form_card %header.user-card-header
%h2 Kenneth Keiter
%h2 Kenneth
%h2#last_name Keiter .user-card-content %dl %dt E-mail Address
%dd kkeiter@redhat.com
%dd#email kkeiter@redhat.com %dt Username
%dd kkeiter
%dd#login kkeiter
We should use some "less personal" example contact instead of Ken's name/mail.
= form_for @user, :url => users_path, :html => {:class => 'generic'}
do |f| -if current_user = render :partial => "form", :locals => { :form => f }
In new action first name is hardcoded in user card.
On Monday 03 of October 2011 15:55:56 Jan Provaznik wrote:
On 10/03/2011 03:43 PM, Tomas Hrcka wrote:
On Friday 30 of September 2011 14:10:43 jzigmund@redhat.com wrote:
From: Jozef Zigmundjzigmund@redhat.com
src/app/stylesheets/custom.scss | 11 +++++++++++ src/app/views/users/_form.haml | 28 +++++++++++++++++++++++----- src/app/views/users/edit.haml | 7 ++++--- src/app/views/users/new.haml | 7 ++++--- 4 files changed, 42 insertions(+), 11 deletions(-)
diff --git a/src/app/stylesheets/custom.scss b/src/app/stylesheets/custom.scss index d019798..967137b 100644 --- a/src/app/stylesheets/custom.scss +++ b/src/app/stylesheets/custom.scss @@ -47,3 +47,14 @@
ul.deployment-array.small li.deployment {
height: 90px;
}
+div#user_card header.user-card-header h2#first_name {
- color: white;
- padding: 15px 10px 10px 60px;
- background: transparent url('../../images/user_card_icon.png')
no-repeat 12px 10px; +}
+div#user_card header.user-card-header h2#first_name + h2#last_name {
- padding: 0px;
- background: transparent;
+} \ No newline at end of file diff --git a/src/app/views/users/_form.haml b/src/app/views/users/_form.haml index 43f49f8..0289025 100644 --- a/src/app/views/users/_form.haml +++ b/src/app/views/users/_form.haml @@ -1,20 +1,20 @@
if @user.errors.any?
= render 'layouts/error_messages', :object => @user
-%fieldset +%fieldset.kokot
Really?
%p = form.label :first_name, t(:first_name)
- = form.text_field :first_name
= form.text_field :first_name, :class =>"check_change"
%p
= form.label :last_name, t(:last_name)
- = form.text_field :last_name
= form.text_field :last_name, :class =>"check_change"
%p
= form.label :email, t(:email)
- = form.text_field :email
= form.text_field :email, :class =>"check_change"
%fieldset
%p
= form.label :login, t(:choose_name)
- = form.text_field :login, :class => "em"
= form.text_field :login, :class => "em check_change"
%p
= form.label :password, form.object.new_record? ? t(:choose_password)
: : t(:change_password) = form.password_field :password
@@ -48,3 +48,21 @@
%fieldset.options
= form.submit "Save User", :class => "submit button pill"
+:javascript
- $('.check_change').change(function(){
- switch(this.id){
case 'user_last_name':
$('h2#last_name').text(this.value);
break;
case 'user_first_name':
$('h2#first_name').text(this.value);
break;
case 'user_email':
$('dd#email').text(this.value);
break;
case 'user_login':
$('dd#login').text(this.value);
break;
- }
- });
diff --git a/src/app/views/users/edit.haml b/src/app/views/users/edit.haml index ddbb891..aebcfd7 100644 --- a/src/app/views/users/edit.haml +++ b/src/app/views/users/edit.haml @@ -12,12 +12,13 @@
.content #user_card.user_form_card %header.user-card-header
%h2= @user.name
%h2#first_name= @user.first_name
%h2#last_name= @user.last_name .user-card-content %dl %dt E-mail Address
%dd= @user.email
%dd#email= @user.email %dt Username
%dd= @user.login
%dd#login= @user.login = form_for @user, :url => user_path(@user), :html => { :method =>
: :put, :class => 'generic' } do |f| = render :partial => "form", ::locals =>
{ :form => f, :cancel_path => users_path } diff --git a/src/app/views/users/new.haml b/src/app/views/users/new.haml index d5d76d9..ca41a1b 100644 --- a/src/app/views/users/new.haml +++ b/src/app/views/users/new.haml @@ -14,13 +14,14 @@
%br #user_card.user_form_card %header.user-card-header
%h2 Kenneth Keiter
%h2 Kenneth
%h2#last_name Keiter .user-card-content %dl %dt E-mail Address
%dd kkeiter@redhat.com
%dd#email kkeiter@redhat.com %dt Username
%dd kkeiter
%dd#login kkeiter
We should use some "less personal" example contact instead of Ken's name/mail.
= form_for @user, :url => users_path, :html => {:class => 'generic'}
do |f| -if current_user
= render :partial => "form", :locals => { :form => f }
In new action first name is hardcoded in user card.
And the user card on NEW action should be empty.
On Monday 03 October 2011 15:59:07 Tomas Hrcka wrote:
On Monday 03 of October 2011 15:55:56 Jan Provaznik wrote:
On 10/03/2011 03:43 PM, Tomas Hrcka wrote:
On Friday 30 of September 2011 14:10:43 jzigmund@redhat.com wrote:
From: Jozef Zigmundjzigmund@redhat.com
src/app/stylesheets/custom.scss | 11 +++++++++++ src/app/views/users/_form.haml | 28 +++++++++++++++++++++++----- src/app/views/users/edit.haml | 7 ++++--- src/app/views/users/new.haml | 7 ++++--- 4 files changed, 42 insertions(+), 11 deletions(-)
diff --git a/src/app/stylesheets/custom.scss b/src/app/stylesheets/custom.scss index d019798..967137b 100644 --- a/src/app/stylesheets/custom.scss +++ b/src/app/stylesheets/custom.scss @@ -47,3 +47,14 @@
ul.deployment-array.small li.deployment {
height: 90px;
}
+div#user_card header.user-card-header h2#first_name {
- color: white;
- padding: 15px 10px 10px 60px;
- background: transparent url('../../images/user_card_icon.png')
no-repeat 12px 10px; +}
+div#user_card header.user-card-header h2#first_name + h2#last_name {
- padding: 0px;
- background: transparent;
+} \ No newline at end of file diff --git a/src/app/views/users/_form.haml b/src/app/views/users/_form.haml index 43f49f8..0289025 100644 --- a/src/app/views/users/_form.haml +++ b/src/app/views/users/_form.haml @@ -1,20 +1,20 @@
if @user.errors.any?
= render 'layouts/error_messages', :object => @user
-%fieldset +%fieldset.kokot
Really?
%p = form.label :first_name, t(:first_name)
- = form.text_field :first_name
= form.text_field :first_name, :class =>"check_change"
%p
= form.label :last_name, t(:last_name)
- = form.text_field :last_name
= form.text_field :last_name, :class =>"check_change"
%p
= form.label :email, t(:email)
- = form.text_field :email
= form.text_field :email, :class =>"check_change"
%fieldset
%p
= form.label :login, t(:choose_name)
- = form.text_field :login, :class => "em"
= form.text_field :login, :class => "em check_change"
%p
= form.label :password, form.object.new_record? ? t(:choose_password)
: : t(:change_password) = form.password_field :password
@@ -48,3 +48,21 @@
%fieldset.options
= form.submit "Save User", :class => "submit button pill"
+:javascript
- $('.check_change').change(function(){
- switch(this.id){
case 'user_last_name':
$('h2#last_name').text(this.value);
break;
case 'user_first_name':
$('h2#first_name').text(this.value);
break;
case 'user_email':
$('dd#email').text(this.value);
break;
case 'user_login':
$('dd#login').text(this.value);
break;
- }
- });
diff --git a/src/app/views/users/edit.haml b/src/app/views/users/edit.haml index ddbb891..aebcfd7 100644 --- a/src/app/views/users/edit.haml +++ b/src/app/views/users/edit.haml @@ -12,12 +12,13 @@
.content #user_card.user_form_card %header.user-card-header
%h2= @user.name
%h2#first_name= @user.first_name
%h2#last_name= @user.last_name .user-card-content %dl %dt E-mail Address
%dd= @user.email
%dd#email= @user.email %dt Username
%dd= @user.login
%dd#login= @user.login = form_for @user, :url => user_path(@user), :html => { :method =>
: :put, :class => 'generic' } do |f| = render :partial => "form", : ::locals =>
{ :form => f, :cancel_path => users_path } diff --git a/src/app/views/users/new.haml b/src/app/views/users/new.haml index d5d76d9..ca41a1b 100644 --- a/src/app/views/users/new.haml +++ b/src/app/views/users/new.haml @@ -14,13 +14,14 @@
%br #user_card.user_form_card %header.user-card-header
%h2 Kenneth Keiter
%h2 Kenneth
%h2#last_name Keiter .user-card-content %dl %dt E-mail Address
%dd kkeiter@redhat.com
%dd#email kkeiter@redhat.com %dt Username
%dd kkeiter
%dd#login kkeiter
We should use some "less personal" example contact instead of Ken's name/mail.
= form_for @user, :url => users_path, :html => {:class => 'generic'}
do |f| -if current_user
= render :partial => "form", :locals => { :form => f }
In new action first name is hardcoded in user card.
And the user card on NEW action should be empty.
I've sent the new revision of this patch, but I forgot set in-reply-to id.
aeolus-devel@lists.fedorahosted.org