Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zone space coach reports #4236

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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