Description:
[web] small styling, split out admin's menu, put config into table.info git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@157 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r77:0d98996d26c3 - - 3 files changed: 15 inserted, 16 deleted

@@ -5,25 +5,22
5 menu_items = ''
5 menu_items = ''
6 user = User.find(session[:user_id])
6 user = User.find(session[:user_id])
7
7
8 + if (user!=nil) and (user.admin?)
9 + # admin menu
10 + menu_items << "<b>Administrative task:</b> "
11 + append_to menu_items, '[Problem admin]', 'problems', 'index'
12 + append_to menu_items, '[User admin]', 'user_admin', 'index'
13 + append_to menu_items, '[User stat]', 'user_admin', 'user_stat'
14 + #append_to menu_items, '[Graders]', 'graders', 'list'
15 + append_to menu_items, '[Site config]', 'configurations', 'index'
16 + menu_items << "<br/>"
17 + end
18 +
8 # main page
19 # main page
9 append_to menu_items, '[Main]', 'main', 'list'
20 append_to menu_items, '[Main]', 'main', 'list'
10 append_to menu_items, '[Submissions]', 'main', 'submission'
21 append_to menu_items, '[Submissions]', 'main', 'submission'
11 append_to menu_items, '[Test]', 'test', 'index'
22 append_to menu_items, '[Test]', 'test', 'index'
12 -
13 - # admin menu
14 - if (user!=nil) and (user.admin?)
15 - append_to menu_items, '[Problem admin]', 'problems', 'index'
16 - append_to menu_items, '[User admin]', 'user_admin', 'index'
17 - append_to menu_items, '[User stat]', 'user_admin', 'user_stat'
18 - end
19 -
20 - # general options
21 append_to menu_items, '[Settings]', 'users', 'index'
23 append_to menu_items, '[Settings]', 'users', 'index'
22 -
23 - if (user!=nil) and (user.admin?)
24 - append_to menu_items, '[Site config]', 'configurations', 'index'
25 - end
26 -
27 append_to menu_items, '[Log out]', 'main', 'login'
24 append_to menu_items, '[Log out]', 'main', 'login'
28
25
29 menu_items
26 menu_items
@@ -3,8 +3,8
3
3
4 %h1 Grader configuration
4 %h1 Grader configuration
5
5
6 - %table
6 + %table.info
7 - %tr
7 + %tr.info-head
8 %th Key
8 %th Key
9 %th Type
9 %th Type
10 %th Value
10 %th Value
@@ -1,6 +1,8
1 - content_for :head do
1 - content_for :head do
2 = stylesheet_link_tag 'graders'
2 = stylesheet_link_tag 'graders'
3
3
4 + %h2 (Under Experiments)
5 +
4 %h3 Current graders
6 %h3 Current graders
5
7
6 = render :partial => 'grader_list', :locals => {:grader_list => @grader_processes}
8 = render :partial => 'grader_list', :locals => {:grader_list => @grader_processes}
You need to be logged in to leave comments. Login now