diff --git a/app/controllers/problems_controller.rb b/app/controllers/problems_controller.rb
--- a/app/controllers/problems_controller.rb
+++ b/app/controllers/problems_controller.rb
@@ -2,6 +2,10 @@
before_filter :authenticate, :authorization
+ in_place_edit_for :problem, :name
+ in_place_edit_for :problem, :full_name
+ in_place_edit_for :problem, :full_score
+
def index
list
render :action => 'list'
diff --git a/app/helpers/main_helper.rb b/app/helpers/main_helper.rb
--- a/app/helpers/main_helper.rb
+++ b/app/helpers/main_helper.rb
@@ -5,7 +5,7 @@
st = ''
if (time.yday != now.yday) or
(time.year != now.year)
- st = time.strftime("%x")
+ st = time.strftime("%x ")
end
st + time.strftime("%X")
end
@@ -26,13 +26,13 @@
end
def format_submission(sub, count)
- msg = "#{count} submission(s)
"
+ msg = "#{count} submission(s)."
if count>0
msg = msg + "Last on " +
format_short_time(sub.submitted_at) + ' ' +
- link_to('[source]',{:action => 'get_source', :id => sub.id}) +
- "
"
+ link_to('[source]',{:action => 'get_source', :id => sub.id})
end
+ msg += "
"
if sub!=nil and sub.graded_at!=nil
msg = msg + 'Graded at ' + format_short_time(sub.graded_at) + ', score: '+
sub.points.to_s +
diff --git a/app/views/layouts/problems.rhtml b/app/views/layouts/problems.rhtml
--- a/app/views/layouts/problems.rhtml
+++ b/app/views/layouts/problems.rhtml
@@ -6,6 +6,7 @@
<%= column.human_name %> | - <% end %> +Name | +Full name | +Full score | +Date added | +Available | |||
---|---|---|---|---|---|---|---|---|
<%=h problem.send(column.name) %> | - <% end %> + <% @problem=problem %> +<%= in_place_editor_field :problem, :name, {}, :rows=>1 %> + | <%= in_place_editor_field :problem, :full_name, {}, :rows=>1 %> + | <%= in_place_editor_field :problem, :full_score, {}, :rows=>1 %> + | <%= problem.date_added %> + | <%= problem.available %> + | <%= link_to '[Toggle]', :action => 'toggle_avail', :id => problem.id %> | <%= link_to '[Stat]', :action => 'stat', :id => problem.id %> | <%= link_to '[Show]', :action => 'show', :id => problem %> | diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -2,6 +2,13 @@ font-size: 12px; } +div.title { + font-size: 20px; + font-weight: bold; + background: lightgreen; + padding: 2px; +} + div.problist-each { margin-top: 2px; margin-bottom: 2px @@ -10,7 +17,8 @@ div.usermenu { border-top: thin solid grey; border-bottom: thin solid grey; - text-align: right + text-align: right; + font-size: 12px; } div.probname { @@ -24,7 +32,8 @@ margin-left: 20px; margin-top: 2px; border-bottom: thin solid grey; - border-left: thin solid grey + border-left: thin solid grey; + font-size: 12px; } div.compilermsgbody { @@ -36,6 +45,7 @@ padding: 5px; color: white; background-color: #777777; + font-weight: bold; }