fixed tag subscription tests
This commit is contained in:
6
app/views/tag_subscriptions/_form.html.erb
Normal file
6
app/views/tag_subscriptions/_form.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<%= simple_form_for(@tag_subscription) do |f| %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :tag_query %>
|
||||
<%= f.input :is_public %>
|
||||
<%= f.button :submit %>
|
||||
<% end %>
|
||||
14
app/views/tag_subscriptions/_secondary_links.html.erb
Normal file
14
app/views/tag_subscriptions/_secondary_links.html.erb
Normal file
@@ -0,0 +1,14 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Listing", tag_subscriptions_path %></li>
|
||||
<li><%= link_to "New", new_tag_subscription_path %></li>
|
||||
<li><%= link_to "Help", wiki_pages_path(:title => "help:tag_subscriptions") %></li>
|
||||
|
||||
<% if @tag_subscription && !@tag_subscription.new_record? && @tag_subscription.editable_by?(CurrentUser.user) %>
|
||||
<li>|</li>
|
||||
<li><%= link_to "Show", tag_subscription_path(@tag_subscription) %></li>
|
||||
<li><%= link_to "Edit", edit_tag_subscription_path(@tag_subscription) %></li>
|
||||
<li><%= link_to "Delete", tag_subscription_path(@tag_subscription, :method => :delete, :confirm => "Are you sure you want to delete this tag subscription?") %></li>
|
||||
<% end %>
|
||||
</menu>
|
||||
<% end %>
|
||||
@@ -0,0 +1,6 @@
|
||||
<div id="c-tag-subscriptions">
|
||||
<div id="a-edit">
|
||||
<h1>Edit Tag Subscription</h1>
|
||||
<%= render "form" %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,14 +1,25 @@
|
||||
<% form_tag(:action => "update") do %>
|
||||
<h4>Edit Tag Subscriptions</h4>
|
||||
<div style="margin-bottom: 1em;">
|
||||
You can only create up to <%= CONFIG["max_tag_subscriptions"] %> groups and each group can have up to 20 tags.
|
||||
<div id="c-tag-subscriptions">
|
||||
<div id="a-index">
|
||||
<h1>Tag Subscriptions</h1>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Creator</th>
|
||||
<th>Name</th>
|
||||
<th>Tag Query</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @tag_subscriptions.each do |tag_subscription| %>
|
||||
<tr>
|
||||
<td><%= tag_subscription.creator.name %></td>
|
||||
<td><%= link_to tag_subscription.name, tag_subscription_path(tag_subscription.id) %></td>
|
||||
<td><%= link_to tag_subscription.tag_query, posts_path(:tags => "sub:#{@user.name}:#{tag_subscription.name}") %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table width="100%" class="highlightable">
|
||||
<%= render :partial => "listing", :locals => {:tag_subscriptions => @tag_subscriptions} %>
|
||||
</table>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% content_for("subnavbar") do %>
|
||||
<li><%= link_to "Help", :controller => "help", :action => "tag_subscriptions" %></li>
|
||||
<% end %>
|
||||
<%= render "secondary_links" %>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<div id="c-tag-subscriptions">
|
||||
<div id="a-new">
|
||||
<h1>New Tag Subscription</h1>
|
||||
<%= render "form" %>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user