Show More
Commit Description:
initial commit...
Commit Description:
initial commit git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@1 6386c4cd-e34a-4fa8-8920-d93eb39b512e
References:
File last commit:
Show/Diff file:
Action:
app/views/problems/list.rhtml | 33 lines | 1.1 KiB | text/html+ruby | RhtmlLexer |
<h1>Listing problems</h1>
<div class="usermenu">
<%= link_to 'Main', :controller => 'main', :action => 'list' %>
</div>
<table>
<tr>
<% for column in Problem.content_columns %>
<th><%= column.human_name %></th>
<% end %>
</tr>
<% for problem in @problems %>
<tr>
<% for column in Problem.content_columns %>
<td><%=h problem.send(column.name) %></td>
<% end %>
<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>
<%= link_to 'Previous page', { :page => @problem_pages.current.previous } if @problem_pages.current.previous %>
<%= link_to 'Next page', { :page => @problem_pages.current.next } if @problem_pages.current.next %>
<br />
<%= link_to 'New problem', :action => 'new' %>