Skip to content

Commit

Permalink
Merged Zach's new logic with my newer markup
Browse files Browse the repository at this point in the history
  • Loading branch information
brzaik committed Jul 6, 2012
1 parent 5e8594c commit 61fd619
Showing 1 changed file with 25 additions and 27 deletions.
52 changes: 25 additions & 27 deletions app/views/feeds/_browse_body.html.erb
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
<article>
<ul class="SL">
<% @feeds.each do |feed| %>
<% if feed.approved_contents.size != 0 || (feed.pending_contents.size != 0 && feed.group.has_member?(current_user) ) %>
<li>
<h3>
<%= link_to feed_submissions_path(feed), :remote => true, :class => "link-hl" do %>
<span class="badge"><%= feed.approved_contents.count %></span> <%= feed.name %>
<% end %>
<small>&nbsp;&nbsp;<%= feed.description %></small>
<% if can? :update, feed %>
<small><%= link_to "[#{t(:edit)}]", edit_feed_path(feed) %></small>
<% end %>
</h3>
<% if feed.approved_contents.size != 0 || (feed.pending_contents.size != 0 && feed.group.has_member?(current_user) ) %>
<li>
<h3>
<%= link_to feed_submissions_path(feed), :remote => true, :class => "link-hl" do %>
<span class="badge"><%= feed.approved_contents.count %></span> <%= feed.name %>
<% end %>
<small>&nbsp;&nbsp;<%= feed.description %></small>
<% if can? :update, feed %>
<small><%= link_to "[#{t(:edit)}]", edit_feed_path(feed) %></small>
<% end %>
</h3>
<% end %>
<% if feed.children.count > 0 %>
<p class="indented">Sub-feeds:
<p class="indented">Sub-feeds:
<% feed.children.each do |sub_feed| %>
<%= link_to feed_submissions_path(sub_feed), :remote => true, :class => "link-hl" do %>
<%= sub_feed.name %>
<% end %>
<% end %>
</p>
<%= link_to feed_submissions_path(sub_feed), :remote => true, :class => "link-hl" do %>
<%= sub_feed.name %>
<% end %>
<% end %>
</p>
<% end %>
</li>
<% end %>
<% if can? :create, Feed %>
<li>
<h3><%= link_to "+ #{t(:new_feed)}", new_feed_path %></h3>
</li>
</li>
<% end %>
<% if can? :create, Feed %>
<li>
<h3><%= link_to "+ #{t(:new_feed)}", new_feed_path %></h3>
</li>
<% end %>
</ul>
</article>
<div class="clear"></div>
</ul>
<div class="clear"></div>

0 comments on commit 61fd619

Please sign in to comment.