diff --git a/lib/gollum/frontend/app.rb b/lib/gollum/frontend/app.rb index 38020901..0d0b540e 100644 --- a/lib/gollum/frontend/app.rb +++ b/lib/gollum/frontend/app.rb @@ -97,6 +97,7 @@ module Precious @versions = [sha1, sha2] diffs = wiki.repo.diff(@versions.first, @versions.last, @page.path) @diff = diffs.first + @message = "The patch does not apply." mustache :compare end end diff --git a/lib/gollum/frontend/templates/compare.mustache b/lib/gollum/frontend/templates/compare.mustache index 50d051f0..1859ff7d 100755 --- a/lib/gollum/frontend/templates/compare.mustache +++ b/lib/gollum/frontend/templates/compare.mustache @@ -7,13 +7,20 @@ {{>searchbar}} + +{{#message}} +

{{message}}

+{{/message}} +
diff --git a/lib/gollum/frontend/templates/history.mustache b/lib/gollum/frontend/templates/history.mustache index a2c50312..233e57df 100755 --- a/lib/gollum/frontend/templates/history.mustache +++ b/lib/gollum/frontend/templates/history.mustache @@ -15,7 +15,7 @@
  • Compare Revisions
  • - +
    diff --git a/lib/gollum/frontend/views/compare.rb b/lib/gollum/frontend/views/compare.rb index bbee92e6..6b574c0a 100644 --- a/lib/gollum/frontend/views/compare.rb +++ b/lib/gollum/frontend/views/compare.rb @@ -1,7 +1,7 @@ module Precious module Views class Compare < Layout - attr_reader :page, :diff, :versions + attr_reader :page, :diff, :versions, :message def title "Comparison of #{@page.title}" @@ -30,6 +30,10 @@ module Precious lines end + def show_revert + !@message + end + # private def line_class(line)