7290e90631
Introduce page.rev_ids, and use that, wherever possible, instead of page.revisions. This avoids fetching the text of all the revisions. D'oh!
26 lines
799 B
Plaintext
26 lines
799 B
Plaintext
<%- @title = "Recently Revised" -%>
|
|
|
|
<%= categories_menu %>
|
|
|
|
<%- @pages_by_day.keys.sort.reverse.each do |day| -%>
|
|
<h3><%= format_date(day, include_time = false) %></h3>
|
|
<ul>
|
|
<%- for page in @pages_by_day[day] -%>
|
|
<li>
|
|
<%= link_to_existing_page page %>
|
|
<%- if page.rev_ids.size > 1 %>
|
|
<span class="views">
|
|
( <%= link_to_revision(page, page.rev_ids.size, text='diff',
|
|
mode='diff') %> | <%= link_to_history(page, text='history') %> )
|
|
</span>
|
|
<%- end -%>
|
|
<div class="byline" style="margin-bottom: 0px">
|
|
by <%= link_to_page(page.author) %>
|
|
at <%= format_date(page.revised_at) %>
|
|
<%= "from #{page.author.ip}" if page.author.respond_to?(:ip) %>
|
|
</div>
|
|
</li>
|
|
<%- end -%>
|
|
</ul>
|
|
<%- end -%>
|