Show More
Commit Description:
update NOTES...
Commit Description:
update NOTES git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@120 6386c4cd-e34a-4fa8-8920-d93eb39b512e
File last commit:
Show/Diff file:
Action:
app/views/problems/list.rhtml | 44 lines | 1.3 KiB | text/html+ruby | RhtmlLexer |
<% content_for :head do %>
<%= stylesheet_link_tag 'scaffold' %>
<%= javascript_include_tag :defaults %>
<% end %>
<h1>Listing problems</h1>
<div class="usermenu">
<%= link_to 'Main', :controller => 'main', :action => 'list' %>
</div>
<%= link_to 'New problem', :action => 'new' %><br/>
<table>
<tr>
<th>Name</th>
<th>Full name</th>
<th>Full score</th>
<th>Date added</th>
<th>Available</th>
</tr>
<% for problem in @problems %>
<tr>
<% @problem=problem %>
<td><%= in_place_editor_field :problem, :name, {}, :rows=>1 %>
<td><%= in_place_editor_field :problem, :full_name, {}, :rows=>1 %>
<td><%= in_place_editor_field :problem, :full_score, {}, :rows=>1 %>
<td><%= problem.date_added %>
<td><%= problem.available %>
<td><%= link_to '[Toggle]', :action => 'toggle_avail', :id => problem.id %></td>
<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 />
<%= link_to 'New problem', :action => 'new' %>