Files
danbooru/app/views/users/_post_summary.html.erb
2013-04-27 08:14:43 -04:00

40 lines
1.1 KiB
Plaintext

<div class="box">
<h2><%= link_to "Uploads", posts_path(:tags => "user:#{user.name}") %></h2>
<% if presenter.has_uploads? %>
<div>
<% presenter.uploads.each do |post| %>
<%= PostPresenter.preview(post, :tags => "user:#{user.name}") %>
<% end %>
</div>
<% else %>
<p>None</p>
<% end %>
</div>
<div class="box">
<h2><%= link_to "Favorites", favorites_path(:user_id => user.id) %></h2>
<% if presenter.has_favorites? %>
<div>
<% presenter.favorites.each do |post| %>
<%= PostPresenter.preview(post, :tags => "fav:#{user.name}") %>
<% end %>
</div>
<% else %>
<p>None</p>
<% end %>
</div>
<% presenter.subscriptions.each do |subscription| %>
<div class="box">
<h2>
Subscription: <%= link_to subscription.pretty_name, posts_path(:tags => "sub:#{user.name}:#{subscription.name}") %>
</h2>
<div class="box">
<% presenter.posts_for_subscription(subscription).each do |post| %>
<%= PostPresenter.preview(post, :tags => "sub:#{user.name}:#{subscription.name}") %>
<% end %>
</div>
</div>
<% end %>