diff --git a/dataviva/api/attrs/views.py b/dataviva/api/attrs/views.py index 9a9e829c0..8b7070a92 100644 --- a/dataviva/api/attrs/views.py +++ b/dataviva/api/attrs/views.py @@ -1,5 +1,6 @@ import gzip import json +import requests from StringIO import StringIO from sqlalchemy import func, asc, desc, and_ @@ -493,6 +494,104 @@ def trade_partner(): status=(200 if returned_entries.count() else 404) ) +@mod.route('/health_region/') +@view_cache.cached(key_prefix=api_cache_key("attrs_health_region")) +def health_region(): + r = requests.get('http://api.staging.dataviva.info/metadata/health_region') + data = [] + response = r.json() + lang = request.args.get('lang', 'pt') + + for key in response: + region = {} + region['id'] = key + region['name'] = response[key]['name_' + lang] + region['color'] = '-' + data.append(region) + + return Response( + json.dumps({'data': data}), + status=200 + ) + +@mod.route('/demographic_information//') +@view_cache.cached(key_prefix=api_cache_key("attrs_demographic_information")) +def demographic_information(attr): + r = requests.get('http://api.staging.dataviva.info/metadata/' + attr) + data = [] + response = r.json() + lang = request.args.get('lang', 'pt') + + for key in response: + region = {} + region['id'] = key + region['name'] = response[key]['name_' + lang] + data.append(region) + + return Response( + json.dumps({'data': data}), + status=200 + ) + +@mod.route('/establishment_information//') +@view_cache.cached(key_prefix=api_cache_key("attrs_establishment_information")) +def establishment_information(attr): + r = requests.get('http://api.staging.dataviva.info/metadata/' + attr) + data = [] + response = r.json() + lang = request.args.get('lang', 'pt') + + for key in response: + region = {} + region['id'] = key + region['name'] = response[key]['name_' + lang] + data.append(region) + + return Response( + json.dumps({'data': data}), + status=200 + ) + + +@mod.route('/datasus//') +@view_cache.cached(key_prefix=api_cache_key("attrs_datasus")) +def datasus(attr): + r = requests.get('http://api.staging.dataviva.info/metadata/' + attr) + data = [] + response = r.json() + lang = request.args.get('lang', 'pt') + + for key in response: + region = {} + region['id'] = key + region['name'] = response[key]['name_' + lang] + data.append(region) + + return Response( + json.dumps({'data': data}), + status=200 + ) + + +@mod.route('/port/') +# @view_cache.cached(key_prefix=api_cache_key("attrs_port")) +def port(): + r = requests.get('http://api.staging.dataviva.info/metadata/port') + data = [] + response = r.json() + lang = request.args.get('lang', 'pt') + + for key in response: + region = {} + region['id'] = key + region['name'] = response[key]['name_' + lang] + data.append(region) + + return Response( + json.dumps({'data': data}), + status=200 + ) + @mod.route('/datasets/') def datasets(): diff --git a/dataviva/apps/bar/__init__.py b/dataviva/apps/bar/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/dataviva/apps/bar/templates/bar/index.html b/dataviva/apps/bar/templates/bar/index.html new file mode 100644 index 000000000..da87e5bca --- /dev/null +++ b/dataviva/apps/bar/templates/bar/index.html @@ -0,0 +1,36 @@ + + + + + {% include "graphs/css_assets.html" %} + {% include "graphs/js_assets.html" %} + + + + {% include "graphs/tools.html" %} +
+
+
+
+
+ +
+ + + + + + + + diff --git a/dataviva/apps/bar/views.py b/dataviva/apps/bar/views.py new file mode 100644 index 000000000..8f9afe218 --- /dev/null +++ b/dataviva/apps/bar/views.py @@ -0,0 +1,135 @@ +# -*- coding: utf-8 -*- +from flask import Blueprint, render_template, g, request, abort +from dataviva.apps.general.views import get_locale +from dataviva.translations.dictionary import dictionary +from dataviva.apps.title.views import get_title +import urllib +import json + +mod = Blueprint('bar', __name__, + template_folder='templates', + url_prefix='//bar', + static_folder='static') + + +@mod.url_value_preprocessor +def pull_lang_code(endpoint, values): + g.locale = values.pop('lang_code') + + +@mod.url_defaults +def add_language_code(endpoint, values): + values.setdefault('lang_code', get_locale()) + + +@mod.before_request +def before_request(): + g.page_type = mod.name + + +def location_service(id_ibge): + locations = { + 1: "region", #todo + 2: "state", + 4: "mesoregion", + 5: "microregion", + 7: "municipality" + } + + return (locations[len(id_ibge)], id_ibge) + + +def product_service(product): + if len(product) == 2: + return ('product_section', product[:2]) + elif len(product) == 4: + return ('product_chapter', product[2:4]) + else: + return ('product', product[2:]) + +def wld_service(wld): + if wld.isdigit(): + wld = '%03d' % int(wld) + + wlds = { + 2: "continent", + 3: "country" + } + + return (wlds[len(wld)], wld) + +def occupation_service(occupation): + occupations = { + 1: "occupation_group", + 4: "occupation_family" + } + + return (occupations[len(occupation)], occupation) + +def industry_service(industry): + if len(industry) == 1: + return ('industry_section', industry) + elif len(industry) == 3: + return ('industry_division', industry[1:]) + else: + return ('industry_class', industry[1:]) + + +@mod.route('///') +def index(dataset, x, y): + product = request.args.get('product') + id_ibge = request.args.get('id_ibge') + type = request.args.get('type') + wld = request.args.get('wld') + establishment = request.args.get('establishment') + occupation = request.args.get('occupation') + industry = request.args.get('industry') + counts = request.args.getlist('count') + + title_attrs = {} + + options = request.args.get('options') + subtitle = request.args.get('subtitle', '') + + filters = [] + + for count in counts: + filters.append(('count', count)) + + if type: + filters.append(('type', type)) + title_attrs['type'] = type + + if request.args.get('filters'): + filters.append(('filters', request.args.get('filters'))) + + if wld: + filters.append(wld_service(wld)) + title_attrs[wld_service(wld)[0]] = wld_service(wld)[1] + + if occupation: + filters.append(occupation_service(occupation)) + title_attrs[occupation_service(occupation)[0]] = occupation_service(occupation)[1] + + if industry: + filters.append(industry_service(industry)) + title_attrs[industry_service(industry)[0]] = industry_service(industry)[1] + + if product: + filters.append(product_service(product)) + title_attrs[product_service(product)[0]] = product_service(product)[1] + + if id_ibge: + filters.append(location_service(id_ibge)) + title_attrs[location_service(id_ibge)[0]] = location_service(id_ibge)[1] + + if establishment: + filters.append(('establishment', establishment)) + + filters = urllib.urlencode(filters) + graph_title, graph_subtitle = get_title(dataset, y.split(',')[0], 'bar', title_attrs) + + return render_template('bar/index.html', dataset=dataset, x=x, y=y, filters=filters, options=options, + subtitle=subtitle, graph_title=graph_title or '', graph_subtitle=graph_subtitle or '', + dictionary=json.dumps(dictionary())) + \ No newline at end of file diff --git a/dataviva/apps/basic_course/templates/basic_course/graphs-enrollments.html b/dataviva/apps/basic_course/templates/basic_course/graphs-enrollments.html index 4485eaa4b..ff4c1cfe0 100644 --- a/dataviva/apps/basic_course/templates/basic_course/graphs-enrollments.html +++ b/dataviva/apps/basic_course/templates/basic_course/graphs-enrollments.html @@ -6,50 +6,60 @@

