Skip to content

Commit

Permalink
Don't include changes div, if there is only one revision
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Verkhovsky committed May 28, 2005
1 parent 3107341 commit af50549
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions app/views/wiki/page.rhtml
Expand Up @@ -7,16 +7,19 @@
<%= @page.display_content %>
</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>
<% if @page.revisions.length > 1 %>
<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">
<%= @page.revisions? ? "Revised" : "Created" %> on <%= @page.pretty_created_at %>
Expand Down

0 comments on commit af50549

Please sign in to comment.