Skip to content

Commit

Permalink
Merge pull request #4236 from rtibbles/zone_space_coach_reports
Browse files Browse the repository at this point in the history
Zone space coach reports
  • Loading branch information
jamalex committed Aug 13, 2015
2 parents 68c6ffe + 10a45d5 commit 30f8bd1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions kalite/coachreports/static/css/coachreports/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
border-bottom: 3px solid #5AA685;
padding: 20px 0;
margin-bottom: 3%;
max-width: 95%;
}

#display-topic-report {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h2>
<td>

{# Translators: this is a verb; by clicking this link, the user will be able to coach students. #}
<a title="{% blocktrans with groupname=group.name %}Coach group {{ groupname }}.{% endblocktrans %}" href="{% url 'coach_reports' zone_id=zone_id %}{{ facility_id }}/{% if group.id %}{{ group.id }}{% else %}{{ ungrouped_id }}{% endif %}/">
<a title="{% blocktrans with groupname=group.name %}Coach group {{ groupname }}.{% endblocktrans %}" href="{% url 'coach_reports' zone_id=zone_id %}/{{ facility_id }}/{% if group.id %}{{ group.id }}{% else %}{{ ungrouped_id }}{% endif %}/">
<div class="sparklines" sparkType="bar" sparkBarColor="green">
<!--
{{ group.total_logins }},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,17 @@ Handlebars.registerHelper('withItem', function(object, options) {
// A little bit of magic to let us use Django JS Reverse directly from inside a Handlebars template
// Simply pass any arguments that you might otherwise use in order
Handlebars.registerHelper('url', function(url_name) {
if (window.Urls) {
var ref;
// Make check more robust so that undefined urls also return empty string
if (((ref = window.Urls) !== undefined ? ref[url_name] : void 0) !== undefined) {
arguments = Array.prototype.slice.call(arguments, 1, -1);
return window.Urls[url_name].apply(window.Urls, arguments);
} else {
if (!window.Urls) {
console.warn("Django Reverse JS not loaded");
} else if (!window.Urls[url_name]) {
console.warn("Url name invalid");
}
return "";
}
});
Expand Down

0 comments on commit 30f8bd1

Please sign in to comment.