Skip to content

Commit

Permalink
[#1583][s]: Unintrusively including info on resource viewer.
Browse files Browse the repository at this point in the history
  • Loading branch information
teajaymars committed Jan 24, 2012
1 parent a7a01c3 commit 274dd05
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ckan/lib/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def resource_star_rating(resource_dict):

if stars==0:
message = _('When we last checked, this resource was not available.'),
return literal('<span class="hover-for-help"><span class="help-text">%s</span>404?</span>' % message)
return literal('<span class="hover-for-help semi-link"><span class="help-text">%s</span>404?</span>' % message)

captions = [
_('Available under an open license.'),
Expand All @@ -360,7 +360,7 @@ def resource_star_rating(resource_dict):
caption += literal('<span class="%s">%s&nbsp; "%s"</span>' % (fail, text_stars, captions[i-1]))

star_icons = stars * icon('star')
return literal('<span class="no-underline hover-for-help"><span class="help-text">%s</span><a href="http://lab.linkeddata.deri.ie/2010/star-scheme-by-example/" target="_blank">%s</a></span>' % (caption, star_icons))
return literal('<span class="hover-for-help"><span class="help-text">%s</span><a href="http://lab.linkeddata.deri.ie/2010/star-scheme-by-example/" target="_blank">%s</a></span>' % (caption, star_icons))

def resource_link(resource_dict, package_id):
text = resource_display_name(resource_dict)
Expand Down
7 changes: 3 additions & 4 deletions ckan/public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,8 @@ tbody tr.table-empty td {
font-weight: normal;
}
.hover-for-help {
border-bottom: 1px dashed #000;
position: relative;
}
.hover-for-help.no-underline {
border-bottom: none;
}
.hover-for-help > .help-text {
position: absolute;
top: 18px;
Expand All @@ -237,6 +233,9 @@ tbody tr.table-empty td {
.hover-for-help:hover > .help-text {
display: block;
}
.semi-link {
border-bottom: 1px dashed #000;
}

/* =============== */
/* MinorNavigation */
Expand Down
2 changes: 2 additions & 0 deletions ckan/templates/package/resource_read.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
</span>
</py:if>
</dd>
<dt>Quality</dt>
<dd>${h.resource_star_rating(c.resource)}</dd>
</dl>
</div>

Expand Down

0 comments on commit 274dd05

Please sign in to comment.