# HG changeset patch # User jittat # Date 2008-03-31 16:56:23 # Node ID 0d98996d26c38e47c947a0da65499db7f34e9ce3 # Parent d35e4fe536bb9cb528454ee071a6218256b025b4 [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 diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -5,25 +5,22 @@ menu_items = '' user = User.find(session[:user_id]) + if (user!=nil) and (user.admin?) + # admin menu + menu_items << "Administrative task: " + append_to menu_items, '[Problem admin]', 'problems', 'index' + append_to menu_items, '[User admin]', 'user_admin', 'index' + append_to menu_items, '[User stat]', 'user_admin', 'user_stat' + #append_to menu_items, '[Graders]', 'graders', 'list' + append_to menu_items, '[Site config]', 'configurations', 'index' + menu_items << "
" + end + # main page append_to menu_items, '[Main]', 'main', 'list' append_to menu_items, '[Submissions]', 'main', 'submission' append_to menu_items, '[Test]', 'test', 'index' - - # admin menu - if (user!=nil) and (user.admin?) - append_to menu_items, '[Problem admin]', 'problems', 'index' - append_to menu_items, '[User admin]', 'user_admin', 'index' - append_to menu_items, '[User stat]', 'user_admin', 'user_stat' - end - - # general options append_to menu_items, '[Settings]', 'users', 'index' - - if (user!=nil) and (user.admin?) - append_to menu_items, '[Site config]', 'configurations', 'index' - end - append_to menu_items, '[Log out]', 'main', 'login' menu_items diff --git a/app/views/configurations/index.html.haml b/app/views/configurations/index.html.haml --- a/app/views/configurations/index.html.haml +++ b/app/views/configurations/index.html.haml @@ -3,8 +3,8 @@ %h1 Grader configuration -%table - %tr +%table.info + %tr.info-head %th Key %th Type %th Value diff --git a/app/views/graders/list.html.haml b/app/views/graders/list.html.haml --- a/app/views/graders/list.html.haml +++ b/app/views/graders/list.html.haml @@ -1,6 +1,8 @@ - content_for :head do = stylesheet_link_tag 'graders' +%h2 (Under Experiments) + %h3 Current graders = render :partial => 'grader_list', :locals => {:grader_list => @grader_processes}