Show More
Commit Description:
added codejom controller, show status in public
Commit Description:
added codejom controller, show status in public
References:
File last commit:
Show/Diff file:
Action:
app/views/problems/list.rhtml
| 58 lines
| 2.0 KiB
| text/html+ruby
| RhtmlLexer
|
|
r25 | <% content_for :head do %> | ||
|
r56 | <%= stylesheet_link_tag 'problems' %> | ||
|
r25 | <%= javascript_include_tag :defaults %> | ||
<% end %> | ||||
|
r0 | <h1>Listing problems</h1> | ||
|
r101 | <p> | ||
|
r201 | <%= link_to '[New problem]', :action => 'new' %> | ||
<%= link_to '[Manage problems]', :action => 'manage' %> | ||||
|
r204 | <%= link_to '[Import problems]', :action => 'import' %> | ||
|
r201 | <%= link_to '[Turn off all problems]', :action => 'turn_all_off' %> | ||
<%= link_to '[Turn on all problems]', :action => 'turn_all_on' %> | ||||
|
r101 | </p> | ||
|
r27 | |||
|
r171 | <div class="submitbox"> | ||
<% form_tag :action => 'quick_create' do %> | ||||
<b>Quick New:</b> | ||||
<label for="problem_name">Name</label> | ||||
<%= text_field 'problem', 'name' %> | | ||||
<label for="problem_full_name">Full name</label> | ||||
<%= text_field 'problem', 'full_name' %> | ||||
<%= submit_tag "Create" %> | ||||
<% end %> | ||||
</div> | ||||
|
r0 | <table> | ||
<tr> | ||||
|
r21 | <th>Name</th> | ||
<th>Full name</th> | ||||
<th>Full score</th> | ||||
<th>Date added</th> | ||||
|
r94 | <th>Avail?</th> | ||
<th>Test?</th> | ||||
|
r0 | </tr> | ||
<% for problem in @problems %> | ||||
|
r147 | <tr id="prob-<%= problem.id %>" name="prob-<%= problem.id %>" class="<%= (problem.available) ? "available" : "not-available" %>"> | ||
|
r21 | <% @problem=problem %> | ||
|
r94 | <td><%= in_place_editor_field :problem, :name, {}, :rows=>1 %></td> | ||
<td><%= in_place_editor_field :problem, :full_name, {}, :rows=>1 %></td> | ||||
<td><%= in_place_editor_field :problem, :full_score, {}, :rows=>1 %></td> | ||||
<td><%= problem.date_added %></td> | ||||
|
r148 | <td id="prob-<%= problem.id %>-avail"><%= problem.available %></td> | ||
|
r94 | <td><%= problem.test_allowed %></td> | ||
|
r21 | |||
|
r147 | <td><%= link_to_remote '[Toggle]', :url => {:action => 'toggle', :id => problem.id } %></td> | ||
|
r0 | <td><%= link_to '[Stat]', :action => 'stat', :id => problem.id %></td> | ||
<td><%= link_to '[Show]', :action => 'show', :id => problem %></td> | ||||
<td><%= link_to '[Edit]', :action => 'edit', :id => problem %></td> | ||||
<td><%= link_to '[Destroy]', { :action => 'destroy', :id => problem }, :confirm => 'Are you sure?', :method => :post %></td> | ||||
</tr> | ||||
<% end %> | ||||
</table> | ||||
<br /> | ||||
|
r204 | <%= link_to '[New problem]', :action => 'new' %> | ||