added approval step for aliases/implications

This commit is contained in:
albert
2011-10-23 18:50:18 -04:00
parent 34ae712be0
commit f94b65f5d5
11 changed files with 69 additions and 18 deletions

View File

@@ -0,0 +1 @@
$("#tag-alias-status-for-<%= @tag_alias.id %>").html("queued");

View File

@@ -11,10 +11,11 @@
<table width="100%" class="striped">
<thead>
<tr>
<th width="20%">From</th>
<th width="20%">To</th>
<th width="20%">Reference</th>
<th width="40%"></th>
<th width="30%">From</th>
<th width="30%">To</th>
<th width="10%">Reference</th>
<th width="10%">Status</th>
<th width="20%"></th>
</tr>
</thead>
<tbody>
@@ -27,9 +28,16 @@
<%= link_to tag_alias.forum_topic_id, forum_topic_path(tag_alias.forum_topic_id) %>
<% end %>
</td>
<td id="tag-alias-status-for-<%= tag_alias.id %>">
<%= tag_alias.status %>
</td>
<td>
<% if CurrentUser.is_admin? %>
<%= link_to "Delete", tag_alias_path(tag_alias), :remote => true, :method => :delete, :confirm => "Are you sure you want to delete this alias?" %>
<% if tag_alias.is_pending? %>
| <%= link_to "Approve", approve_tag_alias_path(tag_alias), :remote => true, :method => :post %>
<% end %>
<% end %>
</td>
</tr>

View File

@@ -0,0 +1 @@
$("#tag-implication-status-for-<%= @tag_implication.id %>").html("queued");

View File

@@ -11,10 +11,11 @@
<table width="100%" class="striped">
<thead>
<tr>
<th width="20%">From</th>
<th width="20%">To</th>
<th width="20%">Reference</th>
<th width="40%"></th>
<th width="30%">From</th>
<th width="30%">To</th>
<th width="10%">Reference</th>
<th width="10%">Status</th>
<th width="15%"></th>
</tr>
</thead>
<tbody>
@@ -27,10 +28,15 @@
<%= link_to tag_implication.forum_topic_id, forum_topic_path(tag_implication.forum_topic_id) %>
<% end %>
</td>
<td id="tag-implication-status-for-<%= tag_implication.id %>"><%= tag_implication.status %></td>
<td>
<% if CurrentUser.is_admin? %>
<%= link_to "Delete", tag_implication_path(tag_implication), :remote => true, :method => :delete, :confirm => "Are you sure you want to delete this implication?" %>
<% end %>
<% if tag_implication.is_pending? %>
| <%= link_to "Approve", approve_tag_implication_path(tag_implication), :remote => true, :method => :post %>
<% end %>
</td>
</tr>
<% end %>