janitor trial view work
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<h1>New Janitor Trial</h1>
|
||||||
|
|
||||||
|
<%= simple_form_for(@janitor_trial) do |f| %>
|
||||||
|
<%= f.input :user_id %>
|
||||||
|
<%= f.button :submit %>
|
||||||
|
<% end %>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
class CreateJanitorTrials < ActiveRecord::Migration
|
class CreateJanitorTrials < ActiveRecord::Migration
|
||||||
def self.up
|
def self.up
|
||||||
create_table :janitor_trials do |t|
|
create_table :janitor_trials do |t|
|
||||||
|
t.column :creator_id, :integer, :null => false
|
||||||
t.column :user_id, :integer, :null => false
|
t.column :user_id, :integer, :null => false
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user