Skip to content

Commit

Permalink
[dataset/view,template][xs]: minor ux so that we don't display read m…
Browse files Browse the repository at this point in the history
…ore when no notes and in notes field we say 'no notes yet, add some'.
  • Loading branch information
rgrp committed Aug 5, 2011
1 parent 0c24684 commit 7f3ae90
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/template/dataset-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ CKAN.Templates.datasetView = ' \
<div class="dataset view" dataset-id="${dataset.id}"> \
<div class="extract"> \
${dataset.snippet} \
{{if dataset.snippet.length > 50}} \
<a href="#anchor-notes">Read more</a> \
{{/if}} \
</div> \
<div class="tags"> \
{{if dataset.tags.length}} \
Expand Down Expand Up @@ -49,6 +51,9 @@ CKAN.Templates.datasetView = ' \
<h3 id="anchor-notes">Notes</h3> \
<div class="notes-body"> \
{{html dataset.notesHtml}} \
{{if !dataset.notes || dataset.notes.length === 0}} \
<em>No notes yet. Click to add some ...</em> \
{{/if}} \
</div> \
</div> \
<div class="details subsection"> \
Expand Down

0 comments on commit 7f3ae90

Please sign in to comment.