Skip to content

Commit

Permalink
#4228 tracking org name, id and location name, id on group and org pages
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandru-m-g committed Jun 13, 2016
1 parent a08efc6 commit 503eb12
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def generate_template_data(self, id, group_info, custom_dict):

template_data = {
'data': {
'country_id': group_info['id'],
'country_name': group_info['name'],
'country_title': group_info.get('title', group_info['name']),
'topline_chart_sections': self._create_sections(top_line_items, charts_config_data),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{% extends "crisis/crisis-base.html" %}

{# The lines below are for analytics #}
{% block analytics_group_names %}['{{ c.group_dict.name }}']{% endblock %}
{% block analytics_group_ids %}['{{ c.group_dict.id }}']{% endblock %}

{% block subtitle %}
{{ c.group_dict.display_name }}
{% endblock %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{% extends "crisis/crisis-base.html" %}

{# The lines below are for analytics #}
{% block analytics_group_names %}['{{ data.country_name }}']{% endblock %}
{% block analytics_group_ids %}['{{ data.country_id }}']{% endblock %}

{% block subtitle %}{{ data.country_title }}{% endblock %}
{% block crisis_title %} {{ data.country_title }} {% endblock %}
{% block crisis_actions %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{% extends "page.html" %}

{# The lines below are for analytics #}
{% block analytics_org_name %}{{ data.org_info.name }}{% endblock %}
{% block analytics_org_id %}{{ data.org_info.id }}{% endblock %}

{% block subtitle %}{{ data.org_info.display_name }}{% endblock %}

{% block breadcrumb_content %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{% extends "organization/read_base.html" %}

{# The lines below are for analytics #}
{% block analytics_org_name %}{{ c.group_dict.name }}{% endblock %}
{% block analytics_org_id %}{{ c.group_dict.id }}{% endblock %}

{% set can_create_dataset = h.check_access('package_create', {'organization_id': c.group_dict.id, 'owner_org': c.group_dict.id}) %}
{% set can_edit = h.check_access('organization_update', {'id': c.group_dict.id}) %}
{% set can_actions = can_create_dataset or can_edit %}
Expand Down

0 comments on commit 503eb12

Please sign in to comment.