Further work on auto-generation of components

This commit is contained in:
Simon Brooke 2018-06-14 21:33:20 +01:00
parent 706e42f483
commit bfb5a67266
43 changed files with 2254 additions and 911 deletions

2
.gitignore vendored
View file

@ -22,3 +22,5 @@ pom.xml.asc
profiles\.clj
.bowerrc
bower.json
src/clj/youyesyet/scratchpad\.clj

View file

@ -8,3 +8,11 @@ insert into issues (id, url) values ('Currency', 'https://www.yyy.scot/wiki/issu
insert into issues (id, url) values ('Monarchy', 'https://www.yyy.scot/wiki/issues/Monarchy');
insert into issues (id, url) values ('Defence', 'https://www.yyy.scot/wiki/issues/Defence');
insert into genders (id ) values ('Female');
insert into genders (id ) values ('Male');
insert into genders (id ) values ('Non-binary');
insert into genders (id ) values ('Unknown');

View file

@ -1,15 +1,15 @@
-- enough data to get the system working and real logins
insert into addresses (id, address, postcode, latitude, longitude)
values (5, 'West Croft, Standingstone, Auchencairn', 'DG7 1RF', 54.822389, -3.920265);
insert into addresses (address, postcode, latitude, longitude)
values ('West Croft, Standingstone, Auchencairn', 'DG7 1RF', 54.822389, -3.920265);
insert into dwellings (id, address_id, sub_address)
values (5, 5, '');
insert into electors (id, name, dwelling_id, gender)
values (11, 'Simon Brooke', 5, 'Male');
insert into electors (name, dwelling_id, gender)
values ('Simon Brooke', 1, 'Male');
insert into authorities (id) values ('GitHub');
insert into canvassers (username, fullname, elector_id, address_id, authority_id, authorised)
values ('simon_brooke', 'Simon Brooke', 11, 5, 'GitHub', true);
values ('simon_brooke', 'Simon Brooke', 2, 2, 'GitHub', true);

View file

@ -1,9 +1,11 @@
-- File queries.sql
-- autogenerated by adl.to-hugsql-queries at
-- 2018-06-11T20:39:10.396Z
-- See [Application Description Language](https://github.com/simon-brooke/adl).
------------------------------------------------------------------------
-- File queries.sql
--
-- autogenerated by adl.to-hugsql-queries at 2018-06-14T17:56:42.346Z
--
-- See [Application Description
-- Language](https://github.com/simon-brooke/adl).
------------------------------------------------------------------------
-- :name create-address! :! :n
-- :doc creates a new address record
@ -12,13 +14,15 @@ INSERT INTO addresses (address,
phone,
district_id,
latitude,
longitude)
longitude,
locality)
VALUES (:address,
:postcode,
:phone,
:district_id,
:latitude,
:longitude)
:longitude,
:locality)
returning id
-- :name create-authority! :! :n
@ -133,16 +137,6 @@ VALUES (:url,
:id)
returning id
-- :name create-issueexpertise! :! :n
-- :doc creates a new issueexpertise record
INSERT INTO issueexpertise (canvasser_id,
issue_id,
method_id)
VALUES (:canvasser_id,
:issue_id,
:method_id)
returning Id
-- :name create-option! :! :n
-- :doc creates a new option record
INSERT INTO options (id)
@ -155,14 +149,6 @@ INSERT INTO roles (name)
VALUES (:name)
returning id
-- :name create-rolemembership! :! :n
-- :doc creates a new rolemembership record
INSERT INTO rolememberships (role_id,
canvasser_id)
VALUES (:role_id,
:canvasser_id)
returning Id
-- :name create-team! :! :n
-- :doc creates a new team record
INSERT INTO teams (name,
@ -175,22 +161,6 @@ VALUES (:name,
:longitude)
returning id
-- :name create-teammembership! :! :n
-- :doc creates a new teammembership record
INSERT INTO teammemberships (team_id,
canvasser_id)
VALUES (:team_id,
:canvasser_id)
returning Id
-- :name create-teamorganisership! :! :n
-- :doc creates a new teamorganisership record
INSERT INTO teamorganiserships (team_id,
canvasser_id)
VALUES (:team_id,
:canvasser_id)
returning Id
-- :name create-visit! :! :n
-- :doc creates a new visit record
INSERT INTO visits (address_id,
@ -261,11 +231,6 @@ WHERE intentions.Id = :Id
DELETE FROM issues
WHERE issues.id = :id
-- :name delete-issueexpertise! :! :n
-- :doc updates an existing issueexpertise record
DELETE FROM issueexpertise
WHERE issueexpertise.Id = :Id
-- :name delete-option! :! :n
-- :doc updates an existing option record
DELETE FROM options
@ -276,26 +241,11 @@ WHERE options.id = :id
DELETE FROM roles
WHERE roles.id = :id
-- :name delete-rolemembership! :! :n
-- :doc updates an existing rolemembership record
DELETE FROM rolememberships
WHERE rolememberships.Id = :Id
-- :name delete-team! :! :n
-- :doc updates an existing team record
DELETE FROM teams
WHERE teams.id = :id
-- :name delete-teammembership! :! :n
-- :doc updates an existing teammembership record
DELETE FROM teammemberships
WHERE teammemberships.Id = :Id
-- :name delete-teamorganisership! :! :n
-- :doc updates an existing teamorganisership record
DELETE FROM teamorganiserships
WHERE teamorganiserships.Id = :Id
-- :name delete-visit! :! :n
-- :doc updates an existing visit record
DELETE FROM visits
@ -343,6 +293,9 @@ ORDER BY districts.name,
-- :doc selects an existing dwelling record
SELECT * FROM dwellings
WHERE dwellings.id = :id
ORDER BY dwellings.address_id,
dwellings.sub-address,
dwellings.id
-- :name get-elector :? :1
-- :doc selects an existing elector record
@ -351,12 +304,16 @@ WHERE electors.id = :id
ORDER BY electors.name,
electors.phone,
electors.email,
electors.gender,
electors.id
-- :name get-followupaction :? :1
-- :doc selects an existing followupaction record
SELECT * FROM followupactions
WHERE followupactions.id = :id
ORDER BY followupactions.date,
followupactions.notes,
followupactions.id
-- :name get-followupmethod :? :1
-- :doc selects an existing followupmethod record
@ -367,6 +324,10 @@ WHERE followupmethods.id = :id
-- :doc selects an existing followuprequest record
SELECT * FROM followuprequests
WHERE followuprequests.id = :id
ORDER BY followuprequests.elector_id,
followuprequests.visit_id,
followuprequests.issue_id,
followuprequests.id
-- :name get-gender :? :1
-- :doc selects an existing gender record
@ -383,11 +344,6 @@ WHERE intentions.Id = :Id
SELECT * FROM issues
WHERE issues.id = :id
-- :name get-issueexpertise :? :1
-- :doc selects an existing issueexpertise record
SELECT * FROM issueexpertise
WHERE issueexpertise.Id = :Id
-- :name get-option :? :1
-- :doc selects an existing option record
SELECT * FROM options
@ -400,10 +356,12 @@ WHERE roles.id = :id
ORDER BY roles.name,
roles.id
-- :name get-rolemembership :? :1
-- :doc selects an existing rolemembership record
SELECT * FROM rolememberships
WHERE rolememberships.Id = :Id
-- :name get-role-by-name :? :1
-- :doc selects an existing role record
SELECT * FROM roles
WHERE roles.name = :name
ORDER BY roles.name,
roles.id
-- :name get-team :? :1
-- :doc selects an existing team record
@ -412,20 +370,13 @@ WHERE teams.id = :id
ORDER BY teams.name,
teams.id
-- :name get-teammembership :? :1
-- :doc selects an existing teammembership record
SELECT * FROM teammemberships
WHERE teammemberships.Id = :Id
-- :name get-teamorganisership :? :1
-- :doc selects an existing teamorganisership record
SELECT * FROM teamorganiserships
WHERE teamorganiserships.Id = :Id
-- :name get-visit :? :1
-- :doc selects an existing visit record
SELECT * FROM visits
WHERE visits.id = :id
ORDER BY visits.address_id,
visits.date,
visits.id
-- :name list-addresses :? :*
-- :doc lists all existing address records
@ -494,9 +445,9 @@ ORDER BY canvassers.username,
-- :name list-canvassers-by-role :? :*
-- :doc links all existing canvasser records related to a given role
SELECT *
FROM canvassers, link_canvassers_
WHERE canvassers.id = link_canvassers_.canvasser_id
AND link_canvassers_.role_id = :id
FROM canvassers, ln_canvassers_roles
WHERE canvassers.id = ln_canvassers_roles.canvasser_id
AND ln_canvassers_roles.role_id = :id
ORDER BY canvassers.username,
canvassers.fullname,
canvassers.email,
@ -513,6 +464,9 @@ ORDER BY districts.name,
-- :name list-dwellings :? :*
-- :doc lists all existing dwelling records
SELECT * FROM dwellings
ORDER BY dwellings.address_id,
dwellings.sub-address,
dwellings.id
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
@ -521,6 +475,9 @@ SELECT * FROM dwellings
SELECT *
FROM dwellings
WHERE dwellings.address_id = :id
ORDER BY dwellings.address_id,
dwellings.sub-address,
dwellings.id
-- :name list-electors :? :*
-- :doc lists all existing elector records
@ -528,6 +485,7 @@ SELECT * FROM electors
ORDER BY electors.name,
electors.phone,
electors.email,
electors.gender,
electors.id
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
@ -540,6 +498,7 @@ WHERE electors.dwelling_id = :id
ORDER BY electors.name,
electors.phone,
electors.email,
electors.gender,
electors.id
-- :name list-electors-by-gender :? :*
@ -550,11 +509,15 @@ WHERE electors.gender = :id
ORDER BY electors.name,
electors.phone,
electors.email,
electors.gender,
electors.id
-- :name list-followupactions :? :*
-- :doc lists all existing followupaction records
SELECT * FROM followupactions
ORDER BY followupactions.date,
followupactions.notes,
followupactions.id
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
@ -563,12 +526,18 @@ SELECT * FROM followupactions
SELECT *
FROM followupactions
WHERE followupactions.actor = :id
ORDER BY followupactions.date,
followupactions.notes,
followupactions.id
-- :name list-followupactions-by-followuprequest :? :*
-- :doc lists all existing followupaction records related to a given followuprequest
SELECT *
FROM followupactions
WHERE followupactions.request_id = :id
ORDER BY followupactions.date,
followupactions.notes,
followupactions.id
-- :name list-followupmethods :? :*
-- :doc lists all existing followupmethod records
@ -579,6 +548,10 @@ SELECT * FROM followupmethods
-- :name list-followuprequests :? :*
-- :doc lists all existing followuprequest records
SELECT * FROM followuprequests
ORDER BY followuprequests.elector_id,
followuprequests.visit_id,
followuprequests.issue_id,
followuprequests.id
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
@ -587,24 +560,40 @@ SELECT * FROM followuprequests
SELECT *
FROM followuprequests
WHERE followuprequests.elector_id = :id
ORDER BY followuprequests.elector_id,
followuprequests.visit_id,
followuprequests.issue_id,
followuprequests.id
-- :name list-followuprequests-by-followupmethod :? :*
-- :doc lists all existing followuprequest records related to a given followupmethod
SELECT *
FROM followuprequests
WHERE followuprequests.method_id = :id
ORDER BY followuprequests.elector_id,
followuprequests.visit_id,
followuprequests.issue_id,
followuprequests.id
-- :name list-followuprequests-by-issue :? :*
-- :doc lists all existing followuprequest records related to a given issue
SELECT *
FROM followuprequests
WHERE followuprequests.issue_id = :id
ORDER BY followuprequests.elector_id,
followuprequests.visit_id,
followuprequests.issue_id,
followuprequests.id
-- :name list-followuprequests-by-visit :? :*
-- :doc lists all existing followuprequest records related to a given visit
SELECT *
FROM followuprequests
WHERE followuprequests.visit_id = :id
ORDER BY followuprequests.elector_id,
followuprequests.visit_id,
followuprequests.issue_id,
followuprequests.id
-- :name list-genders :? :*
-- :doc lists all existing gender records
@ -636,30 +625,6 @@ SELECT *
FROM intentions
WHERE intentions.visit_id = :id
-- :name list-issueexpertise :? :*
-- :doc lists all existing issueexpertise records
SELECT * FROM issueexpertise
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-issueexpertise-by-canvasser :? :*
-- :doc lists all existing issueexpertise records related to a given canvasser
SELECT *
FROM issueexpertise
WHERE issueexpertise.canvasser_id = :id
-- :name list-issueexpertise-by-followupmethod :? :*
-- :doc lists all existing issueexpertise records related to a given followupmethod
SELECT *
FROM issueexpertise
WHERE issueexpertise.method_id = :id
-- :name list-issueexpertise-by-issue :? :*
-- :doc lists all existing issueexpertise records related to a given issue
SELECT *
FROM issueexpertise
WHERE issueexpertise.issue_id = :id
-- :name list-issues :? :*
-- :doc lists all existing issue records
SELECT * FROM issues
@ -672,24 +637,6 @@ SELECT * FROM options
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-rolememberships :? :*
-- :doc lists all existing rolemembership records
SELECT * FROM rolememberships
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-rolememberships-by-canvasser :? :*
-- :doc lists all existing rolemembership records related to a given canvasser
SELECT *
FROM rolememberships
WHERE rolememberships.canvasser_id = :id
-- :name list-rolememberships-by-role :? :*
-- :doc lists all existing rolemembership records related to a given role
SELECT *
FROM rolememberships
WHERE rolememberships.role_id = :id
-- :name list-roles :? :*
-- :doc lists all existing role records
SELECT * FROM roles
@ -701,48 +648,12 @@ ORDER BY roles.name,
-- :name list-roles-by-canvasser :? :*
-- :doc links all existing role records related to a given canvasser
SELECT *
FROM roles, link_roles_canvassers
WHERE roles.id = link_roles_canvassers.role_id
AND link_roles_canvassers.canvasser_id = :id
FROM roles, ln_canvassers_roles
WHERE roles.id = ln_canvassers_roles.role_id
AND ln_canvassers_roles.canvasser_id = :id
ORDER BY roles.name,
roles.id
-- :name list-teammemberships :? :*
-- :doc lists all existing teammembership records
SELECT * FROM teammemberships
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-teammemberships-by-canvasser :? :*
-- :doc lists all existing teammembership records related to a given canvasser
SELECT *
FROM teammemberships
WHERE teammemberships.canvasser_id = :id
-- :name list-teammemberships-by-team :? :*
-- :doc lists all existing teammembership records related to a given team
SELECT *
FROM teammemberships
WHERE teammemberships.team_id = :id
-- :name list-teamorganiserships :? :*
-- :doc lists all existing teamorganisership records
SELECT * FROM teamorganiserships
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-teamorganiserships-by-canvasser :? :*
-- :doc lists all existing teamorganisership records related to a given canvasser
SELECT *
FROM teamorganiserships
WHERE teamorganiserships.canvasser_id = :id
-- :name list-teamorganiserships-by-team :? :*
-- :doc lists all existing teamorganisership records related to a given team
SELECT *
FROM teamorganiserships
WHERE teamorganiserships.team_id = :id
-- :name list-teams :? :*
-- :doc lists all existing team records
SELECT * FROM teams
@ -754,9 +665,9 @@ ORDER BY teams.name,
-- :name list-teams-by-canvasser :? :*
-- :doc links all existing team records related to a given canvasser
SELECT *
FROM teams, link_teams_canvassers
WHERE teams.id = link_teams_canvassers.team_id
AND link_teams_canvassers.canvasser_id = :id
FROM teams, ln_canvassers_teams
WHERE teams.id = ln_canvassers_teams.team_id
AND ln_canvassers_teams.canvasser_id = :id
ORDER BY teams.name,
teams.id
@ -771,6 +682,9 @@ ORDER BY teams.name,
-- :name list-visits :? :*
-- :doc lists all existing visit records
SELECT * FROM visits
ORDER BY visits.address_id,
visits.date,
visits.id
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
@ -779,12 +693,18 @@ SELECT * FROM visits
SELECT *
FROM visits
WHERE visits.address_id = :id
ORDER BY visits.address_id,
visits.date,
visits.id
-- :name list-visits-by-canvasser :? :*
-- :doc lists all existing visit records related to a given canvasser
SELECT *
FROM visits
WHERE visits.canvasser_id = :id
ORDER BY visits.address_id,
visits.date,
visits.id
-- :name search-strings-address :? :1
-- :doc selects existing address records having any string field matching `:pattern` by substring match
@ -836,6 +756,9 @@ ORDER BY districts.name,
SELECT * FROM dwellings
WHERE
sub-address LIKE '%:pattern%'
ORDER BY dwellings.address_id,
dwellings.sub-address,
dwellings.id
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
@ -849,6 +772,7 @@ name LIKE '%:pattern%'
ORDER BY electors.name,
electors.phone,
electors.email,
electors.gender,
electors.id
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
@ -858,6 +782,9 @@ ORDER BY electors.name,
SELECT * FROM followupactions
WHERE
notes LIKE '%:pattern%'
ORDER BY followupactions.date,
followupactions.notes,
followupactions.id
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
@ -873,6 +800,10 @@ id LIKE '%:pattern%'
-- :doc selects existing followuprequest records having any string field matching `:pattern` by substring match
SELECT * FROM followuprequests
WHERE
ORDER BY followuprequests.elector_id,
followuprequests.visit_id,
followuprequests.issue_id,
followuprequests.id
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
@ -900,13 +831,6 @@ url LIKE '%:pattern%'
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-issueexpertise :? :1
-- :doc selects existing issueexpertise records having any string field matching `:pattern` by substring match
SELECT * FROM issueexpertise
WHERE
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-option :? :1
-- :doc selects existing option records having any string field matching `:pattern` by substring match
SELECT * FROM options
@ -925,13 +849,6 @@ ORDER BY roles.name,
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-rolemembership :? :1
-- :doc selects existing rolemembership records having any string field matching `:pattern` by substring match
SELECT * FROM rolememberships
WHERE
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-team :? :1
-- :doc selects existing team records having any string field matching `:pattern` by substring match
SELECT * FROM teams
@ -942,24 +859,13 @@ ORDER BY teams.name,
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-teammembership :? :1
-- :doc selects existing teammembership records having any string field matching `:pattern` by substring match
SELECT * FROM teammemberships
WHERE
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-teamorganisership :? :1
-- :doc selects existing teamorganisership records having any string field matching `:pattern` by substring match
SELECT * FROM teamorganiserships
WHERE
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-visit :? :1
-- :doc selects existing visit records having any string field matching `:pattern` by substring match
SELECT * FROM visits
WHERE
ORDER BY visits.address_id,
visits.date,
visits.id
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
@ -971,7 +877,8 @@ SET address = :address,
phone = :phone,
district_id = :district_id,
latitude = :latitude,
longitude = :longitude
longitude = :longitude,
locality = :locality
WHERE addresses.id = :id
-- :name update-canvasser! :! :n
@ -1045,27 +952,12 @@ SET url = :url,
id = :id
WHERE issues.id = :id
-- :name update-issueexpertise! :! :n
-- :doc updates an existing issueexpertise record
UPDATE issueexpertise
SET canvasser_id = :canvasser_id,
issue_id = :issue_id,
method_id = :method_id
WHERE issueexpertise.Id = :Id
-- :name update-role! :! :n
-- :doc updates an existing role record
UPDATE roles
SET name = :name
WHERE roles.id = :id
-- :name update-rolemembership! :! :n
-- :doc updates an existing rolemembership record
UPDATE rolememberships
SET role_id = :role_id,
canvasser_id = :canvasser_id
WHERE rolememberships.Id = :Id
-- :name update-team! :! :n
-- :doc updates an existing team record
UPDATE teams
@ -1075,20 +967,6 @@ SET name = :name,
longitude = :longitude
WHERE teams.id = :id
-- :name update-teammembership! :! :n
-- :doc updates an existing teammembership record
UPDATE teammemberships
SET team_id = :team_id,
canvasser_id = :canvasser_id
WHERE teammemberships.Id = :Id
-- :name update-teamorganisership! :! :n
-- :doc updates an existing teamorganisership record
UPDATE teamorganiserships
SET team_id = :team_id,
canvasser_id = :canvasser_id
WHERE teamorganiserships.Id = :Id
-- :name update-visit! :! :n
-- :doc updates an existing visit record
UPDATE visits

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File application-index.html generated 2018-06-11T18:42:42.835Z by adl.to-selmer-templates.
<!-- File application-index.html generated 2018-06-14T19:58:20.328Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -123,16 +123,6 @@ Requests for a followup with an issue expert
</p>
</dd>
<dt>
<a href=''>
Rolemembership
</a>
</dt>
<dd>
<p>
Link table
</p>
</dd>
<dt>
<a href='list-roles-Roles'>
Role
</a>
@ -156,17 +146,7 @@ District
</dt>
<dd>
<p>
Electoral districts
</p>
</dd>
<dt>
<a href=''>
Teamorganisership
</a>
</dt>
<dd>
<p>
Link table
Electoral districts: TODO: Shape (polygon) information will need to be added, for use in maps.
</p>
</dd>
<dt>
@ -180,16 +160,6 @@ Actions taken on followup requests.
</p>
</dd>
<dt>
<a href=''>
Issueexpertise
</a>
</dt>
<dd>
<p>
Link table
</p>
</dd>
<dt>
<a href='list-options-Options'>
Option
</a>
@ -200,16 +170,6 @@ Options in the election or referendum being canvassed on
</p>
</dd>
<dt>
<a href=''>
Teammembership
</a>
</dt>
<dd>
<p>
Link table
</p>
</dd>
<dt>
<a href='list-followupmethods-Followupmethods'>
Followupmethod
</a>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-addresses-Address.html generated 2018-06-11T18:42:42.819Z by adl.to-selmer-templates.
<!-- File form-addresses-Address.html generated 2018-06-14T19:58:20.317Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -0,0 +1,131 @@
{% extends "base.html" %}
<!-- File form-authorities-Authority.html generated 2018-06-14T19:58:20.335Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta content='width=device-width, initial-scale=1' name='viewport'/>
<link href='css/yyy-common.css' type='text/css' rel='stylesheet'/>
<link href='css/yyy-site.css' type='text/css' rel='stylesheet'/>
<link href='css/spinner.css' type='text/css' rel='stylesheet'/>
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow'/>
<title>
{{site-title}}: {{title}}
</title>
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-authorities-Authority' method='POST'>
{% csrf-field %}
<p class='widget'>
<label for='id'>
id
</label>
{% ifwritable authorities id %}
<input id='id' name='id' type='text' value='{{record.id}}'/>
{% else %}
{% ifreadable authorities id%}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='id'>
id
</label>
{% ifwritable authorities %}
<input id='id' name='id' type='text' value='{{record.id}}'/>
{% else %}
{% ifreadable authorities %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='id'>
id
</label>
{% ifwritable authorities %}
<input id='id' name='id' type='text' value='{{record.id}}'/>
{% else %}
{% ifreadable authorities %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this authorities record
</label>
<input id='save-button' name='save-button' class='action-safe' type=':submit' value='Save!'/>
</p>
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this authorities record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type=':submit' value='Delete!'/>
</p>
</form>
</div>
{% endblock %}
{% block foot %}
<footer>
<div id='credits'>
<div>
<img height='24' width='24' src='img/credits/ric-logo.png'/>
A project of the
<a href='https://radical.scot/'>
Radical Independence Campaign
</a>
||
Version {{version}}
</div>
<div>
<img src='img/credits/luminus-logo.png' alt='Clojure' width='16' height='16'/>
Built with
<a href='http://www.luminusweb.net/'>
LuminusWeb
</a>
||
<img src='img/credits/clojure-icon.gif' alt='Clojure' width='16' height='16'/>
Powered by
<a href='http://clojure.org'>
Clojure
</a>
||
<img src='img/credits/github-logo-transparent.png' alt='GitHub' width='16' height='16'/>
Find me/fork me on
<a href='https://github.com/simon-brooke/smeagol'>
Github
</a>
||
<img src='img/credits/gnu.small.png' alt='Free Software Foundation' width='16' height='16'/>
Licensed under the
<a href='http://www.gnu.org/licenses/gpl-2.0.html'>
GNU General Public License version 2.0
</a>
</div>
</div>
</footer>
{% endblock %}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-canvassers-Canvasser.html generated 2018-06-11T18:42:42.844Z by adl.to-selmer-templates.
<!-- File form-canvassers-Canvasser.html generated 2018-06-14T19:58:20.337Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -75,7 +75,7 @@ elector_id
<div class='select-box' farside='electors' found='true'>
<input name='elector_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='elector_id' name='elector_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in electors %}<option value='{{record.id}}'>{{record.name}} {{record.phone}} {{record.email}}</option>{% endfor %}
{% for record in electors %}<option value='{{record.id}}'>{{record.name}} {{record.phone}} {{record.email}} {{record.gender}}</option>{% endfor %}
</select>
</div>
{% else %}
@ -216,7 +216,7 @@ elector_id
<div class='select-box' farside='electors' found='true'>
<input name='elector_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='elector_id' name='elector_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in electors %}<option value='{{record.id}}'>{{record.name}} {{record.phone}} {{record.email}}</option>{% endfor %}
{% for record in electors %}<option value='{{record.id}}'>{{record.name}} {{record.phone}} {{record.email}} {{record.gender}}</option>{% endfor %}
</select>
</div>
{% else %}
@ -312,10 +312,9 @@ authorised
roles
</label>
{% ifwritable canvassers roles %}
<div class='select-box' farside='role' found='false'>
<input name='roles-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='roles' name='roles' multiple='multiple' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in role %}<option value='{{record.role_id}}'></option>{% endfor %}
<div class='select-box' farside='roles' found='true'>
<select id='roles' name='roles' multiple='multiple'>
{% for record in roles %}<option value='{{record.role_id}}'>{{record.name}}</option>{% endfor %}
</select>
</div>
{% else %}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-districts-District.html generated 2018-06-11T18:42:42.814Z by adl.to-selmer-templates.
<!-- File form-districts-District.html generated 2018-06-14T19:58:20.306Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-dwellings-Dwelling.html generated 2018-06-11T18:42:42.852Z by adl.to-selmer-templates.
<!-- File form-dwellings-Dwelling.html generated 2018-06-14T19:58:20.346Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -44,10 +44,10 @@ id
address_id
</label>
{% ifwritable dwellings address_id %}
<div class='select-box' farside='address' found='false'>
<div class='select-box' farside='addresses' found='true'>
<input name='address_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='address_id' name='address_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in address %}<option value='{{record.id}}'></option>{% endfor %}
{% for record in addresses %}<option value='{{record.id}}'>{{record.address}} {{record.postcode}}</option>{% endfor %}
</select>
</div>
{% else %}
@ -91,10 +91,10 @@ id
address_id
</label>
{% ifwritable dwellings address_id %}
<div class='select-box' farside='address' found='false'>
<div class='select-box' farside='addresses' found='true'>
<input name='address_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='address_id' name='address_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in address %}<option value='{{record.id}}'></option>{% endfor %}
{% for record in addresses %}<option value='{{record.id}}'>{{record.address}} {{record.postcode}}</option>{% endfor %}
</select>
</div>
{% else %}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-electors-Elector.html generated 2018-06-11T18:42:42.839Z by adl.to-selmer-templates.
<!-- File form-electors-Elector.html generated 2018-06-14T19:58:20.332Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -61,7 +61,7 @@ dwelling_id
<div class='select-box' farside='dwellings' found='true'>
<input name='dwelling_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='dwelling_id' name='dwelling_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in dwellings %}<option value='{{record.id}}'></option>{% endfor %}
{% for record in dwellings %}<option value='{{record.id}}'>{{record.address_id}} {{record.sub-address}}</option>{% endfor %}
</select>
</div>
{% else %}
@ -154,7 +154,7 @@ dwelling_id
<div class='select-box' farside='dwellings' found='true'>
<input name='dwelling_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='dwelling_id' name='dwelling_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in dwellings %}<option value='{{record.id}}'></option>{% endfor %}
{% for record in dwellings %}<option value='{{record.id}}'>{{record.address_id}} {{record.sub-address}}</option>{% endfor %}
</select>
</div>
{% else %}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-followupactions-Followupaction.html generated 2018-06-11T18:42:42.854Z by adl.to-selmer-templates.
<!-- File form-followupactions-Followupaction.html generated 2018-06-14T19:58:20.348Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -47,7 +47,7 @@ request_id
<div class='select-box' farside='followuprequests' found='true'>
<input name='request_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='request_id' name='request_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in followuprequests %}<option value='{{record.id}}'></option>{% endfor %}
{% for record in followuprequests %}<option value='{{record.id}}'>{{record.elector_id}} {{record.visit_id}} {{record.issue_id}}</option>{% endfor %}
</select>
</div>
{% else %}
@ -141,7 +141,7 @@ request_id
<div class='select-box' farside='followuprequests' found='true'>
<input name='request_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='request_id' name='request_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in followuprequests %}<option value='{{record.id}}'></option>{% endfor %}
{% for record in followuprequests %}<option value='{{record.id}}'>{{record.elector_id}} {{record.visit_id}} {{record.issue_id}}</option>{% endfor %}
</select>
</div>
{% else %}

