Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added icons and improved help and session status

  • Loading branch information...
commit 50928dee0265765b883dc326902bfd1def04e30e 1 parent 16fc037
@knabar knabar authored
View
BIN  resources/images/icons.psd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
7 rooibos/help/__init__.py
@@ -10,7 +10,8 @@ def get_tooltip(reference):
if tooltip:
return tooltip
- try:
+ try:
+ cwd = os.getcwd()
os.chdir(os.path.dirname(__file__)) # for wikipedia module
sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '../../externals/pywikipedia')))
import wikipedia
@@ -20,10 +21,12 @@ def get_tooltip(reference):
match = _tooltip_re.search(text)
if match:
tooltip = ' '.join(match.group('tooltip').split())
- cache.set(key, tooltip)
+ cache.set(key, tooltip, 24 * 60 * 60)
return tooltip
except Exception, e:
print e
pass
+ finally:
+ os.chdir(cwd)
return "No tooltip available."
View
2  rooibos/help/templates/help_help.html
@@ -1 +1 @@
-<a href="{{ link }}" class="contexthelp" target="rooibos_help" title="{{ tooltip }}">?</a>
+<a href="{{ link }}" class="icon help-icon" target="rooibos_help" title="{{ tooltip }}"><span>?</span></a>
View
26 rooibos/static/css/master.css
@@ -217,6 +217,32 @@ div.fieldvalue-edit span.fs-order input {
font-style: italic;
}
+.icon {
+ display: -moz-inline-box; /* Firefox 2 */
+ display: inline-block;
+ vertical-align: bottom;
+ background-image: url('/static/images/icons.png');
+ width: 20px;
+ height: 20px;
+ text-decoration: none;
+}
+
+.icon * {
+ visibility: hidden;
+}
+
+.help-icon {
+ background-position: -40px 0px;
+}
+
+.or-icon {
+ background-position: 0px 0px;
+}
+
+.remove-icon {
+ background-position: -20px 0px;
+}
+
#stats { background-color: #ddd; font-size: 65%; padding: 5px;
z-index: 1000; position: absolute; right: 5px; top: 50px;
-moz-opacity: .7; opacity: .7;}
View
BIN  rooibos/static/images/icons.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
7 rooibos/ui/templates/main.html
@@ -5,8 +5,6 @@
{% block content %}
-<h1>Welcome</h1>
-
<div id="comments">
{% get_comment_list for flatpages.flatpage 1 as comments %}
{% for comment in comments %}
@@ -15,8 +13,11 @@
{% endfor %}
</div>
+<h1>Welcome</h1>
+
<div>
- <a href="{% url solr-search %}">Explore local content</a>
+ <a href="{% url solr-search %}">Explore local content</a> {% help 'explore' %}
+
</div>
{% endblock %}
View
2  rooibos/ui/templates/ui_session_status.html
@@ -1,4 +1,4 @@
{% load humanize %}
{% if selected %}<a href="{% url solr-selected %}">{% endif %}
-{{ selected|apnumber|capfirst }} record{{ selected|pluralize }} selected
+{{ selected }} record{{ selected|pluralize }} selected
{% if selected %}</a>{% endif %}
Please sign in to comment.
Something went wrong with that request. Please try again.