Permalink
Browse files

better links to available versions

  • Loading branch information...
1 parent 515a7b8 commit d92dd16d190435a7dedaa09a17ad2146e2bdbd6d @jchris jchris committed Jul 25, 2010
Showing with 9 additions and 2 deletions.
  1. +3 −1 evently/tools/history/data.js
  2. +6 −1 evently/tools/history/mustache.html
@@ -33,10 +33,12 @@ function(doc) {
log = doc.log[j];
if (log.rev_num == i) break;
// backwards compatibility for jchris's docs
- if (parseInt(log.prev_rev || log.edit_rev) == i) break;
+ if ((parseInt(log.prev_rev || log.edit_rev) + 1) == i) break;
log = {};
};
versions.push({
+ available : !!stub,
+ missing : !stub,
rev : i == parseInt(doc._rev) ? "current" : i,
name : log.edit_name,
note : log.note
@@ -3,7 +3,12 @@
<ul>
{{#versions}}
<li>
- <a href="#/version/{{rev}}">{{rev}} {{#name}} by {{name}}{{/name}}</a>
+ {{#available}}
+ <a href="#/version/{{rev}}">{{rev}} {{#name}} by {{name}}{{/name}}</a>
+ {{/available}}
+ {{#missing}}
+ {{rev}} {{#name}} by {{name}}{{/name}}
+ {{/missing}}
{{#note}}: {{note}}{{/note}}
</li>
{{/versions}}

0 comments on commit d92dd16

Please sign in to comment.