Description:
user_admin
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r673:99c14e332823 - - 7 files changed: 84 inserted, 74 deleted
@@ -0,0 +1,31 | |||
|
1 | + = error_messages_for 'user' | |
|
2 | + / [form:user] | |
|
3 | + .form-group | |
|
4 | + %label.col-md-2.control-label{for: :login} Login | |
|
5 | + .col-md-4 | |
|
6 | + = text_field 'user', 'login', class: 'form-control' | |
|
7 | + .form-group | |
|
8 | + %label.col-md-2.control-label{for: :full_name} Login | |
|
9 | + .col-md-4 | |
|
10 | + = text_field 'user', 'full_name', class: 'form-control' | |
|
11 | + .form-group | |
|
12 | + %label.col-md-2.control-label{for: :password} Password | |
|
13 | + .col-md-4 | |
|
14 | + = password_field 'user', 'password', class: 'form-control' | |
|
15 | + .form-group | |
|
16 | + %label.col-md-2.control-label{for: :password_confirmation} Password (confirm) | |
|
17 | + .col-md-4 | |
|
18 | + = password_field 'user', 'password_confirmation', class: 'form-control' | |
|
19 | + .form-group | |
|
20 | + %label.col-md-2.control-label{for: :email} E-mail | |
|
21 | + .col-md-4 | |
|
22 | + = email_field 'user', 'email', class: 'form-control' | |
|
23 | + .form-group | |
|
24 | + %label.col-md-2.control-label{for: :alias} Alias | |
|
25 | + .col-md-4 | |
|
26 | + = text_field 'user', 'alias', class: 'form-control' | |
|
27 | + .form-group | |
|
28 | + %label.col-md-2.control-label{for: :remark} Remark | |
|
29 | + .col-md-4 | |
|
30 | + = text_field 'user', 'remark', class: 'form-control' | |
|
31 | + / [eoform:user] |
@@ -9,15 +9,13 | |||
|
9 | 9 | %th Description |
|
10 | 10 | %th |
|
11 | 11 | %th |
|
12 | - %th | |
|
13 | 12 | |
|
14 | 13 | %tbody |
|
15 | 14 | - @groups.each do |group| |
|
16 | 15 | %tr |
|
17 | 16 | %td= group.name |
|
18 | 17 | %td= group.description |
|
19 |
- %td= link_to ' |
|
|
20 | - %td= link_to 'Edit', edit_group_path(group), class: 'btn btn-default' | |
|
18 | + %td= link_to 'View', group, class: 'btn btn-default' | |
|
21 | 19 | %td= link_to 'Destroy', group, :method => :delete, :data => { :confirm => 'Are you sure?' }, class: 'btn btn-danger' |
|
22 | 20 | |
|
23 | 21 | %br |
@@ -1,5 +1,3 | |||
|
1 | - %p#notice= notice | |
|
2 | - | |
|
3 | 1 |
|
|
4 | 2 | %b Name: |
|
5 | 3 | = @group.name |
@@ -13,55 +11,62 | |||
|
13 | 11 | = link_to 'Back', groups_path |
|
14 | 12 | |
|
15 | 13 | .row |
|
14 | + %h1 Group details | |
|
15 | + .row | |
|
16 | 16 | .col-md-6 |
|
17 | - %h1 Users in this group | |
|
18 | - | |
|
19 | - =form_tag add_user_group_path(@group), class: 'form-inline' do | |
|
20 | - .form-group | |
|
21 | - =label_tag :user_id, "User" | |
|
22 | - =select_tag :user_id, options_from_collection_for_select(User.all,'id','full_name'), class: 'select2' | |
|
23 | - =submit_tag "Add",class: 'btn btn-primary' | |
|
17 | + .panel.panel-default | |
|
18 | + .panel-heading | |
|
19 | + .panel-title Users in this group | |
|
20 | + .panel-body | |
|
21 | + =form_tag add_user_group_path(@group), class: 'form-inline' do | |
|
22 | + .form-group | |
|
23 | + =label_tag :user_id, "User" | |
|
24 | + =select_tag :user_id, options_from_collection_for_select(User.all,'id','full_name'), class: 'select2' | |
|
25 | + =submit_tag "Add",class: 'btn btn-primary' | |
|
24 | 26 | |
|
25 | 27 | |
|
26 | - %table.table.table-hover | |
|
27 | - %thead | |
|
28 | - %tr | |
|
29 | - %th Login | |
|
30 | - %th Full name | |
|
31 | - %th Remark | |
|
32 | - %th | |
|
28 | + %table.table.table-hover | |
|
29 | + %thead | |
|
30 | + %tr | |
|
31 | + %th Login | |
|
32 | + %th Full name | |
|
33 | + %th Remark | |
|
34 | + %th | |
|
33 | 35 | |
|
34 | - %tbody | |
|
35 | - - @group.users.each do |user| | |
|
36 | - %tr | |
|
37 | - %td= user.login | |
|
38 | - %td= user.full_name | |
|
39 | - %td= user.remark | |
|
40 | - %td= link_to 'Remove', remove_user_group_path(@group,user), :method => :delete, :data => { :confirm => "Remove #{user.full_name}?" }, class: 'btn btn-danger' | |
|
36 | + %tbody | |
|
37 | + - @group.users.each do |user| | |
|
38 | + %tr | |
|
39 | + %td= user.login | |
|
40 | + %td= user.full_name | |
|
41 | + %td= user.remark | |
|
42 | + %td= link_to 'Remove', remove_user_group_path(@group,user), :method => :delete, :data => { :confirm => "Remove #{user.full_name}?" }, class: 'btn btn-danger' | |
|
41 | 43 | .col-md-6 |
|
42 | - %h1 Problems in this group | |
|
44 | + .panel.panel-default | |
|
45 | + .panel-heading | |
|
46 | + .panel-title Problems | |
|
47 | + .panel-body | |
|
43 | 48 | |
|
44 | - =form_tag add_problem_group_path(@group), class: 'form-inline' do | |
|
45 | - .form-group | |
|
46 | - =label_tag :problem_id, "Problem" | |
|
47 | - =select_tag :problem_id, options_from_collection_for_select(Problem.all,'id','full_name'), class: 'select2' | |
|
48 | - =submit_tag "Add",class: 'btn btn-primary' | |
|
49 | + =form_tag add_problem_group_path(@group), class: 'form-inline' do | |
|
50 | + .form-group | |
|
51 | + =label_tag :problem_id, "Problem" | |
|
52 | + =select_tag :problem_id, options_from_collection_for_select(Problem.all,'id','full_name'), class: 'select2' | |
|
53 | + =submit_tag "Add",class: 'btn btn-primary' | |
|
49 | 54 | |
|
50 | 55 | |
|
51 | - %table.table.table-hover | |
|
52 | - %thead | |
|
53 | - %tr | |
|
54 | - %th name | |
|
55 | - %th Full name | |
|
56 | - %th Full score | |
|
57 | - %th | |
|
56 | + %table.table.table-hover | |
|
57 | + %thead | |
|
58 | + %tr | |
|
59 | + %th name | |
|
60 | + %th Full name | |
|
61 | + %th Full score | |
|
62 | + %th | |
|
58 | 63 | |
|
59 | - %tbody | |
|
60 | - - @group.problems.each do |problem| | |
|
61 | - %tr | |
|
62 | - %td= problem.name | |
|
63 | - %td= problem.full_name | |
|
64 | - %td= problem.full_score | |
|
65 | - %td= link_to 'Remove', remove_problem_group_path(@group,problem), :method => :delete, :data => { :confirm => "Remove #{problem.full_name}?" }, class: 'btn btn-danger' | |
|
64 | + %tbody | |
|
65 | + - @group.problems.each do |problem| | |
|
66 | + %tr | |
|
67 | + %td= problem.name | |
|
68 | + %td= problem.full_name | |
|
69 | + %td= problem.full_score | |
|
70 | + %td= link_to 'Remove', remove_problem_group_path(@group,problem), :method => :delete, :data => { :confirm => "Remove #{problem.full_name}?" }, class: 'btn btn-danger' | |
|
66 | 71 | |
|
67 | 72 |
@@ -47,6 +47,7 | |||
|
47 | 47 | = add_menu( 'Announcements', 'announcements', 'index') |
|
48 | 48 | = add_menu( 'Problems', 'problems', 'index') |
|
49 | 49 | = add_menu( 'Users', 'user_admin', 'index') |
|
50 | + = add_menu( 'User Groups', 'groups', 'index') | |
|
50 | 51 | = add_menu( 'Graders', 'graders', 'list') |
|
51 | 52 | = add_menu( 'Message ', 'messages', 'console') |
|
52 | 53 | %li.divider{role: 'separator'} |
@@ -1,9 +1,9 | |||
|
1 | 1 | %h1 Editing user |
|
2 | 2 | |
|
3 | - = form_tag :action => 'update', :id => @user do | |
|
3 | + = form_tag( {:action => 'update', :id => @user}, {class: 'form-horizontal'}) do | |
|
4 | 4 | = error_messages_for 'user' |
|
5 | 5 | = render partial: "form" |
|
6 | - = submit_tag "Edit" | |
|
6 | + = submit_tag "Edit", class: 'btn btn-primary' | |
|
7 | 7 | |
|
8 | 8 | |
|
9 | 9 | = link_to 'Show', :action => 'show', :id => @user |
@@ -7,4 +7,4 | |||
|
7 | 7 | <% end %> |
|
8 | 8 | |
|
9 | 9 | <%= link_to 'Edit', :action => 'edit', :id => @user %> | |
|
10 |
- <%= link_to 'Back', :action => ' |
|
|
10 | + <%= link_to 'Back', :action => 'index' %> |
deleted file |
You need to be logged in to leave comments.
Login now