Don't include changes div, if there is only one revision

This commit is contained in:
Alexey Verkhovsky 2005-05-28 23:37:23 +00:00
parent 3107341af5
commit af50549e3e

View file

@ -7,16 +7,19 @@
<%= @page.display_content %> <%= @page.display_content %>
</div> </div>
<div id="changes" style="display: none">
<p style="background: #eee; padding: 3px; border: 1px solid silver">
<small>
Showing changes from revision #<%= @page.number - 1 %> to #<%= @page.number %>:
<ins class="diffins">Added</ins> | <del class="diffdel">Removed</del>
</small>
</p>
<%= @page.display_diff %> <% if @page.revisions.length > 1 %>
</div> <div id="changes" style="display: none">
<p style="background: #eee; padding: 3px; border: 1px solid silver">
<small>
Showing changes from revision #<%= @page.number - 1 %> to #<%= @page.number %>:
<ins class="diffins">Added</ins> | <del class="diffdel">Removed</del>
</small>
</p>
<%= @page.display_diff %>
</div>
<% end %>
<div class="byline"> <div class="byline">
<%= @page.revisions? ? "Revised" : "Created" %> on <%= @page.pretty_created_at %> <%= @page.revisions? ? "Revised" : "Created" %> on <%= @page.pretty_created_at %>