View file

@ -0,0 +1,131 @@
{% extends "base.html" %}
<!-- File form-followupmethods-Followupmethod.html generated 2018-06-14T19:58:20.351Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta content='width=device-width, initial-scale=1' name='viewport'/>
<link href='css/yyy-common.css' type='text/css' rel='stylesheet'/>
<link href='css/yyy-site.css' type='text/css' rel='stylesheet'/>
<link href='css/spinner.css' type='text/css' rel='stylesheet'/>
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow'/>
<title>
{{site-title}}: {{title}}
</title>
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-followupmethods-Followupmethod' method='POST'>
{% csrf-field %}
<p class='widget'>
<label for='id'>
id
</label>
{% ifwritable followupmethods id %}
<input id='id' name='id' type='text' value='{{record.id}}'/>
{% else %}
{% ifreadable followupmethods id%}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='id'>
id
</label>
{% ifwritable followupmethods %}
<input id='id' name='id' type='text' value='{{record.id}}'/>
{% else %}
{% ifreadable followupmethods %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='id'>
id
</label>
{% ifwritable followupmethods %}
<input id='id' name='id' type='text' value='{{record.id}}'/>
{% else %}
{% ifreadable followupmethods %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this followupmethods record
</label>
<input id='save-button' name='save-button' class='action-safe' type=':submit' value='Save!'/>
</p>
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this followupmethods record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type=':submit' value='Delete!'/>
</p>
</form>
</div>
{% endblock %}
{% block foot %}
<footer>
<div id='credits'>
<div>
<img height='24' width='24' src='img/credits/ric-logo.png'/>
A project of the
<a href='https://radical.scot/'>
Radical Independence Campaign
</a>
||
Version {{version}}
</div>
<div>
<img src='img/credits/luminus-logo.png' alt='Clojure' width='16' height='16'/>
Built with
<a href='http://www.luminusweb.net/'>
LuminusWeb
</a>
||
<img src='img/credits/clojure-icon.gif' alt='Clojure' width='16' height='16'/>
Powered by
<a href='http://clojure.org'>
Clojure
</a>
||
<img src='img/credits/github-logo-transparent.png' alt='GitHub' width='16' height='16'/>
Find me/fork me on
<a href='https://github.com/simon-brooke/smeagol'>
Github
</a>
||
<img src='img/credits/gnu.small.png' alt='Free Software Foundation' width='16' height='16'/>
Licensed under the
<a href='http://www.gnu.org/licenses/gpl-2.0.html'>
GNU General Public License version 2.0
</a>
</div>
</div>
</footer>
{% endblock %}

View file

@ -0,0 +1,266 @@
{% extends "base.html" %}
<!-- File form-followuprequests-Followuprequest.html generated 2018-06-14T19:58:20.310Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta content='width=device-width, initial-scale=1' name='viewport'/>
<link href='css/yyy-common.css' type='text/css' rel='stylesheet'/>
<link href='css/yyy-site.css' type='text/css' rel='stylesheet'/>
<link href='css/spinner.css' type='text/css' rel='stylesheet'/>
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow'/>
<title>
{{site-title}}: {{title}}
</title>
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-followuprequests-Followuprequest' method='POST'>
{% csrf-field %}
<input id='id' name='id' type='hidden' value='{{record.id}}'/>
<p class='widget'>
<label for='id'>
id
</label>
{% ifwritable followuprequests %}
<input id='id' name='id' type='text' value='{{record.id}}'/>
{% else %}
{% ifreadable followuprequests %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='elector_id'>
elector_id
</label>
{% ifwritable followuprequests elector_id %}
<div class='select-box' farside='electors' found='true'>
<input name='elector_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='elector_id' name='elector_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in electors %}<option value='{{record.id}}'>{{record.name}} {{record.phone}} {{record.email}} {{record.gender}}</option>{% endfor %}
</select>
</div>
{% else %}
{% ifreadable followuprequests elector_id%}
<span id='elector_id' name='elector_id' class='pseudo-widget disabled'>
{{record.elector_id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='visit_id'>
visit_id
</label>
{% ifwritable followuprequests visit_id %}
<div class='select-box' farside='visits' found='true'>
<input name='visit_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='visit_id' name='visit_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in visits %}<option value='{{record.id}}'>{{record.address_id}} {{record.date}}</option>{% endfor %}
</select>
</div>
{% else %}
{% ifreadable followuprequests visit_id%}
<span id='visit_id' name='visit_id' class='pseudo-widget disabled'>
{{record.visit_id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='issue_id'>
issue_id
</label>
{% ifwritable followuprequests issue_id %}
<div class='select-box' farside='issues' found='true'>
<select id='issue_id' name='issue_id'>
{% for record in issues %}<option value='{{record.id}}'>{{record.id}}</option>{% endfor %}
</select>
</div>
{% else %}
{% ifreadable followuprequests issue_id%}
<span id='issue_id' name='issue_id' class='pseudo-widget disabled'>
{{record.issue_id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='method_id'>
method_id
</label>
{% ifwritable followuprequests method_id %}
<div class='select-box' farside='followupmethods' found='true'>
<select id='method_id' name='method_id'>
{% for record in followupmethods %}<option value='{{record.id}}'>{{record.id}}</option>{% endfor %}
</select>
</div>
{% else %}
{% ifreadable followuprequests method_id%}
<span id='method_id' name='method_id' class='pseudo-widget disabled'>
{{record.method_id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='id'>
id
</label>
{% ifwritable followuprequests %}
<input id='id' name='id' type='text' value='{{record.id}}'/>
{% else %}
{% ifreadable followuprequests %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='elector_id'>
elector_id
</label>
{% ifwritable followuprequests elector_id %}
<div class='select-box' farside='electors' found='true'>
<input name='elector_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='elector_id' name='elector_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in electors %}<option value='{{record.id}}'>{{record.name}} {{record.phone}} {{record.email}} {{record.gender}}</option>{% endfor %}
</select>
</div>
{% else %}
{% ifreadable followuprequests elector_id%}
<span id='elector_id' name='elector_id' class='pseudo-widget disabled'>
{{record.elector_id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='visit_id'>
visit_id
</label>
{% ifwritable followuprequests visit_id %}
<div class='select-box' farside='visits' found='true'>
<input name='visit_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='visit_id' name='visit_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in visits %}<option value='{{record.id}}'>{{record.address_id}} {{record.date}}</option>{% endfor %}
</select>
</div>
{% else %}
{% ifreadable followuprequests visit_id%}
<span id='visit_id' name='visit_id' class='pseudo-widget disabled'>
{{record.visit_id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='issue_id'>
issue_id
</label>
{% ifwritable followuprequests issue_id %}
<div class='select-box' farside='issues' found='true'>
<select id='issue_id' name='issue_id'>
{% for record in issues %}<option value='{{record.id}}'>{{record.id}}</option>{% endfor %}
</select>
</div>
{% else %}
{% ifreadable followuprequests issue_id%}
<span id='issue_id' name='issue_id' class='pseudo-widget disabled'>
{{record.issue_id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='method_id'>
method_id
</label>
{% ifwritable followuprequests method_id %}
<div class='select-box' farside='followupmethods' found='true'>
<select id='method_id' name='method_id'>
{% for record in followupmethods %}<option value='{{record.id}}'>{{record.id}}</option>{% endfor %}
</select>
</div>
{% else %}
{% ifreadable followuprequests method_id%}
<span id='method_id' name='method_id' class='pseudo-widget disabled'>
{{record.method_id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this followuprequests record
</label>
<input id='save-button' name='save-button' class='action-safe' type=':submit' value='Save!'/>
</p>
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this followuprequests record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type=':submit' value='Delete!'/>
</p>
</form>
</div>
{% endblock %}
{% block foot %}
<footer>
<div id='credits'>
<div>
<img height='24' width='24' src='img/credits/ric-logo.png'/>
A project of the
<a href='https://radical.scot/'>
Radical Independence Campaign
</a>
||
Version {{version}}
</div>
<div>
<img src='img/credits/luminus-logo.png' alt='Clojure' width='16' height='16'/>
Built with
<a href='http://www.luminusweb.net/'>
LuminusWeb
</a>
||
<img src='img/credits/clojure-icon.gif' alt='Clojure' width='16' height='16'/>
Powered by
<a href='http://clojure.org'>
Clojure
</a>
||
<img src='img/credits/github-logo-transparent.png' alt='GitHub' width='16' height='16'/>
Find me/fork me on
<a href='https://github.com/simon-brooke/smeagol'>
Github
</a>
||
<img src='img/credits/gnu.small.png' alt='Free Software Foundation' width='16' height='16'/>
Licensed under the
<a href='http://www.gnu.org/licenses/gpl-2.0.html'>
GNU General Public License version 2.0
</a>
</div>
</div>
</footer>
{% endblock %}

View file

@ -0,0 +1,131 @@
{% extends "base.html" %}
<!-- File form-genders-Gender.html generated 2018-06-14T19:58:20.298Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta content='width=device-width, initial-scale=1' name='viewport'/>
<link href='css/yyy-common.css' type='text/css' rel='stylesheet'/>
<link href='css/yyy-site.css' type='text/css' rel='stylesheet'/>
<link href='css/spinner.css' type='text/css' rel='stylesheet'/>
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow'/>
<title>
{{site-title}}: {{title}}
</title>
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-genders-Gender' method='POST'>
{% csrf-field %}
<p class='widget'>
<label for='id'>
id
</label>
{% ifwritable genders id %}
<input id='id' name='id' type='text' value='{{record.id}}'/>
{% else %}
{% ifreadable genders id%}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='id'>
id
</label>
{% ifwritable genders %}
<input id='id' name='id' type='text' value='{{record.id}}'/>
{% else %}
{% ifreadable genders %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='id'>
id
</label>
{% ifwritable genders %}
<input id='id' name='id' type='text' value='{{record.id}}'/>
{% else %}
{% ifreadable genders %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this genders record
</label>
<input id='save-button' name='save-button' class='action-safe' type=':submit' value='Save!'/>
</p>
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this genders record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type=':submit' value='Delete!'/>
</p>
</form>
</div>
{% endblock %}
{% block foot %}
<footer>
<div id='credits'>
<div>
<img height='24' width='24' src='img/credits/ric-logo.png'/>
A project of the
<a href='https://radical.scot/'>
Radical Independence Campaign
</a>
||
Version {{version}}
</div>
<div>
<img src='img/credits/luminus-logo.png' alt='Clojure' width='16' height='16'/>
Built with
<a href='http://www.luminusweb.net/'>
LuminusWeb
</a>
||
<img src='img/credits/clojure-icon.gif' alt='Clojure' width='16' height='16'/>
Powered by
<a href='http://clojure.org'>
Clojure
</a>
||
<img src='img/credits/github-logo-transparent.png' alt='GitHub' width='16' height='16'/>
Find me/fork me on
<a href='https://github.com/simon-brooke/smeagol'>
Github
</a>
||
<img src='img/credits/gnu.small.png' alt='Free Software Foundation' width='16' height='16'/>
Licensed under the
<a href='http://www.gnu.org/licenses/gpl-2.0.html'>
GNU General Public License version 2.0
</a>
</div>
</div>
</footer>
{% endblock %}

View file

@ -0,0 +1,202 @@
{% extends "base.html" %}
<!-- File form-intentions-Intention.html generated 2018-06-14T19:58:20.343Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta content='width=device-width, initial-scale=1' name='viewport'/>
<link href='css/yyy-common.css' type='text/css' rel='stylesheet'/>
<link href='css/yyy-site.css' type='text/css' rel='stylesheet'/>
<link href='css/spinner.css' type='text/css' rel='stylesheet'/>
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow'/>
<title>
{{site-title}}: {{title}}
</title>
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-intentions-Intention' method='POST'>
{% csrf-field %}
<input id='Id' name='Id' type='hidden' value='{{record.Id}}'/>
<p class='widget'>
<label for='visit_id'>
visit_id
</label>
{% ifwritable intentions visit_id %}
<div class='select-box' farside='visits' found='true'>
<input name='visit_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='visit_id' name='visit_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in visits %}<option value='{{record.id}}'>{{record.address_id}} {{record.date}}</option>{% endfor %}
</select>
</div>
{% else %}
{% ifreadable intentions visit_id%}
<span id='visit_id' name='visit_id' class='pseudo-widget disabled'>
{{record.visit_id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='elector_id'>
elector_id
</label>
{% ifwritable intentions elector_id %}
<div class='select-box' farside='electors' found='true'>
<input name='elector_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='elector_id' name='elector_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in electors %}<option value='{{record.id}}'>{{record.name}} {{record.phone}} {{record.email}} {{record.gender}}</option>{% endfor %}
</select>
</div>
{% else %}
{% ifreadable intentions elector_id%}
<span id='elector_id' name='elector_id' class='pseudo-widget disabled'>
{{record.elector_id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='option_id'>
option_id
</label>
{% ifwritable intentions option_id %}
<div class='select-box' farside='options' found='true'>
<select id='option_id' name='option_id'>
{% for record in options %}<option value='{{record.id}}'>{{record.id}}</option>{% endfor %}
</select>
</div>
{% else %}
{% ifreadable intentions option_id%}
<span id='option_id' name='option_id' class='pseudo-widget disabled'>
{{record.option_id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='visit_id'>
visit_id
</label>
{% ifwritable intentions visit_id %}
<div class='select-box' farside='visits' found='true'>
<input name='visit_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='visit_id' name='visit_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in visits %}<option value='{{record.id}}'>{{record.address_id}} {{record.date}}</option>{% endfor %}
</select>
</div>
{% else %}
{% ifreadable intentions visit_id%}
<span id='visit_id' name='visit_id' class='pseudo-widget disabled'>
{{record.visit_id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='elector_id'>
elector_id
</label>
{% ifwritable intentions elector_id %}
<div class='select-box' farside='electors' found='true'>
<input name='elector_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='elector_id' name='elector_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in electors %}<option value='{{record.id}}'>{{record.name}} {{record.phone}} {{record.email}} {{record.gender}}</option>{% endfor %}
</select>
</div>
{% else %}
{% ifreadable intentions elector_id%}
<span id='elector_id' name='elector_id' class='pseudo-widget disabled'>
{{record.elector_id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='option_id'>
option_id
</label>
{% ifwritable intentions option_id %}
<div class='select-box' farside='options' found='true'>
<select id='option_id' name='option_id'>
{% for record in options %}<option value='{{record.id}}'>{{record.id}}</option>{% endfor %}
</select>
</div>
{% else %}
{% ifreadable intentions option_id%}
<span id='option_id' name='option_id' class='pseudo-widget disabled'>
{{record.option_id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this intentions record
</label>
<input id='save-button' name='save-button' class='action-safe' type=':submit' value='Save!'/>
</p>
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this intentions record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type=':submit' value='Delete!'/>
</p>
</form>
</div>
{% endblock %}
{% block foot %}
<footer>
<div id='credits'>
<div>
<img height='24' width='24' src='img/credits/ric-logo.png'/>
A project of the
<a href='https://radical.scot/'>
Radical Independence Campaign
</a>
||
Version {{version}}
</div>
<div>
<img src='img/credits/luminus-logo.png' alt='Clojure' width='16' height='16'/>
Built with
<a href='http://www.luminusweb.net/'>
LuminusWeb
</a>
||
<img src='img/credits/clojure-icon.gif' alt='Clojure' width='16' height='16'/>
Powered by
<a href='http://clojure.org'>
Clojure
</a>
||
<img src='img/credits/github-logo-transparent.png' alt='GitHub' width='16' height='16'/>
Find me/fork me on
<a href='https://github.com/simon-brooke/smeagol'>
Github
</a>
||
<img src='img/credits/gnu.small.png' alt='Free Software Foundation' width='16' height='16'/>
Licensed under the
<a href='http://www.gnu.org/licenses/gpl-2.0.html'>
GNU General Public License version 2.0
</a>
</div>
</div>
</footer>
{% endblock %}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-issues-Issue.html generated 2018-06-11T18:42:42.827Z by adl.to-selmer-templates.
<!-- File form-issues-Issue.html generated 2018-06-14T19:58:20.321Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -0,0 +1,131 @@
{% extends "base.html" %}
<!-- File form-options-Option.html generated 2018-06-14T19:58:20.342Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta content='width=device-width, initial-scale=1' name='viewport'/>
<link href='css/yyy-common.css' type='text/css' rel='stylesheet'/>
<link href='css/yyy-site.css' type='text/css' rel='stylesheet'/>
<link href='css/spinner.css' type='text/css' rel='stylesheet'/>
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow'/>
<title>
{{site-title}}: {{title}}
</title>
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-options-Option' method='POST'>
{% csrf-field %}
<p class='widget'>
<label for='id'>
id
</label>
{% ifwritable options id %}
<input id='id' name='id' type='text' value='{{record.id}}'/>
{% else %}
{% ifreadable options id%}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='id'>
id
</label>
{% ifwritable options %}
<input id='id' name='id' type='text' value='{{record.id}}'/>
{% else %}
{% ifreadable options %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='id'>
id
</label>
{% ifwritable options %}
<input id='id' name='id' type='text' value='{{record.id}}'/>
{% else %}
{% ifreadable options %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this options record
</label>
<input id='save-button' name='save-button' class='action-safe' type=':submit' value='Save!'/>
</p>
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this options record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type=':submit' value='Delete!'/>
</p>
</form>
</div>
{% endblock %}
{% block foot %}
<footer>
<div id='credits'>
<div>
<img height='24' width='24' src='img/credits/ric-logo.png'/>
A project of the
<a href='https://radical.scot/'>
Radical Independence Campaign
</a>
||
Version {{version}}
</div>
<div>
<img src='img/credits/luminus-logo.png' alt='Clojure' width='16' height='16'/>
Built with
<a href='http://www.luminusweb.net/'>
LuminusWeb
</a>
||
<img src='img/credits/clojure-icon.gif' alt='Clojure' width='16' height='16'/>
Powered by
<a href='http://clojure.org'>
Clojure
</a>
||
<img src='img/credits/github-logo-transparent.png' alt='GitHub' width='16' height='16'/>
Find me/fork me on
<a href='https://github.com/simon-brooke/smeagol'>
Github
</a>
||
<img src='img/credits/gnu.small.png' alt='Free Software Foundation' width='16' height='16'/>
Licensed under the
<a href='http://www.gnu.org/licenses/gpl-2.0.html'>
GNU General Public License version 2.0
</a>
</div>
</div>
</footer>
{% endblock %}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-roles-Role.html generated 2018-06-11T18:42:42.829Z by adl.to-selmer-templates.
<!-- File form-roles-Role.html generated 2018-06-14T19:58:20.323Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-teams-Team.html generated 2018-06-11T18:42:42.836Z by adl.to-selmer-templates.
<!-- File form-teams-Team.html generated 2018-06-14T19:58:20.329Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -181,6 +181,25 @@ members
{% endifwritable %}
</p>
<p class='widget'>
<label for='organisers'>
organisers
</label>
{% ifwritable teams organisers %}
<div class='select-box' farside='canvassers' found='true'>
<input name='organisers-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='organisers' name='organisers' multiple='multiple' comment='JavaScript stuff to fix up aynchronous loading'>
{% for record in canvassers %}<option value='{{record.id}}'>{{record.username}} {{record.fullname}} {{record.email}}</option>{% endfor %}
</select>
</div>
{% else %}
{% ifreadable teams organisers%}
<span id='organisers' name='organisers' class='pseudo-widget disabled'>
{{record.organisers}}
</span>
{% endifreadable %}
{% endifwritable %}
</p>
<p class='widget'>
<label for='longitude'>
longitude
</label>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-visits-Visit.html generated 2018-06-11T18:42:42.832Z by adl.to-selmer-templates.
<!-- File form-visits-Visit.html generated 2018-06-14T19:58:20.326Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-addresses-Addresses.html generated 2018-06-11T18:42:42.843Z by adl.to-selmer-templates.
<!-- File list-addresses-Addresses.html generated 2018-06-14T19:58:20.336Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -0,0 +1,118 @@
{% extends "base.html" %}
<!-- File list-authorities-Authorities.html generated 2018-06-14T19:58:20.309Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta content='width=device-width, initial-scale=1' name='viewport'/>
<link href='css/yyy-common.css' type='text/css' rel='stylesheet'/>
<link href='css/yyy-site.css' type='text/css' rel='stylesheet'/>
<link href='css/spinner.css' type='text/css' rel='stylesheet'/>
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow'/>
<title>
{{site-title}}: {{title}}
</title>
{% endblock %}
{% block content %}
<form id='content' class='list'>
<div class='big-link-container'>
<a href='form-authorities-Authority'>
Add a new Authority
</a>
</div>
<table caption='authorities'>
<thead>
<tr>
<th>
id
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in %records% %}
<tr>
<td>
{{ record.id }}
</td>
<td>
<a href='{{servlet-context}}/form-authorities-Authority?id={{ record.id}}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</table>
</form>
{% endblock %}
{% block foot %}
<footer>
<div id='credits'>
<div>
<img height='24' width='24' src='img/credits/ric-logo.png'/>
A project of the
<a href='https://radical.scot/'>
Radical Independence Campaign
</a>
||
Version {{version}}
</div>
<div>
<img src='img/credits/luminus-logo.png' alt='Clojure' width='16' height='16'/>
Built with
<a href='http://www.luminusweb.net/'>
LuminusWeb
</a>
||
<img src='img/credits/clojure-icon.gif' alt='Clojure' width='16' height='16'/>
Powered by
<a href='http://clojure.org'>
Clojure
</a>
||
<img src='img/credits/github-logo-transparent.png' alt='GitHub' width='16' height='16'/>
Find me/fork me on
<a href='https://github.com/simon-brooke/smeagol'>
Github
</a>
||
<img src='img/credits/gnu.small.png' alt='Free Software Foundation' width='16' height='16'/>
Licensed under the
<a href='http://www.gnu.org/licenses/gpl-2.0.html'>
GNU General Public License version 2.0
</a>
</div>
</div>
</footer>
{% endblock %}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-canvassers-Canvassers.html generated 2018-06-11T18:42:42.851Z by adl.to-selmer-templates.
<!-- File list-canvassers-Canvassers.html generated 2018-06-14T19:58:20.345Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-districts-Districts.html generated 2018-06-11T18:42:42.848Z by adl.to-selmer-templates.
<!-- File list-districts-Districts.html generated 2018-06-14T19:58:20.341Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-dwellings-Dwellings.html generated 2018-06-11T18:42:42.842Z by adl.to-selmer-templates.
<!-- File list-dwellings-Dwellings.html generated 2018-06-14T19:58:20.334Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-electors-Electors.html generated 2018-06-11T18:42:42.825Z by adl.to-selmer-templates.
<!-- File list-electors-Electors.html generated 2018-06-14T19:58:20.320Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-followupactions-Followupactions.html generated 2018-06-11T18:42:42.850Z by adl.to-selmer-templates.
<!-- File list-followupactions-Followupactions.html generated 2018-06-14T19:58:20.345Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -0,0 +1,118 @@
{% extends "base.html" %}
<!-- File list-followupmethods-Followupmethods.html generated 2018-06-14T19:58:20.325Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta content='width=device-width, initial-scale=1' name='viewport'/>
<link href='css/yyy-common.css' type='text/css' rel='stylesheet'/>
<link href='css/yyy-site.css' type='text/css' rel='stylesheet'/>
<link href='css/spinner.css' type='text/css' rel='stylesheet'/>
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow'/>
<title>
{{site-title}}: {{title}}
</title>
{% endblock %}
{% block content %}
<form id='content' class='list'>
<div class='big-link-container'>
<a href='form-followupmethods-Followupmethod'>
Add a new Followupmethod
</a>
</div>
<table caption='followupmethods'>
<thead>
<tr>
<th>
id
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in %records% %}
<tr>
<td>
{{ record.id }}
</td>
<td>
<a href='{{servlet-context}}/form-followupmethods-Followupmethod?id={{ record.id}}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</table>
</form>
{% endblock %}
{% block foot %}
<footer>
<div id='credits'>
<div>
<img height='24' width='24' src='img/credits/ric-logo.png'/>
A project of the
<a href='https://radical.scot/'>
Radical Independence Campaign
</a>
||
Version {{version}}
</div>
<div>
<img src='img/credits/luminus-logo.png' alt='Clojure' width='16' height='16'/>
Built with
<a href='http://www.luminusweb.net/'>
LuminusWeb
</a>
||
<img src='img/credits/clojure-icon.gif' alt='Clojure' width='16' height='16'/>
Powered by
<a href='http://clojure.org'>
Clojure
</a>
||
<img src='img/credits/github-logo-transparent.png' alt='GitHub' width='16' height='16'/>
Find me/fork me on
<a href='https://github.com/simon-brooke/smeagol'>
Github
</a>
||
<img src='img/credits/gnu.small.png' alt='Free Software Foundation' width='16' height='16'/>
Licensed under the
<a href='http://www.gnu.org/licenses/gpl-2.0.html'>
GNU General Public License version 2.0
</a>
</div>
</div>
</footer>
{% endblock %}

View file

@ -0,0 +1,154 @@
{% extends "base.html" %}
<!-- File list-followuprequests-Followuprequests.html generated 2018-06-14T19:58:20.303Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta content='width=device-width, initial-scale=1' name='viewport'/>
<link href='css/yyy-common.css' type='text/css' rel='stylesheet'/>
<link href='css/yyy-site.css' type='text/css' rel='stylesheet'/>
<link href='css/spinner.css' type='text/css' rel='stylesheet'/>
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow'/>
<title>
{{site-title}}: {{title}}
</title>
{% endblock %}
{% block content %}
<form id='content' class='list'>
<div class='big-link-container'>
<a href='form-followuprequests-Followuprequest'>
Add a new Followuprequest
</a>
</div>
<table caption='followuprequests'>
<thead>
<tr>
<th>
id
</th>
<th>
elector_id
</th>
<th>
visit_id
</th>
<th>
issue_id
</th>
<th>
method_id
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input id='elector_id' type='text' name='elector_id' value='{{ params.elector_id }}'/>
</th>
<th>
<input id='visit_id' type='text' name='visit_id' value='{{ params.visit_id }}'/>
</th>
<th>
<input id='issue_id' type='text' name='issue_id' value='{{ params.issue_id }}'/>
</th>
<th>
<input id='method_id' type='text' name='method_id' value='{{ params.method_id }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in %records% %}
<tr>
<td>
{{ record.id }}
</td>
<td>
{{ record.elector_id }}
</td>
<td>
{{ record.visit_id }}
</td>
<td>
{{ record.issue_id }}
</td>
<td>
{{ record.method_id }}
</td>
<td>
<a href='{{servlet-context}}/form-followuprequests-Followuprequest?id={{ record.id}}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</table>
</form>
{% endblock %}
{% block foot %}
<footer>
<div id='credits'>
<div>
<img height='24' width='24' src='img/credits/ric-logo.png'/>
A project of the
<a href='https://radical.scot/'>
Radical Independence Campaign
</a>
||
Version {{version}}
</div>
<div>
<img src='img/credits/luminus-logo.png' alt='Clojure' width='16' height='16'/>
Built with
<a href='http://www.luminusweb.net/'>
LuminusWeb
</a>
||
<img src='img/credits/clojure-icon.gif' alt='Clojure' width='16' height='16'/>
Powered by
<a href='http://clojure.org'>
Clojure
</a>
||
<img src='img/credits/github-logo-transparent.png' alt='GitHub' width='16' height='16'/>
Find me/fork me on
<a href='https://github.com/simon-brooke/smeagol'>
Github
</a>
||
<img src='img/credits/gnu.small.png' alt='Free Software Foundation' width='16' height='16'/>
Licensed under the
<a href='http://www.gnu.org/licenses/gpl-2.0.html'>
GNU General Public License version 2.0
</a>
</div>
</div>
</footer>
{% endblock %}

View file

@ -0,0 +1,118 @@
{% extends "base.html" %}
<!-- File list-genders-Genders.html generated 2018-06-14T19:58:20.293Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta content='width=device-width, initial-scale=1' name='viewport'/>
<link href='css/yyy-common.css' type='text/css' rel='stylesheet'/>
<link href='css/yyy-site.css' type='text/css' rel='stylesheet'/>
<link href='css/spinner.css' type='text/css' rel='stylesheet'/>
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow'/>
<title>
{{site-title}}: {{title}}
</title>
{% endblock %}
{% block content %}
<form id='content' class='list'>
<div class='big-link-container'>
<a href='form-genders-Gender'>
Add a new Gender
</a>
</div>
<table caption='genders'>
<thead>
<tr>
<th>
id
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in %records% %}
<tr>
<td>
{{ record.id }}
</td>
<td>
<a href='{{servlet-context}}/form-genders-Gender?id={{ record.id}}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</table>
</form>
{% endblock %}
{% block foot %}
<footer>
<div id='credits'>
<div>
<img height='24' width='24' src='img/credits/ric-logo.png'/>
A project of the
<a href='https://radical.scot/'>
Radical Independence Campaign
</a>
||
Version {{version}}
</div>
<div>
<img src='img/credits/luminus-logo.png' alt='Clojure' width='16' height='16'/>
Built with
<a href='http://www.luminusweb.net/'>
LuminusWeb
</a>
||
<img src='img/credits/clojure-icon.gif' alt='Clojure' width='16' height='16'/>
Powered by
<a href='http://clojure.org'>
Clojure
</a>
||
<img src='img/credits/github-logo-transparent.png' alt='GitHub' width='16' height='16'/>
Find me/fork me on
<a href='https://github.com/simon-brooke/smeagol'>
Github
</a>
||
<img src='img/credits/gnu.small.png' alt='Free Software Foundation' width='16' height='16'/>
Licensed under the
<a href='http://www.gnu.org/licenses/gpl-2.0.html'>
GNU General Public License version 2.0
</a>
</div>
</div>
</footer>
{% endblock %}

View file

@ -0,0 +1,136 @@
{% extends "base.html" %}
<!-- File list-intentions-Intentions.html generated 2018-06-14T19:58:20.348Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta content='width=device-width, initial-scale=1' name='viewport'/>
<link href='css/yyy-common.css' type='text/css' rel='stylesheet'/>
<link href='css/yyy-site.css' type='text/css' rel='stylesheet'/>
<link href='css/spinner.css' type='text/css' rel='stylesheet'/>
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow'/>
<title>
{{site-title}}: {{title}}
</title>
{% endblock %}
{% block content %}
<form id='content' class='list'>
<div class='big-link-container'>
<a href='form-intentions-Intention'>
Add a new Intention
</a>
</div>
<table caption='intentions'>
<thead>
<tr>
<th>
visit_id
</th>
<th>
elector_id
</th>
<th>
option_id
</th>
</tr>
<tr>
<th>
<input id='visit_id' type='text' name='visit_id' value='{{ params.visit_id }}'/>
</th>
<th>
<input id='elector_id' type='text' name='elector_id' value='{{ params.elector_id }}'/>
</th>
<th>
<input id='option_id' type='text' name='option_id' value='{{ params.option_id }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in %records% %}
<tr>
<td>
{{ record.visit_id }}
</td>
<td>
{{ record.elector_id }}
</td>
<td>
{{ record.option_id }}
</td>
<td>
<a href='{{servlet-context}}/form-intentions-Intention?Id={{ record.Id}}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</table>
</form>
{% endblock %}
{% block foot %}
<footer>
<div id='credits'>
<div>
<img height='24' width='24' src='img/credits/ric-logo.png'/>
A project of the
<a href='https://radical.scot/'>
Radical Independence Campaign
</a>
||
Version {{version}}
</div>
<div>
<img src='img/credits/luminus-logo.png' alt='Clojure' width='16' height='16'/>
Built with
<a href='http://www.luminusweb.net/'>
LuminusWeb
</a>
||
<img src='img/credits/clojure-icon.gif' alt='Clojure' width='16' height='16'/>
Powered by
<a href='http://clojure.org'>
Clojure
</a>
||
<img src='img/credits/github-logo-transparent.png' alt='GitHub' width='16' height='16'/>
Find me/fork me on
<a href='https://github.com/simon-brooke/smeagol'>
Github
</a>
||
<img src='img/credits/gnu.small.png' alt='Free Software Foundation' width='16' height='16'/>
Licensed under the
<a href='http://www.gnu.org/licenses/gpl-2.0.html'>
GNU General Public License version 2.0
</a>
</div>
</div>
</footer>
{% endblock %}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-issues-Issues.html generated 2018-06-11T18:42:42.849Z by adl.to-selmer-templates.
<!-- File list-issues-Issues.html generated 2018-06-14T19:58:20.342Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -0,0 +1,118 @@
{% extends "base.html" %}
<!-- File list-options-Options.html generated 2018-06-14T19:58:20.305Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta content='width=device-width, initial-scale=1' name='viewport'/>
<link href='css/yyy-common.css' type='text/css' rel='stylesheet'/>
<link href='css/yyy-site.css' type='text/css' rel='stylesheet'/>
<link href='css/spinner.css' type='text/css' rel='stylesheet'/>
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow'/>
<title>
{{site-title}}: {{title}}
</title>
{% endblock %}
{% block content %}
<form id='content' class='list'>
<div class='big-link-container'>
<a href='form-options-Option'>
Add a new Option
</a>
</div>
<table caption='options'>
<thead>
<tr>
<th>
id
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in %records% %}
<tr>
<td>
{{ record.id }}
</td>
<td>
<a href='{{servlet-context}}/form-options-Option?id={{ record.id}}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</table>
</form>
{% endblock %}
{% block foot %}
<footer>
<div id='credits'>
<div>
<img height='24' width='24' src='img/credits/ric-logo.png'/>
A project of the
<a href='https://radical.scot/'>
Radical Independence Campaign
</a>
||
Version {{version}}
</div>
<div>
<img src='img/credits/luminus-logo.png' alt='Clojure' width='16' height='16'/>
Built with
<a href='http://www.luminusweb.net/'>
LuminusWeb
</a>
||
<img src='img/credits/clojure-icon.gif' alt='Clojure' width='16' height='16'/>
Powered by
<a href='http://clojure.org'>
Clojure
</a>
||
<img src='img/credits/github-logo-transparent.png' alt='GitHub' width='16' height='16'/>
Find me/fork me on
<a href='https://github.com/simon-brooke/smeagol'>
Github
</a>
||
<img src='img/credits/gnu.small.png' alt='Free Software Foundation' width='16' height='16'/>
Licensed under the
<a href='http://www.gnu.org/licenses/gpl-2.0.html'>
GNU General Public License version 2.0
</a>
</div>
</div>
</footer>
{% endblock %}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-roles-Roles.html generated 2018-06-11T18:42:42.831Z by adl.to-selmer-templates.
<!-- File list-roles-Roles.html generated 2018-06-14T19:58:20.325Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-teams-Teams.html generated 2018-06-11T18:42:42.812Z by adl.to-selmer-templates.
<!-- File list-teams-Teams.html generated 2018-06-14T19:58:20.297Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-visits-Visits.html generated 2018-06-11T18:42:42.810Z by adl.to-selmer-templates.
<!-- File list-visits-Visits.html generated 2018-06-14T19:58:20.295Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -5,8 +5,8 @@
[cheshire.core :refer [generate-string parse-string]]
[clojure.java.jdbc :as jdbc]
[conman.core :as conman]
[youyesyet.config :refer [env]]
[mount.core :refer [defstate]])
[mount.core :refer [defstate]]
[youyesyet.config :refer [env]])
(:import org.postgresql.util.PGobject
java.sql.Array
clojure.lang.IPersistentMap

View file

@ -1,20 +1,19 @@
(ns ^{:doc "Handlers for starting and stopping the webapp."
:author "Simon Brooke"}
youyesyet.handler
(:require [compojure.core :refer [routes wrap-routes]]
(:require [clojure.tools.logging :as log]
[compojure.core :refer [routes wrap-routes]]
[compojure.route :as route]
[mount.core :as mount]
[youyesyet.config :refer [env]]
[youyesyet.layout :refer [error-page]]
[youyesyet.middleware :as middleware]
[youyesyet.routes.authenticated :refer [authenticated-routes]]
[youyesyet.routes.home :refer [home-routes]]
[youyesyet.routes.oauth :refer [oauth-routes]]
[youyesyet.routes.auto-json :refer [auto-rest-routes]]
[youyesyet.routes.auto :refer [auto-selmer-routes]]
[compojure.route :as route]
[youyesyet.env :refer [defaults]]
[mount.core :as mount]
[youyesyet.middleware :as middleware]
[clojure.tools.logging :as log]
[youyesyet.db.core :as db]
[youyesyet.config :refer [env]]))
[youyesyet.env :refer [defaults]]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;
@ -82,5 +81,5 @@
:title "page not found"})))))
(def app ;; #'app-routes)
(middleware/wrap-base #'app-routes))
(def app #'app-routes)
;; (middleware/wrap-base #'app-routes))

View file

@ -1,6 +1,6 @@
(ns
youyesyet.routes.auto
"User interface routes for Youyesyet auto-generated by [Application Description Language framework](https://github.com/simon-brooke/adl) at 20180611T180322.460Z"
"User interface routes for Youyesyet auto-generated by [Application Description Language framework](https://github.com/simon-brooke/adl) at 20180614T175643.413Z"
(:require
[noir.response :as nresponse]
[noir.util.route :as route]

View file

@ -1,6 +1,6 @@
(ns
youyesyet.routes.auto-json
"JSON routes for youyesyet auto-generated by [Application Description Language framework](https://github.com/simon-brooke/adl) at 20180611T180321.339Z"
"JSON routes for youyesyet auto-generated by [Application Description Language framework](https://github.com/simon-brooke/adl) at 20180614T175642.456Z"
(:require
[noir.response :as nresponse]
[noir.util.route :as route]
@ -24,13 +24,9 @@
create-gender!
create-intention!
create-issue!
create-issueexpertise!
create-option!
create-role!
create-rolemembership!
create-team!
create-teammembership!
create-teamorganisership!
create-visit!
delete-address!
delete-authority!
@ -44,13 +40,9 @@
delete-gender!
delete-intention!
delete-issue!
delete-issueexpertise!
delete-option!
delete-role!
delete-rolemembership!
delete-team!
delete-teammembership!
delete-teamorganisership!
delete-visit!
get-address
get-authority
@ -65,13 +57,10 @@
get-gender
get-intention
get-issue
get-issueexpertise
get-option
get-role
get-rolemembership
get-role-by-name
get-team
get-teammembership
get-teamorganisership
get-visit
list-addresses
list-addresses-by-district
@ -101,23 +90,10 @@
list-intentions-by-elector
list-intentions-by-option
list-intentions-by-visit
list-issueexpertise
list-issueexpertise-by-canvasser
list-issueexpertise-by-followupmethod
list-issueexpertise-by-issue
list-issues
list-options
list-rolememberships
list-rolememberships-by-canvasser
list-rolememberships-by-role
list-roles
list-roles-by-canvasser
list-teammemberships
list-teammemberships-by-canvasser
list-teammemberships-by-team
list-teamorganiserships
list-teamorganiserships-by-canvasser
list-teamorganiserships-by-team
list-teams
list-teams-by-canvasser
list-teams-by-district
@ -136,13 +112,9 @@
search-strings-gender
search-strings-intention
search-strings-issue
search-strings-issueexpertise
search-strings-option
search-strings-role
search-strings-rolemembership
search-strings-team
search-strings-teammembership
search-strings-teamorganisership
search-strings-visit
update-address!
update-canvasser!
@ -153,12 +125,8 @@
update-followuprequest!
update-intention!
update-issue!
update-issueexpertise!
update-role!
update-rolemembership!
update-team!
update-teammembership!
update-teamorganisership!
update-visit!)
@ -212,10 +180,6 @@
"/json/auto/create-issue"
request
(route/restricted (create-issue! request)))
(POST
"/json/auto/create-issueexpertise"
request
(route/restricted (create-issueexpertise! request)))
(POST
"/json/auto/create-option"
request
@ -224,22 +188,10 @@
"/json/auto/create-role"
request
(route/restricted (create-role! request)))
(POST
"/json/auto/create-rolemembership"
request
(route/restricted (create-rolemembership! request)))
(POST
"/json/auto/create-team"
request
(route/restricted (create-team! request)))
(POST
"/json/auto/create-teammembership"
request
(route/restricted (create-teammembership! request)))
(POST
"/json/auto/create-teamorganisership"
request
(route/restricted (create-teamorganisership! request)))
(POST
"/json/auto/create-visit"
request
@ -292,10 +244,6 @@
"/json/auto/delete-issue"
request
(route/restricted (delete-issue! request)))
(POST
"/json/auto/delete-issueexpertise"
request
(route/restricted (delete-issueexpertise! request)))
(POST
"/json/auto/delete-option"
request
@ -304,22 +252,10 @@
"/json/auto/delete-role"
request
(route/restricted (delete-role! request)))
(POST
"/json/auto/delete-rolemembership"
request
(route/restricted (delete-rolemembership! request)))
(POST
"/json/auto/delete-team"
request
(route/restricted (delete-team! request)))
(POST
"/json/auto/delete-teammembership"
request
(route/restricted (delete-teammembership! request)))
(POST
"/json/auto/delete-teamorganisership"
request
(route/restricted (delete-teamorganisership! request)))
(POST
"/json/auto/delete-visit"
request
@ -376,10 +312,6 @@
"/json/auto/get-issue"
request
(route/restricted (get-issue request)))
(POST
"/json/auto/get-issueexpertise"
request
(route/restricted (get-issueexpertise request)))
(POST
"/json/auto/get-option"
request
@ -389,21 +321,13 @@
request
(route/restricted (get-role request)))
(POST
"/json/auto/get-rolemembership"
"/json/auto/get-role-by-name"
request
(route/restricted (get-rolemembership request)))
(route/restricted (get-role-by-name request)))
(POST
"/json/auto/get-team"
request
(route/restricted (get-team request)))
(POST
"/json/auto/get-teammembership"
request
(route/restricted (get-teammembership request)))
(POST
"/json/auto/get-teamorganisership"
request
(route/restricted (get-teamorganisership request)))
(POST
"/json/auto/get-visit"
request
@ -520,22 +444,6 @@
"/json/auto/list-intentions-by-visit"
request
(route/restricted (list-intentions-by-visit request)))
(GET
"/json/auto/list-issueexpertise"
request
(route/restricted (list-issueexpertise request)))
(GET
"/json/auto/list-issueexpertise-by-canvasser"
request
(route/restricted (list-issueexpertise-by-canvasser request)))
(GET
"/json/auto/list-issueexpertise-by-followupmethod"
request
(route/restricted (list-issueexpertise-by-followupmethod request)))
(GET
"/json/auto/list-issueexpertise-by-issue"
request
(route/restricted (list-issueexpertise-by-issue request)))
(GET
"/json/auto/list-issues"
request
@ -544,18 +452,6 @@
"/json/auto/list-options"
request
(route/restricted (list-options request)))
(GET
"/json/auto/list-rolememberships"
request
(route/restricted (list-rolememberships request)))
(GET
"/json/auto/list-rolememberships-by-canvasser"
request
(route/restricted (list-rolememberships-by-canvasser request)))
(GET
"/json/auto/list-rolememberships-by-role"
request
(route/restricted (list-rolememberships-by-role request)))
(GET
"/json/auto/list-roles"
request
@ -564,30 +460,6 @@
"/json/auto/list-roles-by-canvasser"
request
(route/restricted (list-roles-by-canvasser request)))
(GET
"/json/auto/list-teammemberships"
request
(route/restricted (list-teammemberships request)))
(GET
"/json/auto/list-teammemberships-by-canvasser"
request
(route/restricted (list-teammemberships-by-canvasser request)))
(GET
"/json/auto/list-teammemberships-by-team"
request
(route/restricted (list-teammemberships-by-team request)))
(GET
"/json/auto/list-teamorganiserships"
request
(route/restricted (list-teamorganiserships request)))
(GET
"/json/auto/list-teamorganiserships-by-canvasser"
request
(route/restricted (list-teamorganiserships-by-canvasser request)))
(GET
"/json/auto/list-teamorganiserships-by-team"
request
(route/restricted (list-teamorganiserships-by-team request)))
(GET
"/json/auto/list-teams"
request
@ -660,10 +532,6 @@
"/json/auto/search-strings-issue"
request
(route/restricted (search-strings-issue request)))
(GET
"/json/auto/search-strings-issueexpertise"
request
(route/restricted (search-strings-issueexpertise request)))
(GET
"/json/auto/search-strings-option"
request
@ -672,22 +540,10 @@
"/json/auto/search-strings-role"
request
(route/restricted (search-strings-role request)))
(GET
"/json/auto/search-strings-rolemembership"
request
(route/restricted (search-strings-rolemembership request)))
(GET
"/json/auto/search-strings-team"
request
(route/restricted (search-strings-team request)))
(GET
"/json/auto/search-strings-teammembership"
request
(route/restricted (search-strings-teammembership request)))
(GET
"/json/auto/search-strings-teamorganisership"
request
(route/restricted (search-strings-teamorganisership request)))
(GET
"/json/auto/search-strings-visit"
request
@ -728,30 +584,14 @@
"/json/auto/update-issue"
request
(route/restricted (update-issue! request)))
(POST
"/json/auto/update-issueexpertise"
request
(route/restricted (update-issueexpertise! request)))
(POST
"/json/auto/update-role"
request
(route/restricted (update-role! request)))
(POST
"/json/auto/update-rolemembership"
request
(route/restricted (update-rolemembership! request)))
(POST
"/json/auto/update-team"
request
(route/restricted (update-team! request)))
(POST
"/json/auto/update-teammembership"
request
(route/restricted (update-teammembership! request)))
(POST
"/json/auto/update-teamorganisership"
request
(route/restricted (update-teamorganisership! request)))
(POST
"/json/auto/update-visit"
request
@ -830,12 +670,6 @@
[{:keys [params]}]
(do (db/create-issue! params)))
(defn
create-issueexpertise!
"Auto-generated method to insert one record to the `issueexpertise` table. Expects the following key(s) to be present in `params`: `nil`. Returns a map containing the keys `nil` identifying the record created."
[{:keys [params]}]
(do (db/create-issueexpertise! params)))
(defn
create-option!
"Auto-generated method to insert one record to the `options` table. Expects the following key(s) to be present in `params`: `nil`. Returns a map containing the keys `nil` identifying the record created."
@ -848,30 +682,12 @@
[{:keys [params]}]
(do (db/create-role! params)))
(defn
create-rolemembership!
"Auto-generated method to insert one record to the `rolememberships` table. Expects the following key(s) to be present in `params`: `nil`. Returns a map containing the keys `nil` identifying the record created."
[{:keys [params]}]
(do (db/create-rolemembership! params)))
(defn
create-team!
"Auto-generated method to insert one record to the `teams` table. Expects the following key(s) to be present in `params`: `nil`. Returns a map containing the keys `nil` identifying the record created."
[{:keys [params]}]
(do (db/create-team! params)))
(defn
create-teammembership!
"Auto-generated method to insert one record to the `teammemberships` table. Expects the following key(s) to be present in `params`: `nil`. Returns a map containing the keys `nil` identifying the record created."
[{:keys [params]}]
(do (db/create-teammembership! params)))
(defn
create-teamorganisership!
"Auto-generated method to insert one record to the `teamorganiserships` table. Expects the following key(s) to be present in `params`: `nil`. Returns a map containing the keys `nil` identifying the record created."
[{:keys [params]}]
(do (db/create-teamorganisership! params)))
(defn
create-visit!
"Auto-generated method to insert one record to the `visits` table. Expects the following key(s) to be present in `params`: `nil`. Returns a map containing the keys `nil` identifying the record created."
@ -962,13 +778,6 @@
(do (db/delete-issue! params))
(response/found "/"))
(defn
delete-issueexpertise!
"Auto-generated method to delete one record from the `issueexpertise` table. Expects the following key(s) to be present in `params`: ``."
[{:keys [params]}]
(do (db/delete-issueexpertise! params))
(response/found "/"))
(defn
delete-option!
"Auto-generated method to delete one record from the `options` table. Expects the following key(s) to be present in `params`: ``."
@ -983,13 +792,6 @@
(do (db/delete-role! params))
(response/found "/"))
(defn
delete-rolemembership!
"Auto-generated method to delete one record from the `rolememberships` table. Expects the following key(s) to be present in `params`: ``."
[{:keys [params]}]
(do (db/delete-rolemembership! params))
(response/found "/"))
(defn
delete-team!
"Auto-generated method to delete one record from the `teams` table. Expects the following key(s) to be present in `params`: ``."
@ -997,20 +799,6 @@
(do (db/delete-team! params))
(response/found "/"))
(defn
delete-teammembership!
"Auto-generated method to delete one record from the `teammemberships` table. Expects the following key(s) to be present in `params`: ``."
[{:keys [params]}]
(do (db/delete-teammembership! params))
(response/found "/"))
(defn
delete-teamorganisership!
"Auto-generated method to delete one record from the `teamorganiserships` table. Expects the following key(s) to be present in `params`: ``."
[{:keys [params]}]
(do (db/delete-teamorganisership! params))
(response/found "/"))
(defn
delete-visit!
"Auto-generated method to delete one record from the `visits` table. Expects the following key(s) to be present in `params`: ``."
@ -1096,12 +884,6 @@
[{:keys [params]}]
(do (db/get-issue params)))
(defn
get-issueexpertise
"Auto-generated method to select one record from the `issueexpertise` table. Expects the following key(s) to be present in `params`: `nil`. Returns a map containing the following keys: `(nil)`."
[{:keys [params]}]
(do (db/get-issueexpertise params)))
(defn
get-option
"Auto-generated method to select one record from the `options` table. Expects the following key(s) to be present in `params`: `nil`. Returns a map containing the following keys: `(nil)`."
@ -1115,10 +897,10 @@
(do (db/get-role params)))
(defn
get-rolemembership
"Auto-generated method to select one record from the `rolememberships` table. Expects the following key(s) to be present in `params`: `nil`. Returns a map containing the following keys: `(nil)`."
get-role-by-name
"Auto-generated method to select one record from the `roles` table. Expects the following key(s) to be present in `params`: `nil`. Returns a map containing the following keys: `(nil)`."
[{:keys [params]}]
(do (db/get-rolemembership params)))
(do (db/get-role-by-name params)))
(defn
get-team
@ -1126,18 +908,6 @@
[{:keys [params]}]
(do (db/get-team params)))
(defn
get-teammembership
"Auto-generated method to select one record from the `teammemberships` table. Expects the following key(s) to be present in `params`: `nil`. Returns a map containing the following keys: `(nil)`."
[{:keys [params]}]
(do (db/get-teammembership params)))
(defn
get-teamorganisership
"Auto-generated method to select one record from the `teamorganiserships` table. Expects the following key(s) to be present in `params`: `nil`. Returns a map containing the following keys: `(nil)`."
[{:keys [params]}]
(do (db/get-teamorganisership params)))
(defn
get-visit
"Auto-generated method to select one record from the `visits` table. Expects the following key(s) to be present in `params`: `nil`. Returns a map containing the following keys: `(nil)`."
@ -1295,27 +1065,6 @@
[{:keys [params]}]
(do (db/list-intentions-by-visit params)))
(defn
list-issueexpertise
"Auto-generated method to select all records from the `issueexpertise` table. If the keys `(:limit :offset)` are present in the request then they will be used to page through the data. Returns a sequence of maps each containing the following keys: `(nil)`."
[{:keys [params]}]
(do (db/list-issueexpertise params)))
(defn
list-issueexpertise-by-canvasser
[{:keys [params]}]
(do (db/list-issueexpertise-by-canvasser params)))
(defn
list-issueexpertise-by-followupmethod
[{:keys [params]}]
(do (db/list-issueexpertise-by-followupmethod params)))
(defn
list-issueexpertise-by-issue
[{:keys [params]}]
(do (db/list-issueexpertise-by-issue params)))
(defn
list-issues
"Auto-generated method to select all records from the `issues` table. If the keys `(:limit :offset)` are present in the request then they will be used to page through the data. Returns a sequence of maps each containing the following keys: `(nil)`."
@ -1328,22 +1077,6 @@
[{:keys [params]}]
(do (db/list-options params)))
(defn
list-rolememberships
"Auto-generated method to select all records from the `rolememberships` table. If the keys `(:limit :offset)` are present in the request then they will be used to page through the data. Returns a sequence of maps each containing the following keys: `(nil)`."
[{:keys [params]}]
(do (db/list-rolememberships params)))
(defn
list-rolememberships-by-canvasser
[{:keys [params]}]
(do (db/list-rolememberships-by-canvasser params)))
(defn
list-rolememberships-by-role
[{:keys [params]}]
(do (db/list-rolememberships-by-role params)))
(defn
list-roles
"Auto-generated method to select all records from the `roles` table. If the keys `(:limit :offset)` are present in the request then they will be used to page through the data. Returns a sequence of maps each containing the following keys: `(nil)`."
@ -1355,38 +1088,6 @@
[{:keys [params]}]
(do (db/list-roles-by-canvasser params)))
(defn
list-teammemberships
"Auto-generated method to select all records from the `teammemberships` table. If the keys `(:limit :offset)` are present in the request then they will be used to page through the data. Returns a sequence of maps each containing the following keys: `(nil)`."
[{:keys [params]}]
(do (db/list-teammemberships params)))
(defn
list-teammemberships-by-canvasser
[{:keys [params]}]
(do (db/list-teammemberships-by-canvasser params)))
(defn
list-teammemberships-by-team
[{:keys [params]}]
(do (db/list-teammemberships-by-team params)))
(defn
list-teamorganiserships
"Auto-generated method to select all records from the `teamorganiserships` table. If the keys `(:limit :offset)` are present in the request then they will be used to page through the data. Returns a sequence of maps each containing the following keys: `(nil)`."
[{:keys [params]}]
(do (db/list-teamorganiserships params)))
(defn
list-teamorganiserships-by-canvasser
[{:keys [params]}]
(do (db/list-teamorganiserships-by-canvasser params)))
(defn
list-teamorganiserships-by-team
[{:keys [params]}]
(do (db/list-teamorganiserships-by-team params)))
(defn
list-teams
"Auto-generated method to select all records from the `teams` table. If the keys `(:limit :offset)` are present in the request then they will be used to page through the data. Returns a sequence of maps each containing the following keys: `(nil)`."
@ -1491,12 +1192,6 @@
[{:keys [params]}]
(do (db/search-strings-issue params)))
(defn
search-strings-issueexpertise
"Auto-generated method to select all records from the `issueexpertise` table with any text field matching the value of the key `:pattern` which should be in the request. If the keys `(:limit :offset)` are present in the request then they will be used to page through the data. Returns a sequence of maps each containing the following keys: `(nil)`."
[{:keys [params]}]
(do (db/search-strings-issueexpertise params)))
(defn
search-strings-option
"Auto-generated method to select all records from the `options` table with any text field matching the value of the key `:pattern` which should be in the request. If the keys `(:limit :offset)` are present in the request then they will be used to page through the data. Returns a sequence of maps each containing the following keys: `(nil)`."
@ -1509,30 +1204,12 @@
[{:keys [params]}]
(do (db/search-strings-role params)))
(defn
search-strings-rolemembership
"Auto-generated method to select all records from the `rolememberships` table with any text field matching the value of the key `:pattern` which should be in the request. If the keys `(:limit :offset)` are present in the request then they will be used to page through the data. Returns a sequence of maps each containing the following keys: `(nil)`."
[{:keys [params]}]
(do (db/search-strings-rolemembership params)))
(defn
search-strings-team
"Auto-generated method to select all records from the `teams` table with any text field matching the value of the key `:pattern` which should be in the request. If the keys `(:limit :offset)` are present in the request then they will be used to page through the data. Returns a sequence of maps each containing the following keys: `(nil)`."
[{:keys [params]}]
(do (db/search-strings-team params)))
(defn
search-strings-teammembership
"Auto-generated method to select all records from the `teammemberships` table with any text field matching the value of the key `:pattern` which should be in the request. If the keys `(:limit :offset)` are present in the request then they will be used to page through the data. Returns a sequence of maps each containing the following keys: `(nil)`."
[{:keys [params]}]
(do (db/search-strings-teammembership params)))
(defn
search-strings-teamorganisership
"Auto-generated method to select all records from the `teamorganiserships` table with any text field matching the value of the key `:pattern` which should be in the request. If the keys `(:limit :offset)` are present in the request then they will be used to page through the data. Returns a sequence of maps each containing the following keys: `(nil)`."
[{:keys [params]}]
(do (db/search-strings-teamorganisership params)))
(defn
search-strings-visit
"Auto-generated method to select all records from the `visits` table with any text field matching the value of the key `:pattern` which should be in the request. If the keys `(:limit :offset)` are present in the request then they will be used to page through the data. Returns a sequence of maps each containing the following keys: `(nil)`."
@ -1602,13 +1279,6 @@
(do (db/update-issue! params))
(response/found "/"))
(defn
update-issueexpertise!
"Auto-generated method to update one record in the `issueexpertise` table. Expects the following key(s) to be present in `params`: `(nil)`."
[{:keys [params]}]
(do (db/update-issueexpertise! params))
(response/found "/"))
(defn
update-role!
"Auto-generated method to update one record in the `roles` table. Expects the following key(s) to be present in `params`: `(nil)`."
@ -1616,13 +1286,6 @@
(do (db/update-role! params))
(response/found "/"))
(defn
update-rolemembership!
"Auto-generated method to update one record in the `rolememberships` table. Expects the following key(s) to be present in `params`: `(nil)`."
[{:keys [params]}]
(do (db/update-rolemembership! params))
(response/found "/"))
(defn
update-team!
"Auto-generated method to update one record in the `teams` table. Expects the following key(s) to be present in `params`: `(nil)`."
@ -1630,20 +1293,6 @@
(do (db/update-team! params))
(response/found "/"))
(defn
update-teammembership!
"Auto-generated method to update one record in the `teammemberships` table. Expects the following key(s) to be present in `params`: `(nil)`."
[{:keys [params]}]
(do (db/update-teammembership! params))
(response/found "/"))
(defn
update-teamorganisership!
"Auto-generated method to update one record in the `teamorganiserships` table. Expects the following key(s) to be present in `params`: `(nil)`."
[{:keys [params]}]
(do (db/update-teamorganisership! params))
(response/found "/"))
(defn
update-visit!
"Auto-generated method to update one record in the `visits` table. Expects the following key(s) to be present in `params`: `(nil)`."

View file

@ -56,7 +56,7 @@
<documentation>All users of the canvasser app Able to read and add canvassing data in a limited
radius around their current position. </documentation>
</group>
<group name="teamorganiser" parent="canvassers">
<group name="teamorganisers" parent="canvassers">
<documentation>Organisers of canvassing teams Able to see and modify data on the canvassers in
the team(s) they organise; able to add canvassers to their team; able to update canvassers in
their team, including resetting passwords and locking accounts; able to see canvass data over
@ -101,13 +101,19 @@
<prompt prompt="email" locale="en-GB"/>
</property>
<property name="gender" type="entity" column="gender" entity="genders" farkey="id"
default="Unknown">
default="Unknown" distinct="user">
<prompt prompt="gender" locale="en-GB"/>
</property>
<list name="Electors" properties="all"/>
<form name="Elector" properties="all"/>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<entity name="genders" natural-key="id" magnitude="1">
<entity name="genders" magnitude="1">
<documentation>All genders which may be assigned to electors.</documentation>
<key>
<property name="id" type="string" size="32" distinct="all">
@ -116,6 +122,12 @@
</key>
<list name="Genders" properties="all"/>
<form name="Gender" properties="all"/>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<entity name="dwellings" magnitude="6">
<documentation>All dwellings within addresses in the system; a dwelling is a house, flat or appartment in which electors live.</documentation>
@ -124,12 +136,18 @@
<prompt prompt="id" locale="en-GB"/>
</property>
</key>
<property required="true" type="entity" name="address_id" column="address_id" entity="address" farkey="id">
<property required="true" type="entity" name="address_id" column="address_id" entity="addresses" farkey="id" distinct="user">
<prompt prompt="Building Address" locale="en-GB"/>
</property>
<property required="false" type="string" size="32" name="sub-address"/>
<property required="false" type="string" size="32" name="sub-address" distinct="user"/>
<list name="Dwellings" properties="all"/>
<form name="Dwelling" properties="all"/>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<entity name="addresses" magnitude="6">
<documentation>Addresses of all buildings which contain dwellings.</documentation>
@ -156,11 +174,46 @@
<property type="real" name="longitude" column="longitude">
<prompt prompt="longitude" locale="en-GB"/>
</property>
<permission group="admin" permission="all"/>
<property type="integer" name="locality" column="locality">
<documentation>
Locality indexing; see issue #44. Note that this property should be generated
automatically from the latitude and longitude:
(+
(* 10000 ;; left-shift the latitude component four digits
(integer
(* latitude 1000)))
(- ;; invert the sign of the longitude component, since
;; we're interested in localities West of Greenwich.
(integer
(* longitude 1000))))
We'll use a trigger to insert this. I don't think it will ever appear in the user
interface; it's an implementation detail, not of interest to users.
</documentation>
</property>
<list properties="listed" name="Addresses">
<field property="id"><prompt prompt="id" locale="en-GB"/></field>
<field property="address"><prompt prompt="address" locale="en-GB"/></field>
<field property="postcode"><prompt prompt="postcode" locale="en-GB"/></field>
<field property="phone"><prompt prompt="phone" locale="en-GB"/></field>
<field property="district_id"><prompt prompt="district_id" locale="en-GB"/></field>
<field property="latitude"><prompt prompt="latitude" locale="en-GB"/></field>
<field property="longitude"><prompt prompt="longitude" locale="en-GB"/></field>
</list>
<form properties="listed" name="Address">
<field property="id"><prompt prompt="id" locale="en-GB"/></field>
<field property="address"><prompt prompt="address" locale="en-GB"/></field>
<field property="postcode"><prompt prompt="postcode" locale="en-GB"/></field>
<field property="phone"><prompt prompt="phone" locale="en-GB"/></field>
<field property="district_id"><prompt prompt="district_id" locale="en-GB"/></field>
<field property="latitude"><prompt prompt="latitude" locale="en-GB"/></field>
<field property="longitude"><prompt prompt="longitude" locale="en-GB"/></field>
</form>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<list name="Addresses" properties="all"/>
<form name="Address" properties="all"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<entity name="visits" magnitude="7">
<documentation>All visits made by canvassers to dwellings in which opinions were recorded.</documentation>
@ -170,18 +223,24 @@
</property>
</key>
<property required="true" type="entity" name="address_id" column="address_id"
entity="addresses" farkey="id">
entity="addresses" farkey="id" distinct="user">
<prompt prompt="address_id" locale="en-GB"/>
</property>
<property required="true" type="entity" name="canvasser_id" column="canvasser_id"
entity="canvassers" farkey="id">
<prompt prompt="canvasser_id" locale="en-GB"/>
</property>
<property required="true" default="" type="timestamp" name="date" column="date">
<property required="true" type="timestamp" name="date" column="date" default="now()" distinct="user">
<prompt prompt="date" locale="en-GB"/>
</property>
<permission group="public" permission="read"/>
<permission group="canvassers" permission="insert"/>
<permission group="canvassers" permission="noedit">
<documentation>But only in their immediate area.</documentation>
</permission>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
<list name="Visits" properties="all"/>
<form name="Visit" properties="all"/>
</entity>
@ -194,6 +253,12 @@
</key>
<list name="Authorities" properties="all"/>
<form name="Authority" properties="all"/>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<entity name="issues" magnitude="1">
<documentation>Issues believed to be of interest to electors, about which they may have questions.</documentation>
@ -210,6 +275,12 @@
</property>
<list name="Issues" properties="all"/>
<form name="Issue" properties="all"/>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="edit"/>
<permission group="admin" permission="all"/>
</entity>
<entity name="intentions" magnitude="6">
<documentation>Link table.</documentation>
@ -227,6 +298,16 @@
</property>
<list name="Intentions" properties="all"/>
<form name="Intention" properties="all"/>
<permission group="canvassers" permission="noedit">
<documentation>But only for intentions in their immediate locality.</documentation>
</permission>
<permission group="teamorganisers" permission="none"/>
<permission group="issueexperts" permission="none"/>
<permission group="analysts" permission="read">
<documentation>Can see all recorded intentions across the whole of Scotland.</documentation>
</permission>
<permission group="issueeditors" permission="none"/>
<permission group="admin" permission="all"/>
</entity>
<entity name="canvassers" magnitude="5">
<documentation>Primary users of the system: those actually interviewing electors.</documentation>
@ -261,13 +342,13 @@
<property type="boolean" name="authorised" column="authorised">
<prompt prompt="authorised" locale="en-GB"/>
</property>
<property type="link" name="roles" entity="role" farkey="role_id">
<property type="link" name="roles" entity="roles" farkey="role_id">
<prompt prompt="Roles" locale="en-GB"/>
</property>
<permission group="canvassers" permission="edit">
<documentation>But only their own record</documentation>
</permission>
<permission group="teamleaders" permission="edit">
<permission group="teamorganisers" permission="edit">
<documentation>But only canvassers in their own team.</documentation>
</permission>
<permission group="admin" permission="all">
@ -275,6 +356,14 @@
</permission>
<list name="Canvassers" properties="all"/>
<form name="Canvasser" properties="all"/>
<permission group="canvassers" permission="edit">
<documentation>But should only be able to edit their own record.</documentation>
</permission>
<permission group="teamorganisers" permission="edit"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<entity name="followuprequests" magnitude="7">
<documentation>Requests for a followup with an issue expert</documentation>
@ -284,15 +373,15 @@
</property>
</key>
<property required="true" type="entity" name="elector_id" column="elector_id" entity="electors"
farkey="id">
farkey="id" distinct="user">
<prompt prompt="elector_id" locale="en-GB"/>
</property>
<property required="true" type="entity" name="visit_id" column="visit_id" entity="visits"
farkey="id">
farkey="id" distinct="user">
<prompt prompt="visit_id" locale="en-GB"/>
</property>
<property required="true" type="entity" name="issue_id" column="issue_id" entity="issues"
farkey="id">
farkey="id" distinct="user">
<prompt prompt="issue_id" locale="en-GB"/>
</property>
<property required="true" type="entity" name="method_id" column="method_id"
@ -301,17 +390,12 @@
</property>
<list name="Followuprequests" properties="all"/>
<form name="Followuprequest" properties="all"/>
</entity>
<entity name="rolememberships" magnitude="6">
<documentation>Link table</documentation>
<property required="true" type="entity" entity="roles" farkey="id" name="role_id"
column="role_id">
<prompt prompt="role_id" locale="en-GB"/>
</property>
<property required="true" type="entity" entity="canvassers" farkey="id" name="canvasser_id"
column="canvasser_id">
<prompt prompt="canvasser_id" locale="en-GB"/>
</property>
<permission group="canvassers" permission="noedit"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<entity name="roles" magnitude="1">
<documentation>A role (essentially, the same as a group, but application layer rather than database layer) of which a user may be a member.</documentation>
@ -320,7 +404,7 @@
<prompt prompt="id" locale="en-GB"/>
</property>
</key>
<property required="true" type="string" name="name" column="name" size="64" distinct="user" immutable="true">
<property required="true" type="string" name="name" column="name" size="64" distinct="all" immutable="true">
<prompt prompt="name" locale="en-GB"/>
</property>
<property type="link" entity="canvassers" name="members">
@ -328,6 +412,12 @@
</property>
<list name="Roles" properties="all"/>
<form name="Role" properties="all"/>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<entity name="teams" magnitude="4">
<key>
@ -348,13 +438,19 @@
<property type="link" entity="canvassers" name="members">
<prompt prompt="Members" locale="en-GB"/>
</property>
<property type="link" entity="canvassers" name="organisers">
<prompt prompt="Organisers" locale="en-GB"/>
</property>
<property type="real" name="longitude" column="longitude">
<prompt prompt="longitude" locale="en-GB"/>
</property>
<permission group="canvassers" permission="read"/>
<permission group="groupleaders" permission="edit">
<permission group="teamorganisers" permission="edit">
<documentation>But only their own group(s)</documentation>
</permission>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all">
<documentation>All groups</documentation>
</permission>
@ -362,7 +458,7 @@
<form name="Team" properties="all"/>
</entity>
<entity name="districts" magnitude="4">
<documentation>Electoral districts</documentation>
<documentation>Electoral districts: TODO: Shape (polygon) information will need to be added, for use in maps.</documentation>
<key>
<property required="true" type="integer" name="id" column="id" immutable="true" distinct="system">
<prompt prompt="id" locale="en-GB"/>
@ -375,17 +471,12 @@
<permission group="admin" permission="all"></permission>
<list name="Districts" properties="all"/>
<form name="District" properties="all"/>
</entity>
<entity name="teamorganiserships" magnitude="4">
<documentation>Link table</documentation>
<property required="true" type="entity" entity="teams" farkey="id" name="team_id"
column="team_id">
<prompt prompt="team_id" locale="en-GB"/>
</property>
<property required="true" type="entity" entity="canvassers" farkey="id" name="canvasser_id"
column="canvasser_id">
<prompt prompt="canvasser_id" locale="en-GB"/>
</property>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<entity name="followupactions" magnitude="7">
<documentation>Actions taken on followup requests.</documentation>
@ -402,37 +493,25 @@
farkey="id">
<prompt prompt="actor" locale="en-GB"/>
</property>
<property required="true" default="" type="timestamp" name="date" column="date">
<property required="true" default="now()" type="timestamp" name="date" column="date" distinct="user">
<prompt prompt="date" locale="en-GB"/>
</property>
<property type="text" name="notes" column="notes">
<property type="text" name="notes" column="notes" distinct="user">
<prompt prompt="notes" locale="en-GB"/>
</property>
<property type="boolean" name="closed" column="closed" default="false">
<prompt prompt="closed" locale="en-GB"/>
</property>
<permission group="issueexperts" permission="insert"/>
<list name="Followupactions" properties="all"/>
<form name="Followupaction" properties="all"/>
<permission group="issueexperts" permission="noedit"/>
<permission group="canvassers" permission="read">
<documentation>But only for electors in their immediate vicinity</documentation>
</permission>
<permission group="teamorganisers" permission="none"/>
<permission group="analysts" permission="read"/>
<list name="Followupactions" properties="all"/>
<form name="Followupaction" properties="all"/>
</entity>
<entity name="issueexpertise" magnitude="5">
<documentation>Link table</documentation>
<property required="true" type="entity" name="canvasser_id" column="canvasser_id"
entity="canvassers" farkey="id">
<prompt prompt="canvasser_id" locale="en-GB"/>
</property>
<property required="true" type="entity" name="issue_id" column="issue_id" entity="issues"
farkey="id">
<prompt prompt="issue_id" locale="en-GB"/>
</property>
<property required="true" type="entity" name="method_id" column="method_id"
entity="followupmethods" farkey="id">
<prompt prompt="method_id" locale="en-GB"/>
</property>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<entity name="options" magnitude="1">
<documentation>Options in the election or referendum being canvassed on</documentation>
@ -443,17 +522,12 @@
</key>
<list name="Options" properties="all"/>
<form name="Option" properties="all"/>
</entity>
<entity name="teammemberships" magnitude="5">
<documentation>Link table</documentation>
<property required="true" type="entity" entity="teams" farkey="id" name="team_id"
column="team_id">
<prompt prompt="team_id" locale="en-GB"/>
</property>
<property required="true" type="entity" entity="canvassers" farkey="id" name="canvasser_id"
column="canvasser_id">
<prompt prompt="canvasser_id" locale="en-GB"/>
</property>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<entity name="followupmethods" magnitude="1">
<key>
@ -463,5 +537,11 @@
</key>
<list name="Followupmethods" properties="all"/>
<form name="Followupmethod" properties="all"/>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
</application>

View file

@ -64,7 +64,7 @@
<documentation>All users of the canvasser app Able to read and add canvassing data in a limited
radius around their current position. </documentation>
</group>
<group name="teamorganiser" parent="canvassers">
<group name="teamorganisers" parent="canvassers">
<documentation>Organisers of canvassing teams Able to see and modify data on the canvassers in
the team(s) they organise; able to add canvassers to their team; able to update canvassers in
their team, including resetting passwords and locking accounts; able to see canvass data over
@ -110,36 +110,36 @@
<property size="128" type="string" name="email" column="email" distinct="user">
<prompt prompt="email" locale="en-GB"/>
</property>
<property name="gender" type="entity" column="gender" entity="genders" farkey="id" default="Unknown">
<property name="gender" type="entity" column="gender" entity="genders" farkey="id" default="Unknown" distinct="user">
<prompt prompt="gender" locale="en-GB"/>
</property>
<list properties="listed" name="Electors"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="name"><prompt prompt="name" locale="en-GB"/></field><field property="dwelling_id"><prompt prompt="Flat" locale="en-GB"/></field><field property="phone"><prompt prompt="phone" locale="en-GB"/></field><field property="email"><prompt prompt="email" locale="en-GB"/></field><field property="gender"><prompt prompt="gender" locale="en-GB"/></field></list>
<form properties="listed" name="Elector"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="name"><prompt prompt="name" locale="en-GB"/></field><field property="dwelling_id"><prompt prompt="Flat" locale="en-GB"/></field><field property="phone"><prompt prompt="phone" locale="en-GB"/></field><field property="email"><prompt prompt="email" locale="en-GB"/></field><field property="gender"><prompt prompt="gender" locale="en-GB"/></field></form>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<entity table="genders" name="genders" natural-key="id" magnitude="1">
<!--
entity genders already has a key - not generating one
-->
<entity table="genders" name="genders" magnitude="1">
<documentation>All genders which may be assigned to electors.</documentation>
<key>
<property name="id" type="string" size="32" distinct="all">
<prompt prompt="gender" locale="en-GB"/>
</property>
</key>
<permission permission="none" group="public"/>
<permission permission="none" group="canvassers"/>
<permission permission="none" group="teamorganiser"/>
<permission permission="none" group="issueexperts"/>
<permission permission="none" group="analysts"/>
<permission permission="none" group="issueeditors"/>
<permission permission="none" group="admin"/>
<list properties="listed" name="Genders">
<field property="id">
<prompt prompt="gender" locale="en-GB"/>
</field>
</list>
<form properties="listed" name="Gender">
<field property="id">
<prompt prompt="gender" locale="en-GB"/>
</field>
</form>
<list properties="listed" name="Genders"><field property="id"><prompt prompt="gender" locale="en-GB"/></field></list>
<form properties="listed" name="Gender"><field property="id"><prompt prompt="gender" locale="en-GB"/></field></form>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<!--
entity dwellings already has a key - not generating one
@ -151,12 +151,18 @@
<prompt prompt="id" locale="en-GB"/>
</property>
</key>
<property required="true" type="entity" name="address_id" column="address_id" entity="address" farkey="id">
<property required="true" type="entity" name="address_id" column="address_id" entity="addresses" farkey="id" distinct="user">
<prompt prompt="Building Address" locale="en-GB"/>
</property>
<property required="false" type="string" size="32" name="sub-address"/>
<property required="false" type="string" size="32" name="sub-address" distinct="user"/>
<list properties="listed" name="Dwellings"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="address_id"><prompt prompt="Building Address" locale="en-GB"/></field><field property="sub-address"/></list>
<form properties="listed" name="Dwelling"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="address_id"><prompt prompt="Building Address" locale="en-GB"/></field><field property="sub-address"/></form>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<!--
entity addresses already has a key - not generating one
@ -186,11 +192,46 @@
<property type="real" name="longitude" column="longitude">
<prompt prompt="longitude" locale="en-GB"/>
</property>
<permission group="admin" permission="all"/>
<property type="integer" name="locality" column="locality">
<documentation>
Locality indexing; see issue #44. Note that this property should be generated
automatically from the latitude and longitude:
(+
(* 10000 ;; left-shift the latitude component four digits
(integer
(* latitude 1000)))
(- ;; invert the sign of the longitude component, since
;; we're interested in localities West of Greenwich.
(integer
(* longitude 1000))))
We'll use a trigger to insert this. I don't think it will ever appear in the user
interface; it's an implementation detail, not of interest to users.
</documentation>
</property>
<list properties="listed" name="Addresses">
<field property="id"><prompt prompt="id" locale="en-GB"/></field>
<field property="address"><prompt prompt="address" locale="en-GB"/></field>
<field property="postcode"><prompt prompt="postcode" locale="en-GB"/></field>
<field property="phone"><prompt prompt="phone" locale="en-GB"/></field>
<field property="district_id"><prompt prompt="district_id" locale="en-GB"/></field>
<field property="latitude"><prompt prompt="latitude" locale="en-GB"/></field>
<field property="longitude"><prompt prompt="longitude" locale="en-GB"/></field>
</list>
<form properties="listed" name="Address">
<field property="id"><prompt prompt="id" locale="en-GB"/></field>
<field property="address"><prompt prompt="address" locale="en-GB"/></field>
<field property="postcode"><prompt prompt="postcode" locale="en-GB"/></field>
<field property="phone"><prompt prompt="phone" locale="en-GB"/></field>
<field property="district_id"><prompt prompt="district_id" locale="en-GB"/></field>
<field property="latitude"><prompt prompt="latitude" locale="en-GB"/></field>
<field property="longitude"><prompt prompt="longitude" locale="en-GB"/></field>
</form>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<list properties="listed" name="Addresses"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="address"><prompt prompt="address" locale="en-GB"/></field><field property="postcode"><prompt prompt="postcode" locale="en-GB"/></field><field property="phone"><prompt prompt="phone" locale="en-GB"/></field><field property="district_id"><prompt prompt="district_id" locale="en-GB"/></field><field property="latitude"><prompt prompt="latitude" locale="en-GB"/></field><field property="longitude"><prompt prompt="longitude" locale="en-GB"/></field></list>
<form properties="listed" name="Address"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="address"><prompt prompt="address" locale="en-GB"/></field><field property="postcode"><prompt prompt="postcode" locale="en-GB"/></field><field property="phone"><prompt prompt="phone" locale="en-GB"/></field><field property="district_id"><prompt prompt="district_id" locale="en-GB"/></field><field property="latitude"><prompt prompt="latitude" locale="en-GB"/></field><field property="longitude"><prompt prompt="longitude" locale="en-GB"/></field></form>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<!--
entity visits already has a key - not generating one
@ -202,17 +243,23 @@
<prompt prompt="id" locale="en-GB"/>
</property>
</key>
<property required="true" type="entity" name="address_id" column="address_id" entity="addresses" farkey="id">
<property required="true" type="entity" name="address_id" column="address_id" entity="addresses" farkey="id" distinct="user">
<prompt prompt="address_id" locale="en-GB"/>
</property>
<property required="true" type="entity" name="canvasser_id" column="canvasser_id" entity="canvassers" farkey="id">
<prompt prompt="canvasser_id" locale="en-GB"/>
</property>
<property required="true" default="" type="timestamp" name="date" column="date">
<property required="true" type="timestamp" name="date" column="date" default="now()" distinct="user">
<prompt prompt="date" locale="en-GB"/>
</property>
<permission group="public" permission="read"/>
<permission group="canvassers" permission="insert"/>
<permission group="canvassers" permission="noedit">
<documentation>But only in their immediate area.</documentation>
</permission>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
<list properties="listed" name="Visits"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="address_id"><prompt prompt="address_id" locale="en-GB"/></field><field property="canvasser_id"><prompt prompt="canvasser_id" locale="en-GB"/></field><field property="date"><prompt prompt="date" locale="en-GB"/></field></list>
<form properties="listed" name="Visit"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="address_id"><prompt prompt="address_id" locale="en-GB"/></field><field property="canvasser_id"><prompt prompt="canvasser_id" locale="en-GB"/></field><field property="date"><prompt prompt="date" locale="en-GB"/></field></form>
</entity>
@ -228,6 +275,12 @@
</key>
<list properties="listed" name="Authorities"><field property="id"><prompt prompt="id" locale="en-GB"/></field></list>
<form properties="listed" name="Authority"><field property="id"><prompt prompt="id" locale="en-GB"/></field></form>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<!--
entity issues already has a key - not generating one
@ -247,6 +300,12 @@
</property>
<list properties="listed" name="Issues"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="url"><prompt prompt="url" locale="en-GB"/></field><field property="current"><prompt prompt="Is current?" locale="en-GB"/></field></list>
<form properties="listed" name="Issue"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="url"><prompt prompt="url" locale="en-GB"/></field><field property="current"><prompt prompt="Is current?" locale="en-GB"/></field></form>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="edit"/>
<permission group="admin" permission="all"/>
</entity>
<!--
entity intentions has no key - generating one
@ -271,12 +330,12 @@
<prompt prompt="option_id" locale="en-GB"/>
</property>
<permission permission="none" group="public"/>
<permission permission="none" group="canvassers"/>
<permission permission="none" group="teamorganiser"/>
<permission permission="none" group="issueexperts"/>
<permission permission="none" group="analysts"/>
<permission permission="none" group="issueeditors"/>
<permission permission="none" group="admin"/>
<permission group="canvassers" permission="noedit"/>
<permission group="teamorganisers" permission="none"/>
<permission group="issueexperts" permission="none"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="none"/>
<permission group="admin" permission="all"/>
<list properties="listed" name="Intentions">
<field property="visit_id">
<prompt prompt="visit_id" locale="en-GB"/>
@ -334,13 +393,13 @@
<property type="boolean" name="authorised" column="authorised">
<prompt prompt="authorised" locale="en-GB"/>
</property>
<property type="link" name="roles" entity="role" farkey="role_id">
<property type="link" name="roles" entity="roles" farkey="role_id">
<prompt prompt="Roles" locale="en-GB"/>
</property>
<permission group="canvassers" permission="edit">
<documentation>But only their own record</documentation>
</permission>
<permission group="teamleaders" permission="edit">
<permission group="teamorganisers" permission="edit">
<documentation>But only canvassers in their own team.</documentation>
</permission>
<permission group="admin" permission="all">
@ -348,6 +407,14 @@
</permission>
<list properties="listed" name="Canvassers"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="username"><prompt prompt="username" locale="en-GB"/></field><field property="fullname"><prompt prompt="fullname" locale="en-GB"/></field><field property="elector_id"><prompt prompt="elector_id" locale="en-GB"/></field><field property="address_id"><prompt prompt="address_id" locale="en-GB"/></field><field property="phone"><prompt prompt="phone" locale="en-GB"/></field><field property="email"><prompt prompt="email" locale="en-GB"/></field><field property="authority_id"><prompt prompt="authority_id" locale="en-GB"/></field><field property="authorised"><prompt prompt="authorised" locale="en-GB"/></field></list>
<form properties="listed" name="Canvasser"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="username"><prompt prompt="username" locale="en-GB"/></field><field property="fullname"><prompt prompt="fullname" locale="en-GB"/></field><field property="elector_id"><prompt prompt="elector_id" locale="en-GB"/></field><field property="address_id"><prompt prompt="address_id" locale="en-GB"/></field><field property="phone"><prompt prompt="phone" locale="en-GB"/></field><field property="email"><prompt prompt="email" locale="en-GB"/></field><field property="authority_id"><prompt prompt="authority_id" locale="en-GB"/></field><field property="authorised"><prompt prompt="authorised" locale="en-GB"/></field><field property="roles"><prompt prompt="Roles" locale="en-GB"/></field></form>
<permission group="canvassers" permission="edit">
<documentation>But should only be able to edit their own record.</documentation>
</permission>
<permission group="teamorganisers" permission="edit"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<!--
entity followuprequests already has a key - not generating one
@ -359,13 +426,13 @@
<prompt prompt="id" locale="en-GB"/>
</property>
</key>
<property required="true" type="entity" name="elector_id" column="elector_id" entity="electors" farkey="id">
<property required="true" type="entity" name="elector_id" column="elector_id" entity="electors" farkey="id" distinct="user">
<prompt prompt="elector_id" locale="en-GB"/>
</property>
<property required="true" type="entity" name="visit_id" column="visit_id" entity="visits" farkey="id">
<property required="true" type="entity" name="visit_id" column="visit_id" entity="visits" farkey="id" distinct="user">
<prompt prompt="visit_id" locale="en-GB"/>
</property>
<property required="true" type="entity" name="issue_id" column="issue_id" entity="issues" farkey="id">
<property required="true" type="entity" name="issue_id" column="issue_id" entity="issues" farkey="id" distinct="user">
<prompt prompt="issue_id" locale="en-GB"/>
</property>
<property required="true" type="entity" name="method_id" column="method_id" entity="followupmethods" farkey="id">
@ -373,33 +440,12 @@
</property>
<list properties="listed" name="Followuprequests"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="elector_id"><prompt prompt="elector_id" locale="en-GB"/></field><field property="visit_id"><prompt prompt="visit_id" locale="en-GB"/></field><field property="issue_id"><prompt prompt="issue_id" locale="en-GB"/></field><field property="method_id"><prompt prompt="method_id" locale="en-GB"/></field></list>
<form properties="listed" name="Followuprequest"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="elector_id"><prompt prompt="elector_id" locale="en-GB"/></field><field property="visit_id"><prompt prompt="visit_id" locale="en-GB"/></field><field property="issue_id"><prompt prompt="issue_id" locale="en-GB"/></field><field property="method_id"><prompt prompt="method_id" locale="en-GB"/></field></form>
</entity>
<!--
entity rolememberships has no key - generating one
-->
<entity table="rolememberships" name="rolememberships" magnitude="6">
<documentation>Link table</documentation>
<key>
<property type="integer" distinct="system" required="true" name="Id">
<generator action="native"/>
<documentation>
Auto-generated abstract primary key
</documentation>
</property>
</key>
<property required="true" type="entity" entity="roles" farkey="id" name="role_id" column="role_id">
<prompt prompt="role_id" locale="en-GB"/>
</property>
<property required="true" type="entity" entity="canvassers" farkey="id" name="canvasser_id" column="canvasser_id">
<prompt prompt="canvasser_id" locale="en-GB"/>
</property>
<permission permission="none" group="public"/>
<permission permission="none" group="canvassers"/>
<permission permission="none" group="teamorganiser"/>
<permission permission="none" group="issueexperts"/>
<permission permission="none" group="analysts"/>
<permission permission="none" group="issueeditors"/>
<permission permission="none" group="admin"/>
<permission group="canvassers" permission="noedit"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<!--
entity roles already has a key - not generating one
@ -411,7 +457,7 @@
<prompt prompt="id" locale="en-GB"/>
</property>
</key>
<property required="true" type="string" name="name" column="name" size="64" distinct="user" immutable="true">
<property required="true" type="string" name="name" column="name" size="64" distinct="all" immutable="true">
<prompt prompt="name" locale="en-GB"/>
</property>
<property type="link" entity="canvassers" name="members">
@ -419,6 +465,12 @@
</property>
<list properties="listed" name="Roles"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="name"><prompt prompt="name" locale="en-GB"/></field></list>
<form properties="listed" name="Role"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="name"><prompt prompt="name" locale="en-GB"/></field><field property="members"><prompt prompt="Members" locale="en-GB"/></field></form>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<!--
entity teams already has a key - not generating one
@ -441,24 +493,30 @@
<property type="link" entity="canvassers" name="members">
<prompt prompt="Members" locale="en-GB"/>
</property>
<property type="link" entity="canvassers" name="organisers">
<prompt prompt="Organisers" locale="en-GB"/>
</property>
<property type="real" name="longitude" column="longitude">
<prompt prompt="longitude" locale="en-GB"/>
</property>
<permission group="canvassers" permission="read"/>
<permission group="groupleaders" permission="edit">
<permission group="teamorganisers" permission="edit">
<documentation>But only their own group(s)</documentation>
</permission>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all">
<documentation>All groups</documentation>
</permission>
<list properties="listed" name="Teams"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="name"><prompt prompt="name" locale="en-GB"/></field><field property="district_id"><prompt prompt="district_id" locale="en-GB"/></field><field property="latitude"><prompt prompt="latitude" locale="en-GB"/></field><field property="longitude"><prompt prompt="longitude" locale="en-GB"/></field></list>
<form properties="listed" name="Team"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="name"><prompt prompt="name" locale="en-GB"/></field><field property="district_id"><prompt prompt="district_id" locale="en-GB"/></field><field property="latitude"><prompt prompt="latitude" locale="en-GB"/></field><field property="members"><prompt prompt="Members" locale="en-GB"/></field><field property="longitude"><prompt prompt="longitude" locale="en-GB"/></field></form>
<form properties="listed" name="Team"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="name"><prompt prompt="name" locale="en-GB"/></field><field property="district_id"><prompt prompt="district_id" locale="en-GB"/></field><field property="latitude"><prompt prompt="latitude" locale="en-GB"/></field><field property="members"><prompt prompt="Members" locale="en-GB"/></field><field property="organisers"><prompt prompt="Organisers" locale="en-GB"/></field><field property="longitude"><prompt prompt="longitude" locale="en-GB"/></field></form>
</entity>
<!--
entity districts already has a key - not generating one
-->
<entity table="districts" name="districts" magnitude="4">
<documentation>Electoral districts</documentation>
<documentation>Electoral districts: TODO: Shape (polygon) information will need to be added, for use in maps.</documentation>
<key>
<property required="true" type="integer" name="id" column="id" immutable="true" distinct="system">
<prompt prompt="id" locale="en-GB"/>
@ -471,33 +529,12 @@
<permission group="admin" permission="all"/>
<list properties="listed" name="Districts"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="name"><prompt prompt="name" locale="en-GB"/></field></list>
<form properties="listed" name="District"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="name"><prompt prompt="name" locale="en-GB"/></field></form>
</entity>
<!--
entity teamorganiserships has no key - generating one
-->
<entity table="teamorganiserships" name="teamorganiserships" magnitude="4">
<documentation>Link table</documentation>
<key>
<property type="integer" distinct="system" required="true" name="Id">
<generator action="native"/>
<documentation>
Auto-generated abstract primary key
</documentation>
</property>
</key>
<property required="true" type="entity" entity="teams" farkey="id" name="team_id" column="team_id">
<prompt prompt="team_id" locale="en-GB"/>
</property>
<property required="true" type="entity" entity="canvassers" farkey="id" name="canvasser_id" column="canvasser_id">
<prompt prompt="canvasser_id" locale="en-GB"/>
</property>
<permission permission="none" group="public"/>
<permission permission="none" group="canvassers"/>
<permission permission="none" group="teamorganiser"/>
<permission permission="none" group="issueexperts"/>
<permission permission="none" group="analysts"/>
<permission permission="none" group="issueeditors"/>
<permission permission="none" group="admin"/>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<!--
entity followupactions already has a key - not generating one
@ -515,52 +552,25 @@
<property required="true" type="entity" name="actor" column="actor" entity="canvassers" farkey="id">
<prompt prompt="actor" locale="en-GB"/>
</property>
<property required="true" default="" type="timestamp" name="date" column="date">
<property required="true" default="now()" type="timestamp" name="date" column="date" distinct="user">
<prompt prompt="date" locale="en-GB"/>
</property>
<property type="text" name="notes" column="notes">
<property type="text" name="notes" column="notes" distinct="user">
<prompt prompt="notes" locale="en-GB"/>
</property>
<property type="boolean" name="closed" column="closed" default="false">
<prompt prompt="closed" locale="en-GB"/>
</property>
<permission group="issueexperts" permission="insert"/>
<list properties="listed" name="Followupactions"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="request_id"><prompt prompt="request_id" locale="en-GB"/></field><field property="actor"><prompt prompt="actor" locale="en-GB"/></field><field property="date"><prompt prompt="date" locale="en-GB"/></field><field property="notes"><prompt prompt="notes" locale="en-GB"/></field><field property="closed"><prompt prompt="closed" locale="en-GB"/></field></list>
<form properties="listed" name="Followupaction"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="request_id"><prompt prompt="request_id" locale="en-GB"/></field><field property="actor"><prompt prompt="actor" locale="en-GB"/></field><field property="date"><prompt prompt="date" locale="en-GB"/></field><field property="notes"><prompt prompt="notes" locale="en-GB"/></field><field property="closed"><prompt prompt="closed" locale="en-GB"/></field></form>
<permission group="issueexperts" permission="noedit"/>
<permission group="canvassers" permission="read">
<documentation>But only for electors in their immediate vicinity</documentation>
</permission>
<permission group="teamorganisers" permission="none"/>
<permission group="analysts" permission="read"/>
<list properties="listed" name="Followupactions"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="request_id"><prompt prompt="request_id" locale="en-GB"/></field><field property="actor"><prompt prompt="actor" locale="en-GB"/></field><field property="date"><prompt prompt="date" locale="en-GB"/></field><field property="notes"><prompt prompt="notes" locale="en-GB"/></field><field property="closed"><prompt prompt="closed" locale="en-GB"/></field></list>
<form properties="listed" name="Followupaction"><field property="id"><prompt prompt="id" locale="en-GB"/></field><field property="request_id"><prompt prompt="request_id" locale="en-GB"/></field><field property="actor"><prompt prompt="actor" locale="en-GB"/></field><field property="date"><prompt prompt="date" locale="en-GB"/></field><field property="notes"><prompt prompt="notes" locale="en-GB"/></field><field property="closed"><prompt prompt="closed" locale="en-GB"/></field></form>
</entity>
<!--
entity issueexpertise has no key - generating one
-->
<entity table="issueexpertise" name="issueexpertise" magnitude="5">
<documentation>Link table</documentation>
<key>
<property type="integer" distinct="system" required="true" name="Id">
<generator action="native"/>
<documentation>
Auto-generated abstract primary key
</documentation>
</property>
</key>
<property required="true" type="entity" name="canvasser_id" column="canvasser_id" entity="canvassers" farkey="id">
<prompt prompt="canvasser_id" locale="en-GB"/>
</property>
<property required="true" type="entity" name="issue_id" column="issue_id" entity="issues" farkey="id">
<prompt prompt="issue_id" locale="en-GB"/>
</property>
<property required="true" type="entity" name="method_id" column="method_id" entity="followupmethods" farkey="id">
<prompt prompt="method_id" locale="en-GB"/>
</property>
<permission permission="none" group="public"/>
<permission permission="none" group="canvassers"/>
<permission permission="none" group="teamorganiser"/>
<permission permission="none" group="issueexperts"/>
<permission permission="none" group="analysts"/>
<permission permission="none" group="issueeditors"/>
<permission permission="none" group="admin"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<!--
entity options already has a key - not generating one
@ -574,33 +584,12 @@
</key>
<list properties="listed" name="Options"><field property="id"><prompt prompt="id" locale="en-GB"/></field></list>
<form properties="listed" name="Option"><field property="id"><prompt prompt="id" locale="en-GB"/></field></form>
</entity>
<!--
entity teammemberships has no key - generating one
-->
<entity table="teammemberships" name="teammemberships" magnitude="5">
<documentation>Link table</documentation>
<key>
<property type="integer" distinct="system" required="true" name="Id">
<generator action="native"/>
<documentation>
Auto-generated abstract primary key
</documentation>
</property>
</key>
<property required="true" type="entity" entity="teams" farkey="id" name="team_id" column="team_id">
<prompt prompt="team_id" locale="en-GB"/>
</property>
<property required="true" type="entity" entity="canvassers" farkey="id" name="canvasser_id" column="canvasser_id">
<prompt prompt="canvasser_id" locale="en-GB"/>
</property>
<permission permission="none" group="public"/>
<permission permission="none" group="canvassers"/>
<permission permission="none" group="teamorganiser"/>
<permission permission="none" group="issueexperts"/>
<permission permission="none" group="analysts"/>
<permission permission="none" group="issueeditors"/>
<permission permission="none" group="admin"/>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
<!--
entity followupmethods already has a key - not generating one
@ -613,5 +602,11 @@
</key>
<list properties="listed" name="Followupmethods"><field property="id"><prompt prompt="id" locale="en-GB"/></field></list>
<form properties="listed" name="Followupmethod"><field property="id"><prompt prompt="id" locale="en-GB"/></field></form>
<permission group="canvassers" permission="read"/>
<permission group="teamorganisers" permission="read"/>
<permission group="issueexperts" permission="read"/>
<permission group="analysts" permission="read"/>
<permission group="issueeditors" permission="read"/>
<permission group="admin" permission="all"/>
</entity>
</application>