Description:
fixed in_place_editor for configs, updated form in users/new
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r330:82d41889f7a0 - - 3 files changed: 8 inserted, 8 deleted

@@ -1,20 +1,20
1 1 class ConfigurationsController < ApplicationController
2 2
3 3 before_filter :authenticate
4 4 before_filter { |controller| controller.authorization_by_roles(['admin'])}
5 5
6 - in_place_edit_for :configuration, :key
7 - in_place_edit_for :configuration, :type
8 - in_place_edit_for :configuration, :value
6 + in_place_edit_for :grader_configuration, :key
7 + in_place_edit_for :grader_configuration, :type
8 + in_place_edit_for :grader_configuration, :value
9 9
10 10 def index
11 11 @configurations = GraderConfiguration.find(:all,
12 12 :order => '`key`')
13 13 end
14 14
15 15 def reload
16 16 GraderConfiguration.reload
17 17 redirect_to :action => 'index'
18 18 end
19 19
20 20 end
@@ -1,29 +1,29
1 1 %h1 System configuration
2 2
3 3 %table.info
4 4 %tr.info-head
5 5 %th Key
6 6 %th Type
7 7 %th Value
8 8 %th Description
9 9 - @configurations.each do |conf|
10 - - @configuration = conf
10 + - @grader_configuration = conf
11 11 %tr{:class => cycle("info-odd", "info-even")}
12 12 %td
13 - = in_place_editor_field :configuration, :key, {}, :rows=>1
13 + = in_place_editor_field :grader_configuration, :key, {}, :rows=>1
14 14 %td
15 - = in_place_editor_field :configuration, :value_type, {}, :rows=>1
15 + = in_place_editor_field :grader_configuration, :value_type, {}, :rows=>1
16 16 %td
17 - = in_place_editor_field :configuration, :value, {}, :rows=>1
17 + = in_place_editor_field :grader_configuration, :value, {}, :rows=>1
18 18 %td= conf.description
19 19
20 20 - if GraderConfiguration.config_cached?
21 21 %br/
22 22 Your config is saved, but it does not automatically take effect.
23 23 %br/
24 24 If you have one mongrel process running, you can
25 25 = link_to '[click]', :action => 'reload'
26 26 here to reload.
27 27 %br/
28 28 If you have more than one process running, you should restart
29 29 them manually.
@@ -1,23 +1,23
1 1 .contest-title
2 2 %h1
3 3 = "#{GraderConfiguration['contest.name']}: #{t 'registration.title'}"
4 4
5 5 .registration-desc
6 6 =t 'registration.description'
7 7
8 8 = error_messages_for :user, :header_message => (t 'registration.errors.header')
9 9
10 10 %table
11 - = form_for :user, @user, :url => { :action => 'register' } do |f|
11 + = form_for @user, :url => { :action => 'register' } do |f|
12 12 %tr
13 13 %td{:align => "right"}
14 14 = "#{t 'login_label'}:"
15 15 %td= f.text_field :login
16 16 %tr
17 17 %td
18 18 %td
19 19 %small
20 20 =t 'registration.login_guide'
21 21 %tr
22 22 %td{:align => "right"}
23 23 = "#{t 'full_name_label'}:"
You need to be logged in to leave comments. Login now