Commit 8a20f779 authored by José Bascuñan's avatar José Bascuñan

Merge branch 'develop' into '11-incorporar-google-tag-manager-en-vez-de-google-analytics'

# Conflicts:
#   project/context_processors.py
#   project/local_settings.py.default
#   project/settings.py
parents b6c5e38e 21ddcd6a
Pipeline #7650 passed with stages
in 13 minutes and 54 seconds
......@@ -81,6 +81,7 @@ To deploy this project, you need to configure settings in your environment
* EMAIL_USE_TLS: if 'True', uses TLS when sending emails
* GOOGLE_ANALYTICS_CODE: The code for google analytics
* GOOGLE_MAPS_TOKEN: Api key for access to service from google maps
* RECAPTCHA_PUBLIC_KEY: public Key for recaptcha service
* RECAPTCHA_PRIVATE_KEY: private key for recaptcha service
......
......@@ -11,6 +11,7 @@ from django import template
# enums
from companies.enums import AddManagerRequestStatuses
from permit_requests.models import PermitRequestStatus
register = template.Library()
......@@ -52,3 +53,11 @@ def is_url_with_parameter(url):
return False
else:
return True
@register.filter
def get_description(id):
try:
status = PermitRequestStatus.objects.get(id=id)
return status.description
except AttributeError:
return ''
......@@ -409,6 +409,7 @@ class UpdatePermitRequestStatusView(BaseAPIView):
extra_data['stage'] = status.stage
extra_data['status'] = status.base_status.name
extra_data['permit_request_status_id'] = status.id
if not message:
message = (
......
extends base.pug
- load i18n
- load i18n utils
block options
......@@ -82,6 +82,12 @@ block content
b Estado
.col-md-8
| {{ permit_request.status.base_status.name }}
if permit_request.status
.row.py-2
.col-md-4
b Descripción
.col-md-8
| {{ permit_request.status.description }}
section.section-colored
.section-header
......@@ -98,9 +104,13 @@ block content
p.mb-0
| Emisor:
b {{permit_request.permit.public_service}}
p.mb-0
| Estado:
b {{notification.status}}
p
| Estado:
b {{notification.status}}
if notification.extra_data.permit_request_status_id
| Descripción:
b {{notification.extra_data.permit_request_status_id|get_description}}
.col-lg-3.text-right
small.text-success.font-weight-medium
| {{permit_request.get_status_display|capfirst}}
......
......@@ -6,7 +6,7 @@ extends base.pug
block javascripts
script(src="{% static 'js/projects/map.js' %}")
script(src="https://maps.googleapis.com/maps/api/js?key=AIzaSyABauQ4s_k8LFbx_2KtPiNGeyPWA7rujsY&libraries=drawing,geometry&callback=initMap")
script(src="https://maps.googleapis.com/maps/api/js?key={{google_maps_token}}&libraries=drawing,geometry&callback=initMap")
block javascript_data
script(type="text/javascript").
......
......@@ -7,7 +7,7 @@ block javascripts
script(src="{% static 'js/formset.js' %}")
script(src="{% static 'js/projects/create.js' %}")
script(src="{% static 'js/projects/map.js' %}")
script(src="https://maps.googleapis.com/maps/api/js?key=AIzaSyABauQ4s_k8LFbx_2KtPiNGeyPWA7rujsY&libraries=drawing&callback=initMap")
script(src="https://maps.googleapis.com/maps/api/js?key={{google_maps_token}}&libraries=drawing&callback=initMap")
block javascript_data
script(type="text/javascript").
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment