Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

add onClick link from maps to incident reports #78

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
10 changes: 10 additions & 0 deletions showCrime/dailyIncid/templates/dailyIncid/ToBeImplemented.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% extends "base.html" %}

{% load static %}

{% block title %} To Be Implemented! {% endblock %}

{% block content %}
<h1 align=center>To Be Implemented!</h1>
<p>OpenOakland has this feature on its <a href="https://github.com/openoakland/OakCrime/issues"> repo Issues list</a>; check back.</p>
{% endblock %}
6 changes: 4 additions & 2 deletions showCrime/dailyIncid/templates/dailyIncid/heatmap.html
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,9 @@ <h3>Crime Categories</h3>


map.on('click', 'incidMarker', function(e) {
var lbl = `<b>Incid#:</b> ${e.features[0].properties.opd_rd} ${e.features[0].properties.cdateTime} ${e.features[0].properties.crimeCat}`

var url = `/dailyIncid/incidRpt/${e.features[0].properties.opd_rd}`;
var lbl = `<a href="${url}"><b>Incid#: ${e.features[0].properties.opd_rd}</b></a> ${e.features[0].properties.cdateTime} ${e.features[0].properties.crimeCat}`

new mapboxgl.Popup()
// mapzen version
Expand Down Expand Up @@ -606,4 +608,4 @@ <h3>Crime Categories</h3>
</div> <!-- eo-flex-container -->


{% endblock %}
{% endblock %}
13 changes: 9 additions & 4 deletions showCrime/dailyIncid/templates/dailyIncid/incidRpt.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,18 @@ <h2 align=center>Incident Report #{{incid.opd_rd}}</h2>
<dt>Crime category</dt><dd>{{incid.crimeCat}}</dd>
</dl>

<form id="downloadForm" action="/dailyIncid/need2login/">
<form id="downloadForm" action="/dailyIncid/ToBeImplemented">

<p align=center>Do you have
<button type="submit" style="color:blue">information to share</button>
about this incident you wish to pass along to OPD?
about this incident you wish to <b>pass along to OPD?</b>
</p>
</form>

<p align=center>Do you have
<button type="submit" style="color:blue">information to share</button>
about this incident you wish to <b>share with Oakland citizens?</b>
</p>
</form>

{% if incid.xlng != None %}

Expand Down Expand Up @@ -133,4 +138,4 @@ <h2 align=center>Incident Report #{{incid.opd_rd}}</h2>

{% endif %}

{% endblock %}
{% endblock %}
3 changes: 3 additions & 0 deletions showCrime/dailyIncid/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
url(r'^interface/$', TemplateView.as_view(template_name="dailyIncid/interface.html")),
url(r'^faq/$', TemplateView.as_view(template_name="dailyIncid/faq.html")),

url(r'^ToBeImplemented/$', TemplateView.as_view(template_name="dailyIncid/ToBeImplemented.html")),


url(r'heatmap/$', views.heatmap, name='heatmap'),
url(r'heatmap/(?P<mapType>.+)/$', views.heatmap, name='heatmapTyped'),

Expand Down