Description:
beautify user edit
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r674:35025e5d85ac - - 4 files changed: 18 inserted, 12 deleted

@@ -0,0 +1,14
1 + %h1 User information
2 + - for column in User.content_columns
3 + %p
4 + %b
5 + = column.human_name
6 + \:
7 + = h @user.send(column.name)
8 + %p
9 + %strong Group
10 + \:
11 + = @user.groups.map{ |x| link_to(x.name,group_path(x)).html_safe}.join(', ').html_safe
12 + = link_to 'Edit', :action => 'edit', :id => @user
13 + |
14 + = link_to 'Back', :action => 'index'
@@ -2,13 +2,13
2 / [form:user]
2 / [form:user]
3 .form-group
3 .form-group
4 %label.col-md-2.control-label{for: :login} Login
4 %label.col-md-2.control-label{for: :login} Login
5 .col-md-4
5 .col-md-4
6 = text_field 'user', 'login', class: 'form-control'
6 = text_field 'user', 'login', class: 'form-control'
7 .form-group
7 .form-group
8 - %label.col-md-2.control-label{for: :full_name} Login
8 + %label.col-md-2.control-label{for: :full_name} Full name
9 .col-md-4
9 .col-md-4
10 = text_field 'user', 'full_name', class: 'form-control'
10 = text_field 'user', 'full_name', class: 'form-control'
11 .form-group
11 .form-group
12 %label.col-md-2.control-label{for: :password} Password
12 %label.col-md-2.control-label{for: :password} Password
13 .col-md-4
13 .col-md-4
14 = password_field 'user', 'password', class: 'form-control'
14 = password_field 'user', 'password', class: 'form-control'
@@ -1,11 +1,13
1 %h1 Editing user
1 %h1 Editing user
2
2
3 = form_tag( {:action => 'update', :id => @user}, {class: 'form-horizontal'}) do
3 = form_tag( {:action => 'update', :id => @user}, {class: 'form-horizontal'}) do
4 = error_messages_for 'user'
4 = error_messages_for 'user'
5 = render partial: "form"
5 = render partial: "form"
6 - = submit_tag "Edit", class: 'btn btn-primary'
6 + .form-group
7 + .col-md-offset-2.col-md-4
8 + = submit_tag "Edit", class: 'btn btn-primary'
7
9
8
10
9 = link_to 'Show', :action => 'show', :id => @user
11 = link_to 'Show', :action => 'show', :id => @user
10 |
12 |
11 = link_to 'Back', :action => 'list'
13 = link_to 'Back', :action => 'list'
deleted file
You need to be logged in to leave comments. Login now