{%trans%}Enrollments By{%endtrans%}

{% if location.id | length != 9 %} {%trans%}Municipality{%endtrans%} {% endif %} + {% if location.id %} {%trans%}School{%endtrans%} + {% endif %}
- {% if graph %} - - {% elif location.id | length != 9 %} - - {% else %} - - {% endif %}
\ No newline at end of file diff --git a/dataviva/apps/basic_course/templates/basic_course/index.html b/dataviva/apps/basic_course/templates/basic_course/index.html index 578a12ae9..46d72877e 100644 --- a/dataviva/apps/basic_course/templates/basic_course/index.html +++ b/dataviva/apps/basic_course/templates/basic_course/index.html @@ -20,8 +20,8 @@ {% endblock facebook_metadata %} {% block content %} - +
-
+ +
@@ -174,3 +127,9 @@

{% trans %}Average Age{% endtrans %} ({{ he

{% endblock content %} +{% block script %} + + + + +{% endblock %} \ No newline at end of file diff --git a/dataviva/apps/basic_course/templates/basic_course/tab-enrollments.html b/dataviva/apps/basic_course/templates/basic_course/tab-enrollments.html index 7063af90f..376b2739c 100644 --- a/dataviva/apps/basic_course/templates/basic_course/tab-enrollments.html +++ b/dataviva/apps/basic_course/templates/basic_course/tab-enrollments.html @@ -1,35 +1,7 @@
-

{% trans %}Enrollments{% endtrans %} ({{header.course_year}})

- -
- - {% if location.id | length != 9 %} -
-
- {% trans %}Main Municipality{% endtrans %} - {% trans %}by Number of Enrolled Students{% endtrans %} -
-
-

{{ body.city_name }} - {{ body.city_state.upper() }}

-
- {{body.city_enrolled | max_digits(3, True)}} {{ body.city_enrolled | magnitude }} -
-
-
- -
-
- {% trans %}Main School{% endtrans %} - {% trans %}by Number of Enrolled Students{% endtrans %} -
-
-

{{ body.school_name }}

-
- {{body.school_enrolled | max_digits(3, True)}} {{ body.school_enrolled | magnitude }} -
-
-
- {% endif %} -
+

{% trans %}Enrollments{% endtrans %} (2016)

+
+
+ diff --git a/dataviva/apps/basic_course/templates/basic_course/tab-general.html b/dataviva/apps/basic_course/templates/basic_course/tab-general.html index fcdba3e90..f7c8cecdb 100644 --- a/dataviva/apps/basic_course/templates/basic_course/tab-general.html +++ b/dataviva/apps/basic_course/templates/basic_course/tab-general.html @@ -1,6 +1,6 @@

{% trans %}General Profile{% endtrans %}

- {% if not location.id %} + {% if not location.id %}

{% trans %}The highest number of enrollments in the {% endtrans %}{{basic_course.name()}} {% trans %}course/field of study in Brazil is in the municipality of {% endtrans %}{{body["city_name"]}} - {{body.city_state.upper()}}, {% trans %}with{% endtrans %} {{body["city_enrolled"] | max_digits(3) }} {{body["city_enrolled"] | magnitude }} @@ -50,35 +50,16 @@

{% trans %}General Profile{% endtrans %}

{% trans %}students per class in average{% endtrans %}.

{% endif %} {% endif %} -
-
-

{% trans %}Enrollments{% endtrans %} ({{header.course_year}})

-
-
{% trans %}Main School{% endtrans %} {% trans %}by Number of Enrolled Students{% endtrans %}
-
- {{body.school_name }} - {{body.school_enrolled | max_digits(3, True) }} - {{ (body.school_enrolled | magnitude).lower() }} -
- {% if location.id | length < 9 %} -
{% trans %}Main Municipality{% endtrans %} {% trans %}by Number of Enrolled Students{% endtrans %}
-
- {{body.city_name }} - {{body.city_state.upper()}} - {{body.city_enrolled | max_digits(3, True)}} - {{ (body.city_enrolled | magnitude).lower() }} -
- {% endif %} -
+ + diff --git a/dataviva/apps/basic_course/views.py b/dataviva/apps/basic_course/views.py index 280288580..ddc70a0ab 100644 --- a/dataviva/apps/basic_course/views.py +++ b/dataviva/apps/basic_course/views.py @@ -13,6 +13,36 @@ url_prefix='//basic_course', static_folder='static') +def location_depth(bra_id): + locations = { + 1: "region", + 3: "state", + 5: "mesoregion", + 7: "microregion", + 9: "municipality" + } + + return locations[len(bra_id)] + +def handle_region_bra_id(bra_id): + return { + "1": "1", + "2": "2", + "3": "5", + "4": "3", + "5": "4" + }[bra_id] + + +def _location_service(depth, location): + if depth == 'region': + return handle_region_bra_id(location.id) + if depth == 'mesoregion': + return str(location.id_ibge)[:2] + str(location.id_ibge)[-2:] + if depth == 'microregion': + return str(location.id_ibge)[:2] + str(location.id_ibge)[-3:] + else: + return location.id_ibge @mod.before_request def before_request(): @@ -33,7 +63,7 @@ def add_language_code(endpoint, values): def graphs(basic_course_id, tab): basic_course = Course_sc.query.filter_by(id=basic_course_id).first_or_404() location = Bra.query.filter_by(id=request.args.get('bra_id')).first() - return render_template('basic_course/graphs-'+tab+'.html', basic_course=basic_course, location=location, graph=None) + return render_template('basic_course/graphs-' + tab + '.html', basic_course=basic_course, location=location, graph=None) @mod.route('/', defaults={'tab': 'general'}) @@ -43,7 +73,7 @@ def index(course_sc_id, tab): basic_course = Course_sc.query.filter_by(id=course_sc_id).first_or_404() bra_id = request.args.get('bra_id') bra_id = bra_id if bra_id != 'all' else None - + menu = request.args.get('menu') url = request.args.get('url') graph = {} @@ -132,6 +162,16 @@ def index(course_sc_id, tab): sc_max_year = db.session.query(func.max(Yc_sc.year)).first()[0] + id_ibge = None + + + location = Bra.query.filter(Bra.id == bra_id).first() + + if bra_id: + depth = location_depth(bra_id) + id_ibge = _location_service(depth, location) + is_municipality = True if depth == 'municipality' else False + if tab not in tabs: abort(404) @@ -141,4 +181,4 @@ def index(course_sc_id, tab): if header['course_enrolled'] is None or sc_max_year != header['course_year']: abort(404) else: - return render_template('basic_course/index.html', header=header, body=body, body_class='perfil-estado', location=location, basic_course=basic_course, tab=tab, graph=graph) + return render_template('basic_course/index.html', header=header, body=body, body_class='perfil-estado', location=location, id_ibge=id_ibge, basic_course=basic_course, tab=tab, graph=graph) diff --git a/dataviva/apps/embed/views.py b/dataviva/apps/embed/views.py index d52f6d8b9..771741ffe 100644 --- a/dataviva/apps/embed/views.py +++ b/dataviva/apps/embed/views.py @@ -492,11 +492,9 @@ def networks(type="hs"): @mod.route('/shorten/', methods=['GET', 'POST']) def shorten_url(): - if request.method == 'POST': - - long_url = urllib.unquote( - request.form["url"].encode('utf-8')).decode("utf-8") + response = request.form['url'] if 'url' in request.form else request.json['url'] + long_url = urllib.unquote(response.encode('utf-8')).decode('utf-8') short = Short.query.filter_by(long_url=long_url).first() if short is None: diff --git a/dataviva/apps/general/views.py b/dataviva/apps/general/views.py index 1c67b2ebd..96c5c9069 100644 --- a/dataviva/apps/general/views.py +++ b/dataviva/apps/general/views.py @@ -40,7 +40,7 @@ def before_request(): g.accounts = True if ACCOUNTS in ["True","true","Yes","yes","Y","y",1] else False g.color = "#af1f24" g.dictionary = json.dumps(dictionary()) - g.attr_version = 15 + g.attr_version = 17 g.production = False if DEBUG else True g.contact_form = ContactForm() g.signup_form = SignupForm() diff --git a/dataviva/apps/health/__init__.py b/dataviva/apps/health/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/dataviva/apps/health/static/saude-bg.jpg b/dataviva/apps/health/static/saude-bg.jpg new file mode 100644 index 000000000..7bf4516aa Binary files /dev/null and b/dataviva/apps/health/static/saude-bg.jpg differ diff --git a/dataviva/apps/health/templates/health/graphs-beds.html b/dataviva/apps/health/templates/health/graphs-beds.html new file mode 100644 index 000000000..d7e5a8617 --- /dev/null +++ b/dataviva/apps/health/templates/health/graphs-beds.html @@ -0,0 +1,35 @@ +
+ +
+
+ +
+
+
\ No newline at end of file diff --git a/dataviva/apps/health/templates/health/graphs-equipments.html b/dataviva/apps/health/templates/health/graphs-equipments.html new file mode 100644 index 000000000..ffec5d354 --- /dev/null +++ b/dataviva/apps/health/templates/health/graphs-equipments.html @@ -0,0 +1,39 @@ + \ No newline at end of file diff --git a/dataviva/apps/health/templates/health/graphs-establishments.html b/dataviva/apps/health/templates/health/graphs-establishments.html new file mode 100644 index 000000000..0a1c88e7a --- /dev/null +++ b/dataviva/apps/health/templates/health/graphs-establishments.html @@ -0,0 +1,58 @@ + \ No newline at end of file diff --git a/dataviva/apps/health/templates/health/graphs-professionals.html b/dataviva/apps/health/templates/health/graphs-professionals.html new file mode 100644 index 000000000..bde31fb49 --- /dev/null +++ b/dataviva/apps/health/templates/health/graphs-professionals.html @@ -0,0 +1,35 @@ +
+ +
+
+ +
+
+
\ No newline at end of file diff --git a/dataviva/apps/health/templates/health/index.html b/dataviva/apps/health/templates/health/index.html new file mode 100644 index 000000000..42f17fe7d --- /dev/null +++ b/dataviva/apps/health/templates/health/index.html @@ -0,0 +1,122 @@ + +{% extends "base.html" %} + + +{% block content %} + + +
+
+ +
+
+ + + + +
+ + + +
+
+ {% include "health/tab-general.html" %} + {% include "health/tab-establishments.html" %} + {% include "health/tab-equipments.html" %} + {% include "health/tab-beds.html" %} + {% include "health/tab-professionals.html" %} +
+
+
+ +
+{% if tab != "general" %} + {% include "health/graphs-" + tab + ".html" %} +{% endif %} +
+ +{% endblock content %} + +{% block script %} + + + + +{% endblock %} \ No newline at end of file diff --git a/dataviva/apps/health/templates/health/tab-beds.html b/dataviva/apps/health/templates/health/tab-beds.html new file mode 100644 index 000000000..748606b57 --- /dev/null +++ b/dataviva/apps/health/templates/health/tab-beds.html @@ -0,0 +1,7 @@ +
+ +

{% trans %}Beds{% endtrans %} (2015)

+ +
+
+
\ No newline at end of file diff --git a/dataviva/apps/health/templates/health/tab-equipments.html b/dataviva/apps/health/templates/health/tab-equipments.html new file mode 100644 index 000000000..5632da8d1 --- /dev/null +++ b/dataviva/apps/health/templates/health/tab-equipments.html @@ -0,0 +1,5 @@ +
+

{% trans %}Equipments{% endtrans %} (2015)

+
+
+
\ No newline at end of file diff --git a/dataviva/apps/health/templates/health/tab-establishments.html b/dataviva/apps/health/templates/health/tab-establishments.html new file mode 100644 index 000000000..75603536b --- /dev/null +++ b/dataviva/apps/health/templates/health/tab-establishments.html @@ -0,0 +1,7 @@ +
+ +

{% trans %}Establishments{% endtrans %} (2015)

+ +
+
+
\ No newline at end of file diff --git a/dataviva/apps/health/templates/health/tab-general.html b/dataviva/apps/health/templates/health/tab-general.html new file mode 100644 index 000000000..36a6ad3e8 --- /dev/null +++ b/dataviva/apps/health/templates/health/tab-general.html @@ -0,0 +1,48 @@ +
+

Perfil Geral

+ +

+ +
+ + +
+

{% trans %}Beds{% endtrans %} (2015)

+ {% trans %}More details{% endtrans %} + +
+ +
+

{% trans %}Professionals{% endtrans %} (2015)

+ {% trans %}More details{% endtrans %} + +
+ +
+

{% trans %}Equipments{% endtrans %} (2015)

+ {% trans %}More details{% endtrans %} + +
+ +
+
\ No newline at end of file diff --git a/dataviva/apps/health/templates/health/tab-professionals.html b/dataviva/apps/health/templates/health/tab-professionals.html new file mode 100644 index 000000000..c12cf1b2e --- /dev/null +++ b/dataviva/apps/health/templates/health/tab-professionals.html @@ -0,0 +1,7 @@ +
+ +

{% trans %}Professionals{% endtrans %} (2015)

+ +
+
+
\ No newline at end of file diff --git a/dataviva/apps/health/views.py b/dataviva/apps/health/views.py new file mode 100644 index 000000000..e4ef0ea3b --- /dev/null +++ b/dataviva/apps/health/views.py @@ -0,0 +1,60 @@ +# encoding: utf-8 + +from flask import Blueprint, render_template, g, request, abort +from dataviva.apps.general.views import get_locale +import requests + +mod = Blueprint('health', __name__, + template_folder='templates', + url_prefix='//health', + static_folder='static') + +@mod.before_request +def before_request(): + g.page_type = 'category' + + +@mod.url_value_preprocessor +def pull_lang_code(endpoint, values): + g.locale = values.pop('lang_code') + + +@mod.url_defaults +def add_language_code(endpoint, values): + values.setdefault('lang_code', get_locale()) + +@mod.route('/', defaults={'tab': 'general'}) +@mod.route('//') +def index(cnes_id, tab): + response = requests.get('http://api.staging.dataviva.info/cnes/id/name_pt/?id=' + cnes_id + '&limit=1').json() + + establishment = { + 'id': response['data'][0][0], + 'name' : response['data'][0][1].title() + } + # establishment = { + # 'name' : '' + # } + + graph = {} + url = request.args.get('url', '') + menu = request.args.get('menu', '') + if menu and url: + graph['menu'] = menu + graph['url'] = '/' + menu.split('-')[-1] + '/' + url + + return render_template('health/index.html', tab=tab, establishment=establishment, graph=graph) + +@mod.route('//graphs/', methods=['POST']) +def graphs(cnes_id, tab): + response = requests.get('http://api.staging.dataviva.info/cnes/id/name_pt/?id=' + cnes_id + '&limit=1').json() + establishment = {'id': response['data'][0][0], 'name': response['data'][0][1]} + + graph = {} + url = request.args.get('url', '') + menu = request.args.get('menu', '') + if menu and url: + graph['menu'] = menu + graph['url'] = menu.split('-')[-1] + '/' + url + + return render_template('health/graphs-' + tab + '.html', establishment=establishment, graph=graph) diff --git a/dataviva/apps/help/templates/help/index.html b/dataviva/apps/help/templates/help/index.html index 9b1a46191..8df8469fb 100644 --- a/dataviva/apps/help/templates/help/index.html +++ b/dataviva/apps/help/templates/help/index.html @@ -128,6 +128,34 @@ {%trans%}Basic Courses{%endtrans%}
+ + + + + + + +
@@ -301,6 +329,50 @@

+ + + + + +
+

+ +

+
+ + @@ -348,6 +420,10 @@

{% include "help/tab-classifications-universities.html"%} {% include "help/tab-classifications-majors.html"%} {% include "help/tab-classifications-basic-courses.html"%} + {% include "help/tab-classifications-demographic-informations.html"%} + {% include "help/tab-classifications-establishment-informations.html"%} + {% include "help/tab-classifications-datasus.html"%} + {% include "help/tab-classifications-ports.html"%} diff --git a/dataviva/apps/help/templates/help/tab-classifications-datasus.html b/dataviva/apps/help/templates/help/tab-classifications-datasus.html new file mode 100644 index 000000000..2dc29b33b --- /dev/null +++ b/dataviva/apps/help/templates/help/tab-classifications-datasus.html @@ -0,0 +1,25 @@ +
+
+

Datasus

+
+
+
+
+ + + + + + + +
{% trans %}ID{% endtrans %}{% trans %}Name{% endtrans %}
+
+
+
+
+
+
+ +{% block js_assets %} + +{% endblock js_assets %} diff --git a/dataviva/apps/help/templates/help/tab-classifications-demographic-informations.html b/dataviva/apps/help/templates/help/tab-classifications-demographic-informations.html new file mode 100644 index 000000000..e5625230f --- /dev/null +++ b/dataviva/apps/help/templates/help/tab-classifications-demographic-informations.html @@ -0,0 +1,25 @@ +
+
+

{%trans%}Demographic Information{%endtrans%}

+
+
+
+
+ + + + + + + +
{% trans %}ID{% endtrans %}{% trans %}Name{% endtrans %}
+
+
+
+
+
+
+ +{% block js_assets %} + +{% endblock js_assets %} diff --git a/dataviva/apps/help/templates/help/tab-classifications-establishment-informations.html b/dataviva/apps/help/templates/help/tab-classifications-establishment-informations.html new file mode 100644 index 000000000..6497a405e --- /dev/null +++ b/dataviva/apps/help/templates/help/tab-classifications-establishment-informations.html @@ -0,0 +1,25 @@ +
+
+

{%trans%}Establishment Information{%endtrans%}

+
+
+
+
+ + + + + + + +
{% trans %}ID{% endtrans %}{% trans %}Name{% endtrans %}
+
+
+
+
+
+
+ +{% block js_assets %} + +{% endblock js_assets %} diff --git a/dataviva/apps/help/templates/help/tab-classifications-ports.html b/dataviva/apps/help/templates/help/tab-classifications-ports.html new file mode 100644 index 000000000..b8abe66e4 --- /dev/null +++ b/dataviva/apps/help/templates/help/tab-classifications-ports.html @@ -0,0 +1,25 @@ +
+
+

{%trans%}Port{%endtrans%}

+
+
+
+
+ + + + + + + +
{% trans %}ID{% endtrans %}{% trans %}Name{% endtrans %}
+
+
+
+
+
+
+ +{% block js_assets %} + +{% endblock js_assets %} diff --git a/dataviva/apps/industry/templates/industry/graphs-opportunities.html b/dataviva/apps/industry/templates/industry/graphs-opportunities.html index 7639fcbb5..3fb41e8cf 100644 --- a/dataviva/apps/industry/templates/industry/graphs-opportunities.html +++ b/dataviva/apps/industry/templates/industry/graphs-opportunities.html @@ -3,18 +3,23 @@

{% trans %}Preview{% endtrans %}:

{% trans %}Economic Activities{% endtrans %}

- {% trans %}Rings{% endtrans %} + + {% trans %}Rings{% endtrans %} +
- \ No newline at end of file + diff --git a/dataviva/apps/location/templates/location/graphs-health.html b/dataviva/apps/location/templates/location/graphs-health.html new file mode 100644 index 000000000..7700dfc1c --- /dev/null +++ b/dataviva/apps/location/templates/location/graphs-health.html @@ -0,0 +1,174 @@ +
+ +
+
+ +
+
+
diff --git a/dataviva/apps/location/templates/location/graphs-trade-partner.html b/dataviva/apps/location/templates/location/graphs-trade-partner.html index a2238daec..8c4662401 100644 --- a/dataviva/apps/location/templates/location/graphs-trade-partner.html +++ b/dataviva/apps/location/templates/location/graphs-trade-partner.html @@ -5,94 +5,177 @@

{% trans %}Preview{% endtrans %}:

{% trans %}Trade Balance{% endtrans %}

{% trans %}Location{% endtrans %}

{% trans %}Exports By{% endtrans %}

{% trans %}Product{% endtrans %} - {% trans %}Destination{% endtrans %} {% if not is_municipality %} {% trans %}Municipality{% endtrans %} {% endif %} + {% trans %}Port{% endtrans %} + +

{% trans %}Imports By{% endtrans %}

{% trans %}Product{% endtrans %} {% trans %}Origin{% endtrans %} {% if not is_municipality %} {% trans %}Municipality{% endtrans %} {% endif %} + {% trans %}Port{% endtrans %} +
-
- - - diff --git a/dataviva/apps/product/templates/product/index.html b/dataviva/apps/product/templates/product/index.html index 1418c858f..6e2467955 100644 --- a/dataviva/apps/product/templates/product/index.html +++ b/dataviva/apps/product/templates/product/index.html @@ -26,6 +26,7 @@ {% block content %} +