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

@@ -2,31 +2,28
2 2 module ApplicationHelper
3 3
4 4 def user_header
5 5 menu_items = ''
6 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 19 # main page
9 20 append_to menu_items, '[Main]', 'main', 'list'
10 21 append_to menu_items, '[Submissions]', 'main', 'submission'
11 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 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 24 append_to menu_items, '[Log out]', 'main', 'login'
28 25
29 26 menu_items
30 27 end
31 28
32 29 def append_to(option,label, controller, action)
@@ -1,13 +1,13
1 1 - content_for :head do
2 2 = javascript_include_tag :defaults
3 3
4 4 %h1 Grader configuration
5 5
6 - %table
7 - %tr
6 + %table.info
7 + %tr.info-head
8 8 %th Key
9 9 %th Type
10 10 %th Value
11 11
12 12 - @configurations.each do |conf|
13 13 - @configuration = conf
@@ -1,9 +1,11
1 1 - content_for :head do
2 2 = stylesheet_link_tag 'graders'
3 3
4 + %h2 (Under Experiments)
5 +
4 6 %h3 Current graders
5 7
6 8 = render :partial => 'grader_list', :locals => {:grader_list => @grader_processes}
7 9
8 10 %h3 Stalled graders
9 11
You need to be logged in to leave comments. Login now