diff --git a/env/dev/resources/config.edn b/env/dev/resources/config.edn
index 6f14c22..c261b18 100644
--- a/env/dev/resources/config.edn
+++ b/env/dev/resources/config.edn
@@ -1,4 +1,6 @@
{:dev true
:port 3000
;; when :nrepl-port is set the application starts the nREPL server on load
- :nrepl-port 7000}
+ :nrepl-port 7000
+ :site-title "Project Hope"
+ :site-logo "img/ProjectHopeLogo.png"}
diff --git a/project.clj b/project.clj
index 404b692..5e77ef4 100644
--- a/project.clj
+++ b/project.clj
@@ -24,6 +24,7 @@
[mount "0.1.11"]
[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.229" :scope "provided"]
+ [org.clojure/core.memoize "0.7.1"]
[org.clojure/tools.cli "0.3.5"]
[org.clojure/tools.logging "0.3.1"]
[org.postgresql/postgresql "9.4.1212"]
diff --git a/resources/public/css/yyy-common.css b/resources/public/css/yyy-common.css
index 074e9bd..75275ff 100644
--- a/resources/public/css/yyy-common.css
+++ b/resources/public/css/yyy-common.css
@@ -78,6 +78,7 @@ header {
margin-top: 0;
width:100%;
max-width: 100%;
+ min-height: 96px; /* yes, we don't approve of pixel values; but this is to ensure the logo fits. */
background-color: rgb(7, 57, 106);
color: white;
}
@@ -238,6 +239,11 @@ th {
border-bottom: thin solid white;
}
+#site-logo {
+ padding: 0.5em;
+ float: left;
+}
+
/* but magically appears on mouseover */
#cookies:hover #more-about-cookies {
display: block;
diff --git a/resources/public/img/ProjectHopeLogo.png b/resources/public/img/ProjectHopeLogo.png
new file mode 100644
index 0000000..2c2b00f
Binary files /dev/null and b/resources/public/img/ProjectHopeLogo.png differ
diff --git a/resources/sql/queries.auto.sql b/resources/sql/queries.auto.sql
index d9a0e45..e08aa23 100644
--- a/resources/sql/queries.auto.sql
+++ b/resources/sql/queries.auto.sql
@@ -1,7 +1,7 @@
------------------------------------------------------------------------
-- File queries.sql
--
--- autogenerated by adl.to-hugsql-queries at 2018-06-29T22:21:53.869Z
+-- autogenerated by adl.to-hugsql-queries at 2018-06-30T11:35:59.388Z
--
-- See [Application Description
-- Language](https://github.com/simon-brooke/adl).
@@ -282,6 +282,8 @@ SELECT * FROM canvassers
WHERE canvassers.id = :id
ORDER BY canvassers.username,
canvassers.fullname,
+ canvassers.address_id,
+ canvassers.phone,
canvassers.email,
canvassers.id
@@ -291,6 +293,8 @@ SELECT * FROM canvassers
WHERE canvassers.username = :username
ORDER BY canvassers.username,
canvassers.fullname,
+ canvassers.address_id,
+ canvassers.phone,
canvassers.email,
canvassers.id
@@ -420,6 +424,8 @@ SELECT DISTINCT * FROM lv_authorities
SELECT DISTINCT * FROM lv_canvassers
ORDER BY lv_canvassers.username,
lv_canvassers.fullname,
+ lv_canvassers.address_id,
+ lv_canvassers.phone,
lv_canvassers.email,
lv_canvassers.id
--~ (if (:offset params) "OFFSET :offset ")
@@ -433,6 +439,8 @@ WHERE lv_canvassers.id = canvassers.id
AND canvassers.address_id = :id
ORDER BY lv_canvassers.username,
lv_canvassers.fullname,
+ lv_canvassers.address_id,
+ lv_canvassers.phone,
lv_canvassers.email,
lv_canvassers.id
@@ -444,6 +452,8 @@ WHERE lv_canvassers.id = canvassers.id
AND canvassers.authority_id = :id
ORDER BY lv_canvassers.username,
lv_canvassers.fullname,
+ lv_canvassers.address_id,
+ lv_canvassers.phone,
lv_canvassers.email,
lv_canvassers.id
@@ -455,6 +465,8 @@ WHERE lv_canvassers.id = canvassers.id
AND canvassers.elector_id = :id
ORDER BY lv_canvassers.username,
lv_canvassers.fullname,
+ lv_canvassers.address_id,
+ lv_canvassers.phone,
lv_canvassers.email,
lv_canvassers.id
@@ -466,6 +478,8 @@ WHERE canvassers.id = ln_canvassers_roles.canvasser_id
AND ln_canvassers_roles.role_id = :id
ORDER BY canvassers.username,
canvassers.fullname,
+ canvassers.address_id,
+ canvassers.phone,
canvassers.email,
canvassers.id
@@ -783,6 +797,8 @@ WHERE false
--~ (if (:id params) "OR id = :id")
ORDER BY lv_canvassers.username,
lv_canvassers.fullname,
+ lv_canvassers.address_id,
+ lv_canvassers.phone,
lv_canvassers.email,
lv_canvassers.id
--~ (if (:offset params) "OFFSET :offset ")
diff --git a/resources/sql/youyesyet.postgres.sql b/resources/sql/youyesyet.postgres.sql
index 42b0f83..e787f6f 100644
--- a/resources/sql/youyesyet.postgres.sql
+++ b/resources/sql/youyesyet.postgres.sql
@@ -5,7 +5,7 @@
--
-- auto-generated by [Application Description Language framework]
--
--- (https://github.com/simon-brooke/adl) at 20180629T163619.639Z
+-- (https://github.com/simon-brooke/adl) at 20180630T113600.308Z
--
--
-- A web-app intended to be used by canvassers campaigning for a
@@ -576,7 +576,7 @@ GRANT SELECT ON lv_electors TO admin,
CREATE VIEW lv_followupactions AS
SELECT electors.name ||', '|| electors.phone ||', '|| electors.email ||', '|| genders.id ||', '|| addresses.address ||', '|| addresses.postcode ||', '|| visits.date ||', '|| issues.id AS request_id_expanded,
followupactions.request_id,
- canvassers.username ||', '|| canvassers.fullname ||', '|| canvassers.email AS actor_expanded,
+ canvassers.username ||', '|| canvassers.fullname ||', '|| addresses.address ||', '|| addresses.postcode ||', '|| canvassers.phone ||', '|| canvassers.email AS actor_expanded,
followupactions.actor,
followupactions.date,
followupactions.notes,
@@ -741,7 +741,7 @@ GRANT SELECT ON lv_teams TO admin,
CREATE VIEW lv_visits AS
SELECT addresses.address ||', '|| addresses.postcode AS address_id_expanded,
visits.address_id,
- canvassers.username ||', '|| canvassers.fullname ||', '|| canvassers.email AS canvasser_id_expanded,
+ canvassers.username ||', '|| canvassers.fullname ||', '|| addresses.address ||', '|| addresses.postcode ||', '|| canvassers.phone ||', '|| canvassers.email AS canvasser_id_expanded,
visits.canvasser_id,
visits.date,
visits.id
diff --git a/resources/templates/about.html b/resources/templates/about.html
new file mode 100644
index 0000000..97ccd2d
--- /dev/null
+++ b/resources/templates/about.html
@@ -0,0 +1,13 @@
+{% extends "base.html" %}
+{% block big-links %}
+{% endblock %}
+{% block content %}
+
+ Although addresses in the database mostly are real, all personal data in the database
+ is randomly generated and does not represent real people.
+
+{% endblock %}
+
diff --git a/resources/templates/app.html b/resources/templates/app.html
index 024aa39..6b7bccb 100644
--- a/resources/templates/app.html
+++ b/resources/templates/app.html
@@ -1,4 +1,4 @@
-{% extends "base-authenticated.html" %}
+{% extends "base.html" %}
{% block whole-page %}
@@ -23,13 +23,13 @@
{% endblock %}
-{% block extra-script %}
+{% block extra-tail %}
+
-
{% script "/js/app.js" %}
{% endblock %}
diff --git a/resources/templates/auto/application-index.html b/resources/templates/auto/application-index.html
index db28ab2..c379eea 100644
--- a/resources/templates/auto/application-index.html
+++ b/resources/templates/auto/application-index.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/form-addresses-Address.html b/resources/templates/auto/form-addresses-Address.html
index 083db4f..ee7c8ba 100644
--- a/resources/templates/auto/form-addresses-Address.html
+++ b/resources/templates/auto/form-addresses-Address.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/form-authorities-Authority.html b/resources/templates/auto/form-authorities-Authority.html
index 19283c2..fa47abe 100644
--- a/resources/templates/auto/form-authorities-Authority.html
+++ b/resources/templates/auto/form-authorities-Authority.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/form-canvassers-Canvasser.html b/resources/templates/auto/form-canvassers-Canvasser.html
index ef82c02..ba56e4a 100644
--- a/resources/templates/auto/form-canvassers-Canvasser.html
+++ b/resources/templates/auto/form-canvassers-Canvasser.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/form-districts-District.html b/resources/templates/auto/form-districts-District.html
index eb692a7..851e38f 100644
--- a/resources/templates/auto/form-districts-District.html
+++ b/resources/templates/auto/form-districts-District.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/form-dwellings-Dwelling.html b/resources/templates/auto/form-dwellings-Dwelling.html
index 850d68c..4a164ab 100644
--- a/resources/templates/auto/form-dwellings-Dwelling.html
+++ b/resources/templates/auto/form-dwellings-Dwelling.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/form-electors-Elector.html b/resources/templates/auto/form-electors-Elector.html
index 1b6251a..d2ceff2 100644
--- a/resources/templates/auto/form-electors-Elector.html
+++ b/resources/templates/auto/form-electors-Elector.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/form-followupactions-Followupaction.html b/resources/templates/auto/form-followupactions-Followupaction.html
index ef4bd47..9486e73 100644
--- a/resources/templates/auto/form-followupactions-Followupaction.html
+++ b/resources/templates/auto/form-followupactions-Followupaction.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
@@ -73,7 +73,7 @@ actor
{% else %}
diff --git a/resources/templates/auto/form-followupmethods-Followupmethod.html b/resources/templates/auto/form-followupmethods-Followupmethod.html
index 5a5171c..0ebe89e 100644
--- a/resources/templates/auto/form-followupmethods-Followupmethod.html
+++ b/resources/templates/auto/form-followupmethods-Followupmethod.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/form-followuprequests-Followuprequest.html b/resources/templates/auto/form-followuprequests-Followuprequest.html
index ee12d56..810e20a 100644
--- a/resources/templates/auto/form-followuprequests-Followuprequest.html
+++ b/resources/templates/auto/form-followuprequests-Followuprequest.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/form-genders-Gender.html b/resources/templates/auto/form-genders-Gender.html
index 238a638..33c1930 100644
--- a/resources/templates/auto/form-genders-Gender.html
+++ b/resources/templates/auto/form-genders-Gender.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/form-intentions-Intention.html b/resources/templates/auto/form-intentions-Intention.html
index be4870d..b2287ec 100644
--- a/resources/templates/auto/form-intentions-Intention.html
+++ b/resources/templates/auto/form-intentions-Intention.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/form-issues-Issue.html b/resources/templates/auto/form-issues-Issue.html
index 085cccc..cd89da2 100644
--- a/resources/templates/auto/form-issues-Issue.html
+++ b/resources/templates/auto/form-issues-Issue.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/form-options-Option.html b/resources/templates/auto/form-options-Option.html
index d52fcda..5e4524b 100644
--- a/resources/templates/auto/form-options-Option.html
+++ b/resources/templates/auto/form-options-Option.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/form-roles-Role.html b/resources/templates/auto/form-roles-Role.html
index 991549a..ed2f57a 100644
--- a/resources/templates/auto/form-roles-Role.html
+++ b/resources/templates/auto/form-roles-Role.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
@@ -68,7 +68,7 @@ members
{% else %}
diff --git a/resources/templates/auto/form-teams-Team.html b/resources/templates/auto/form-teams-Team.html
index ef80fdf..6f4bc0d 100644
--- a/resources/templates/auto/form-teams-Team.html
+++ b/resources/templates/auto/form-teams-Team.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
@@ -109,7 +109,7 @@ members
{% else %}
@@ -132,7 +132,7 @@ organisers
{% else %}
diff --git a/resources/templates/auto/form-visits-Visit.html b/resources/templates/auto/form-visits-Visit.html
index 1a504dd..9482227 100644
--- a/resources/templates/auto/form-visits-Visit.html
+++ b/resources/templates/auto/form-visits-Visit.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
@@ -73,7 +73,7 @@ canvasser_id
{% else %}
diff --git a/resources/templates/auto/list-addresses-Addresses.html b/resources/templates/auto/list-addresses-Addresses.html
index 8fed2b1..aa6e297 100644
--- a/resources/templates/auto/list-addresses-Addresses.html
+++ b/resources/templates/auto/list-addresses-Addresses.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/list-authorities-Authorities.html b/resources/templates/auto/list-authorities-Authorities.html
index 98e5db9..d479410 100644
--- a/resources/templates/auto/list-authorities-Authorities.html
+++ b/resources/templates/auto/list-authorities-Authorities.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/list-canvassers-Canvassers.html b/resources/templates/auto/list-canvassers-Canvassers.html
index 06f07a2..2e2daf8 100644
--- a/resources/templates/auto/list-canvassers-Canvassers.html
+++ b/resources/templates/auto/list-canvassers-Canvassers.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/list-districts-Districts.html b/resources/templates/auto/list-districts-Districts.html
index 10aa521..5aa04b4 100644
--- a/resources/templates/auto/list-districts-Districts.html
+++ b/resources/templates/auto/list-districts-Districts.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/list-dwellings-Dwellings.html b/resources/templates/auto/list-dwellings-Dwellings.html
index ff846fd..d4a5468 100644
--- a/resources/templates/auto/list-dwellings-Dwellings.html
+++ b/resources/templates/auto/list-dwellings-Dwellings.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/list-electors-Electors.html b/resources/templates/auto/list-electors-Electors.html
index e55df8e..78da6fe 100644
--- a/resources/templates/auto/list-electors-Electors.html
+++ b/resources/templates/auto/list-electors-Electors.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/list-followupactions-Followupactions.html b/resources/templates/auto/list-followupactions-Followupactions.html
index 25138cd..c0c7c29 100644
--- a/resources/templates/auto/list-followupactions-Followupactions.html
+++ b/resources/templates/auto/list-followupactions-Followupactions.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/list-followupmethods-Followupmethods.html b/resources/templates/auto/list-followupmethods-Followupmethods.html
index 51cab99..fba6c0f 100644
--- a/resources/templates/auto/list-followupmethods-Followupmethods.html
+++ b/resources/templates/auto/list-followupmethods-Followupmethods.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/list-followuprequests-Followuprequests.html b/resources/templates/auto/list-followuprequests-Followuprequests.html
index 4df3180..1a92655 100644
--- a/resources/templates/auto/list-followuprequests-Followuprequests.html
+++ b/resources/templates/auto/list-followuprequests-Followuprequests.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/list-genders-Genders.html b/resources/templates/auto/list-genders-Genders.html
index e579f6a..d421968 100644
--- a/resources/templates/auto/list-genders-Genders.html
+++ b/resources/templates/auto/list-genders-Genders.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/list-intentions-Intentions.html b/resources/templates/auto/list-intentions-Intentions.html
index 3e11a92..de75da8 100644
--- a/resources/templates/auto/list-intentions-Intentions.html
+++ b/resources/templates/auto/list-intentions-Intentions.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/list-issues-Issues.html b/resources/templates/auto/list-issues-Issues.html
index 50875c0..af0eb2c 100644
--- a/resources/templates/auto/list-issues-Issues.html
+++ b/resources/templates/auto/list-issues-Issues.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/list-options-Options.html b/resources/templates/auto/list-options-Options.html
index b7bce93..3479834 100644
--- a/resources/templates/auto/list-options-Options.html
+++ b/resources/templates/auto/list-options-Options.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/list-roles-Roles.html b/resources/templates/auto/list-roles-Roles.html
index 09fe18d..8a2a73f 100644
--- a/resources/templates/auto/list-roles-Roles.html
+++ b/resources/templates/auto/list-roles-Roles.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/list-teams-Teams.html b/resources/templates/auto/list-teams-Teams.html
index 582741b..bbc027c 100644
--- a/resources/templates/auto/list-teams-Teams.html
+++ b/resources/templates/auto/list-teams-Teams.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/auto/list-visits-Visits.html b/resources/templates/auto/list-visits-Visits.html
index ed998ee..bdcfddb 100644
--- a/resources/templates/auto/list-visits-Visits.html
+++ b/resources/templates/auto/list-visits-Visits.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-
{% block head %}
diff --git a/resources/templates/base-authenticated.html b/resources/templates/base-authenticated.html
deleted file mode 100644
index cc067b0..0000000
--- a/resources/templates/base-authenticated.html
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-
-
-
-
-
-
-
-
{{title}}
-
-
- {% block whole-page %}
- {% block top %}
-
-
-

-
-
-
-
- {{title}}
-
-
- {% endblock %}
-
-
-
- {% block big-links %}
- {% endblock %}
-
-
- {% block content %}
- {% endblock %}
-
-
- {% block foot %}
-
- {% endblock %}
- {% endblock %}
-
- {% block extra-script %}
- {% endblock %}
-
-
-
-
-
-
diff --git a/resources/templates/base-unauthenticated.html b/resources/templates/base-unauthenticated.html
deleted file mode 100644
index cfb278f..0000000
--- a/resources/templates/base-unauthenticated.html
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
{% block title %}{% endblock %}{{title}}
-
-
-
-
-

-
-
-
-
- {{title}}
-
-
-
-
-
- {% block big-links %}
- {% endblock %}
-
-
- {% block content %}
- {% endblock %}
-
-
-
-
-
-
diff --git a/resources/templates/base.html b/resources/templates/base.html
index e9add78..227b668 100644
--- a/resources/templates/base.html
+++ b/resources/templates/base.html
@@ -7,10 +7,15 @@
-
{{title}}
+
{{site-title}}: {{title}}
+ {% block extra-head %}
+
+
+ {% endblock %}
{% block whole-page %}
+
{% block top %}
{% endblock %}
@@ -39,15 +42,18 @@
{% block big-links %}
+
{% endblock %}
{% block content %}
+
{% endblock %}
{% block foot %}
+