Skip to content

Commit

Permalink
only show revisions list of populated
Browse files Browse the repository at this point in the history
  • Loading branch information
Dale Harvey committed Jun 26, 2011
1 parent df7dd35 commit ad8951e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _attachments/index.html
Expand Up @@ -78,13 +78,15 @@ <h1 id="title">CouchDB</h1>

<script type="text/html" id="document_tpl">
<div id="document"><pre><code>{{json}}</code></pre></div>
{{#hasrevisions}}
<ul>
<li class="header">Revisions</li>
{{#revisions}}
{{#available}}<li><a href="#/db/{{db}}/{{doc}}/rev/{{rev}}/">{{rev}}</a></li>{{/available}}
{{^available}}<li><span class="unavailable">{{rev}}</span>{{/available}}
{{/revisions}}
</ul>
{{/hasrevisions}}
<div style="padding:10px;">
<a href="#/db/{{db}}/{{doc}}/_delete/" class="button warning">Delete</a>
</div>
Expand Down
1 change: 1 addition & 0 deletions _attachments/js/mobile.futon.js
Expand Up @@ -227,6 +227,7 @@ var MobileFuton = (function () {
renderer.render('document_tpl', { db: db
, doc:doc
, json:JSON.stringify(json, null, ' ')
, hasrevisions: revs.length > 0
, revisions: revs });
});
});
Expand Down

0 comments on commit ad8951e

Please sign in to comment.