janitor trial view work

This commit is contained in:
albert 2011-01-14 17:04:01 -05:00
parent 3d5873c182
commit 0224c41252
4 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,23 @@
<h1>Janitor Trials</h1>
<table>
<thead>
<tr>
<th>User</th>
<th>Duration</th>
<td></td>
</tr>
</thead>
<tbody>
<% @janitor_trials.each do |janitor_trial| %>
<tr>
<td><%= janitor_trial.user.name %></td>
<td><%= janitor_trial.created_at %></td>
<td>
<%= link_to "Promote", promote_janitor_trial_path(janitor_trial), :remote => true, :method => :put %>
| <%= link_to "Demote", demote_janitor_trial_path(janitor_trial), :remote => true, :method => :put %>
</td>
</tr>
<% end %>
</tbody>
</table>

View File

@ -0,0 +1,6 @@
<h1>New Janitor Trial</h1>
<%= simple_form_for(@janitor_trial) do |f| %>
<%= f.input :user_id %>
<%= f.button :submit %>
<% end %>

View File

@ -1,6 +1,7 @@
class CreateJanitorTrials < ActiveRecord::Migration
def self.up
create_table :janitor_trials do |t|
t.column :creator_id, :integer, :null => false
t.column :user_id, :integer, :null => false
t.timestamps
end