History of {{human_name}}
+| + Select any two versions to + | + {{#versions}} +||||||
|---|---|---|---|---|---|---|
| + + | ++ {{id7}} + | +
+ |
+
+ {{date}} | +|||
diff --git a/lib/gollum.rb b/lib/gollum.rb index 390b778e..1d82b261 100644 --- a/lib/gollum.rb +++ b/lib/gollum.rb @@ -1,3 +1,6 @@ +# stdlib +require 'digest/md5' + # external require 'grit' require 'github/markup' diff --git a/lib/gollum/frontend/app.rb b/lib/gollum/frontend/app.rb index 65c3bbce..cd814c14 100644 --- a/lib/gollum/frontend/app.rb +++ b/lib/gollum/frontend/app.rb @@ -78,6 +78,13 @@ module Precious wiki.preview_page("Preview", data, format).formatted_data end + get '/history/:name' do + @name = params[:name] + wiki = Gollum::Wiki.new($path) + @page = wiki.page(@name) + mustache :history + end + get %r{/(.+?)/([0-9a-f]{40})} do name = params[:captures][0] wiki = Gollum::Wiki.new($path) diff --git a/lib/gollum/frontend/public/css/screen.css b/lib/gollum/frontend/public/css/screen.css index 617f963d..7709b0ca 100644 --- a/lib/gollum/frontend/public/css/screen.css +++ b/lib/gollum/frontend/public/css/screen.css @@ -487,4 +487,80 @@ label.wiki-label { .comment-form .comment{ margin:5px 0 0 0; -} \ No newline at end of file +} + +/****************************************************************************/ +/* History +/****************************************************************************/ + +table.commits { + width: 100%; + border-left: 1px solid #ccc; + border-right: 1px solid #ccc; + border-top: 1px solid #ccc; + margin-bottom: 2em; +} + + table.commits tr td { + background-color: #eaf2f5; + } + + table.commits th { + font-weight: normal; + border-bottom: 1px solid #ccc; + padding: .3em .6em; + background-color: #eee; + font-size: 95%; + text-align:left; + } + + table.commits td { + border-bottom: 1px solid #ccc; + padding: .3em .6em; + } + + table.commits td.sha, + table.commits td.message { + font-family: Monaco, "Courier New", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace; + font-size: 80%; + } + + table.commits td.checkbox { + width: 3%; + } + + table.commits td.sha { + width: 6%; + } + + table.commits td.human { + font-family: Monaco, "Courier New", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace; + font-size: 80%; + width: 4%; + color: #888; + } + + table.commits td.author { + width: 15%; + font-weight: bold; + } + + table.commits td.author img { + vertical-align: middle; + border: 1px solid #ccc; + padding: 1px; + background-color: white; + } + + table.commits td.message a { + color: black; + } + + table.commits td.message a:hover { + text-decoration: underline; + } + + table.commits td.date { + width: 12%; + text-align: right; + } \ No newline at end of file diff --git a/lib/gollum/frontend/templates/history.mustache b/lib/gollum/frontend/templates/history.mustache new file mode 100644 index 00000000..3166ae09 --- /dev/null +++ b/lib/gollum/frontend/templates/history.mustache @@ -0,0 +1,30 @@ +