# HG changeset patch # User jittat # Date 2008-05-04 13:32:52 # Node ID da88b433650176706c566a18091bc307a176ecf3 # Parent 79cec9e5ddcb837352853af84f57d9068cbbd0a9 [web] added error page for uploading too large file git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@228 6386c4cd-e34a-4fa8-8920-d93eb39b512e diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -102,6 +102,10 @@ end end + def error + @user = User.find(session[:user_id]) + end + protected def prepare_list_information @problems = Problem.find_available_problems diff --git a/app/views/main/error.html.haml b/app/views/main/error.html.haml new file mode 100644 --- /dev/null +++ b/app/views/main/error.html.haml @@ -0,0 +1,7 @@ += user_title_bar(@user) + +.announcementbox + %span{:class => 'title'} + Error + .announcement + You are uploading a file which is too large (> 2MB).