clacks/lib/clacks_web/templates/frontend/_timeline.html.eex

28 lines
955 B
Elixir

<% newer = prev_page_path(@conn, @statuses_with_authors) %>
<%= if newer do %>
<p class="pagination-link">
<a href="<%= newer %>">Newer</a>
</p>
<% end %>
<ul class="status-list">
<%= for {status, author, announced} <- @statuses_with_authors do %>
<li>
<%= if status.data["type"] == "Announce" do %>
<% {announced_status, announced_actor} = announced %>
<%= render "_action_status.html", conn: @conn, action: :announce, action_activity: status, action_actor: author, original_activity: announced_status, original_note: announced_status.object.data, original_actor: announced_actor %>
<% else %>
<%= render "_status.html", conn: @conn, author: author, status: status, note: status.object.data %>
<% end %>
</li>
<% end %>
</ul>
<% older = next_page_path(@conn, @statuses_with_authors) %>
<%= if older do %>
<p class="pagination-link">
<a href="<%= older %>">Older</a>
</p>
<% end %>