refactoring views

This commit is contained in:
albert
2011-08-16 18:47:01 -04:00
parent c8067a4691
commit 24bf21540a
46 changed files with 244 additions and 298 deletions

View File

@@ -1,23 +1,27 @@
<h1>Janitor Trials</h1>
<div id="c-janitor-trials">
<div id="a-index">
<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>
<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>
</div>
</div>

View File

@@ -1,6 +1,10 @@
<h1>New Janitor Trial</h1>
<div id="c-janitor-trials">
<div id="a-new">
<h1>New Janitor Trial</h1>
<%= simple_form_for(@janitor_trial) do |f| %>
<%= f.input :user_id %>
<%= f.button :submit %>
<% end %>
<%= simple_form_for(@janitor_trial) do |f| %>
<%= f.input :user_id %>
<%= f.button :submit %>
<% end %>
</div>
</div>