212 lines
6.6 KiB
HTML
212 lines
6.6 KiB
HTML
{% extends "base.html" %}
|
|
<!-- 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).-->
|
|
|
|
|
|
{% block extra-head %}
|
|
{% script "js/lib/node_modules/simplemde/dist/simplemde.min.js" %}
|
|
{% style "js/lib/node_modules/simplemde/dist/simplemde.min.css" %}
|
|
{% endblock %}
|
|
{% block content %}
|
|
<div id='content' class='edit'>
|
|
<form action='{{servlet-context}}/form-issues-Issue' method='POST'>
|
|
{% csrf-field %}
|
|
<p class='widget'>
|
|
<label for='id'>
|
|
Id
|
|
</label>
|
|
{% if {{record.id}} %}
|
|
{% 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 %}
|
|
{% 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 %}
|
|
{% 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 %}
|
|
{% 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 %}
|
|
{% 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 %}
|
|
{% 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}}
|
|
</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 %}
|
|
{% 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'>
|
|
<label for='save-button' class='action-safe'>
|
|
To save this issues record
|
|
</label>
|
|
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
|
|
</p>
|
|
{% endifmemberof %}
|
|
{% ifmemberof issueeditors admin %}
|
|
<p class='widget action-dangerous'>
|
|
<label for='delete-button' class='action-dangerous'>
|
|
To delete this issues record
|
|
</label>
|
|
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
|
|
</p>
|
|
{% endifmemberof %}
|
|
</form>
|
|
</div>
|
|
|
|
{% 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,
|
|
uniqueId: "Smeagol-{{page}}",
|
|
delay: 1000,
|
|
},
|
|
indentWithTabs: true,
|
|
insertTexts: {
|
|
horizontalRule: ["", "\n\n-----\n\n"],
|
|
image: [""],
|
|
link: ["[", "](http://)"],
|
|
table: ["", "\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],
|
|
},
|
|
showIcons: ["code"], //, "table"], - sadly, markdown-clj does not support tables
|
|
spellChecker: true,
|
|
status: ["autosave", "lines", "words", "cursor"]
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|