instiki/app/views/wiki/history.html.erb
Jacques Distler a5e08f7bcc Rails_xss Plugin
I installed the rails_xss plugin, for
the main purpose of seeing what will
break with Rails 3.0 (where the behaviour
of the plugin is the default). I think
I've fixed everything, but let me know if you
see stuff that is HTML-escaped, which
shouldn't be.

As a side benefit, we now use Erubis,
rather than ERB, to render templates.
They tell me it's faster ...
2010-05-26 00:27:49 -05:00

29 lines
1,002 B
Plaintext

<%- @title = @page.plain_name + " (history)".html_safe -%>
<%- @show_footer = true -%>
<%- @revisions_by_day.keys.sort.reverse.each do |day| -%>
<h3><%= format_date(day, include_time = false) %></h3>
<ul>
<%- for rev in @revisions_by_day[day] -%>
<li>
<%= link_to_revision(rev.page, @revision_numbers[rev.id],
text= (rev.page.revisions.size == @revision_numbers[rev.id] ?
"Current" :
"Revision #{@revision_numbers[rev.id]}" )
) %>
<%- if @revision_numbers[rev.id] > 1 -%>
<span class="hist_views">
(<%= link_to_revision(rev.page, @revision_numbers[rev.id],
text="diff", mode='diff') %>)
</span>
<%- end -%>
<div class="byline" style="margin-bottom: 0px">
by <%= link_to_page(rev.author) %>
at <%= format_date(rev.revised_at) %>
<%= "from #{rev.author.ip}" if rev.author.respond_to?(:ip) %>
</div>
</li>
<%- end -%>
</ul>
<%- end -%>