Description:
beautify user edit
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
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' |
@@ -5,7 +5,7 | |||||
|
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} |
|
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 |
@@ -3,7 +3,9 | |||||
|
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 |
deleted file |
You need to be logged in to leave comments.
Login now