fixes #143: Janitor trials issues

This commit is contained in:
albert
2011-10-17 00:29:22 -04:00
parent 509c619a04
commit b9ace89e53
7 changed files with 27 additions and 7 deletions

View File

@@ -0,0 +1,6 @@
<% content_for(:secondary_links) do %>
<menu>
<li><%= link_to "Listing", janitor_trials_path %></li>
<li><%= link_to "New", new_janitor_trial_path %></li>
</menu>
<% end %>

View File

@@ -0,0 +1 @@
location.reload();

View File

@@ -2,7 +2,7 @@
<div id="a-index">
<h1>Janitor Trials</h1>
<table>
<table class="striped">
<thead>
<tr>
<th>User</th>
@@ -14,7 +14,7 @@
<% @janitor_trials.each do |janitor_trial| %>
<tr>
<td><%= janitor_trial.user.name %></td>
<td><%= janitor_trial.created_at %></td>
<td><%= time_ago_in_words 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 %>
@@ -25,3 +25,5 @@
</table>
</div>
</div>
<%= render "secondary_links" %>

View File

@@ -3,8 +3,10 @@
<h1>New Janitor Trial</h1>
<%= simple_form_for(@janitor_trial) do |f| %>
<%= f.input :user_id %>
<%= f.button :submit %>
<%= f.input :user_name %>
<%= f.button :submit, "Submit" %>
<% end %>
</div>
</div>
<%= render "secondary_links" %>

View File

@@ -0,0 +1 @@
location.reload();