Show More
Commit Description:
still upgrading
Commit Description:
still upgrading
References:
File last commit:
Show/Diff file:
Action:
app/views/problems/index.html.haml | 65 lines | 3.4 KiB | text/x-haml | HamlLexer |
* add forgotten toggle file...
r559 - content_for :head do
= stylesheet_link_tag 'problems'
make group_user and group_problem unique
r678 %h1 Problems
* add forgotten toggle file...
r559 %p
make group_user and group_problem unique
r678 = link_to 'Import problems', {:action => 'import'}, class: 'btn btn-success btn-sm'
= link_to 'New problem', new_problem_path, class: 'btn btn-success btn-sm'
= link_to 'Bulk Manage', { action: 'manage'}, class: 'btn btn-info btn-sm'
* add forgotten toggle file...
r559 = link_to 'Turn off all problems', {:action => 'turn_all_off'}, class: 'btn btn-default btn-sm'
= link_to 'Turn on all problems', {:action => 'turn_all_on'}, class: 'btn btn-default btn-sm'
.submitbox
start update to 5.2
r751 = form_tag action: 'quick_create', controller: 'problems' do
* add forgotten toggle file...
r559 %b Quick New:
%label{:for => "problem_name"} Name
= text_field 'problem', 'name'
|
%label{:for => "problem_full_name"} Full name
= text_field 'problem', 'full_name'
= submit_tag "Create"
* DRY the toggle button via application_helper.rb#toggle_button and _toggle_button.js.haml...
r562 %table.table.table-condense.table-hover
* add forgotten toggle file...
r559 %thead
%th Name
%th Full name
- add problem manage toggle test interface...
r569 %th.text-right Full score
add tags
r700 %th Tags
add remove_all in groups...
r680 %th
Submit
%sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Admin can always submit to any problem' } [?]
* add forgotten toggle file...
r559 %th Date added
- add problem manage toggle test interface...
r569 %th.text-center
Avail?
%sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Let user submits to this problem?' } [?]
%th.text-center
- add view testcase toggle for each problem...
r632 View Data?
%sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Let user view the testcase of this problem?' } [?]
%th.text-center
- add problem manage toggle test interface...
r569 Test?
%sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Let user uses test interface on this problem?' } [?]
* add forgotten toggle file...
r559 - if GraderConfiguration.multicontests?
%th Contests
- for problem in @problems
%tr{:class => "#{(problem.available) ? "success" : "danger"}", :id => "prob-#{problem.id}", :name => "prob-#{problem.id}"}
- @problem=problem
- remove inplace editor from view...
r598 %td= problem.name #in_place_editor_field :problem, :name, {}, :rows=>1
add remove_all in groups...
r680 %td
= problem.full_name #in_place_editor_field :problem, :full_name, {}, :rows=>1
= link_to_description_if_any "[#{t 'main.problem_desc'}] <span class='glyphicon glyphicon-file'></span>".html_safe, problem
- remove inplace editor from view...
r598 %td.text-right= problem.full_score #in_place_editor_field :problem, :full_score, {}, :rows=>1
add tags
r700 %td
- problem.tags.each do |t|
- #%button.btn.btn-default.btn-xs= t.name
%span.label.label-default= t.name
fix allow admin to submit to any problem
r682 %td= link_to "Submit", direct_edit_problem_submissions_path(problem,@current_user.id), class: 'btn btn-xs btn-primary'
* add forgotten toggle file...
r559 %td= problem.date_added
change _url to _path when using toggle_button so that protocol is preserved
r600 %td= toggle_button(@problem.available?, toggle_problem_path(@problem), "problem-avail-#{@problem.id}")
- add view testcase toggle for each problem...
r632 %td= toggle_button(@problem.view_testcase?, toggle_view_testcase_problem_path(@problem), "problem-view-testcase-#{@problem.id}")
change _url to _path when using toggle_button so that protocol is preserved
r600 %td= toggle_button(@problem.test_allowed?, toggle_test_problem_path(@problem), "problem-test-#{@problem.id}")
* add forgotten toggle file...
r559 - if GraderConfiguration.multicontests?
%td
= problem.contests.collect { |c| c.name }.join(', ')
* DRY the toggle button via application_helper.rb#toggle_button and _toggle_button.js.haml...
r562 %td= link_to 'Stat', {:action => 'stat', :id => problem.id}, class: 'btn btn-info btn-xs btn-block'
%td= link_to 'Show', {:action => 'show', :id => problem}, class: 'btn btn-info btn-xs btn-block'
%td= link_to 'Edit', {:action => 'edit', :id => problem}, class: 'btn btn-info btn-xs btn-block'
fix destroy button link
r604 %td= link_to 'Destroy', { :action => 'destroy', :id => problem }, :confirm => 'Are you sure?', :method => :delete, class: 'btn btn-danger btn-xs btn-block'
* add forgotten toggle file...
r559 %br/
= link_to '[New problem]', :action => 'new'