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