#17: progress, not complete.

This commit is contained in:
Simon Brooke 2018-07-09 22:00:39 +01:00
parent 0026218993
commit 9c3af4c936
58 changed files with 1896 additions and 463 deletions

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-issues-Issue.html generated 2018-07-07T08:09:49.935Z by adl.to-selmer-templates.
<!-- File form-issues-Issue.html generated 2018-07-09T20:55:34.521Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
@ -15,8 +15,9 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
<label for='id'>
Id
</label>
{% if {{record.id}} %}
{% ifmemberof issueeditors admin %}
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
@ -28,11 +29,27 @@ You are not permitted to view id of issues
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof issueeditors admin %}
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% else %}
<span id='id' name='id' class='pseudo-widget not-authorised'>
You are not permitted to view id of issues
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='url'>
Url
</label>
{% if {{record.url}} %}
{% ifmemberof issueeditors admin %}
<input id='url' name='url' type='string' value='{{record.url}}' maxlength='256' size='60'/>
{% else %}
@ -46,11 +63,27 @@ You are not permitted to view url of issues
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof issueeditors admin %}
<input id='url' name='url' type='string' value='{{record.url}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='url' name='url' class='pseudo-widget disabled'>
{{record.url}}
</span>
{% else %}
<span id='url' name='url' class='pseudo-widget not-authorised'>
You are not permitted to view url of issues
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='current'>
Current
</label>
{% if {{record.current}} %}
{% ifmemberof issueeditors admin %}
<input id='current' name='current' type='checkbox' value='{{record.current}}' maxlength='' size='16'/>
{% else %}
@ -64,11 +97,27 @@ You are not permitted to view current of issues
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof issueeditors admin %}
<input id='current' name='current' type='checkbox' value='{{record.current}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='current' name='current' class='pseudo-widget disabled'>
{{record.current}}
</span>
{% else %}
<span id='current' name='current' class='pseudo-widget not-authorised'>
You are not permitted to view current of issues
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='brief'>
Brief
</label>
{% if {{record.brief}} %}
{% ifmemberof issueeditors admin %}
<textarea rows='8' cols='60' id='brief' name='brief'>
{{record.brief}}
@ -84,6 +133,23 @@ You are not permitted to view brief of issues
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof issueeditors admin %}
<textarea rows='8' cols='60' id='brief' name='brief'>
{{record.brief}}
</textarea>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='brief' name='brief' class='pseudo-widget disabled'>
{{record.brief}}
</span>
{% else %}
<span id='brief' name='brief' class='pseudo-widget not-authorised'>
You are not permitted to view brief of issues
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof issueeditors admin %}
<p class='widget action-safe'>
@ -107,6 +173,21 @@ To delete this issues record
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
/**
* update the select menu with id `wid` from this `data` whose fields include
* this `entity_key` and these `fields`
*/
function updateMenuOptions(wid, entity_key, fields, data){
$('#' + wid).children().filter(function(){
return $(this).attr('selected') === undefined;
}).remove().end();
$.each(data, function(key, entry){
$('#' + wid).append(
$('<option></option>').attr('value', key).text(entry));
});
}
var simplemde = new SimpleMDE({
autosave: {
enabled: true,