-
Notifications
You must be signed in to change notification settings - Fork 1
/
note-edit.xhtml
46 lines (46 loc) · 2.37 KB
/
note-edit.xhtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0" encoding="UTF-8" ?>
<html version="XHTML+RDFa 1.0" xmlns="http://www.w3.org/1999/xhtml"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:dcterms="http://purl.org/dc/terms/">
<head>
<title resource="?this">{dcterms:date}</title>
<link id="topic" href="Topic" />
<link id="topic-search" href="topic-search.rq?results&tqx=out:sparql-json&q={q}" />
<script type="text/javascript" src="note.js"></script>
</head>
<body resource="?this" onload="comparison=calli.copyResourceData('#form')">
<div class="container">
<div class="page-header">
<h1><time datetime="{dcterms:date}" /></h1>
<script type="text/javascript">
$('h1 time[datetime]').text(calli.parseDateTime("{dcterms:date}").toLocaleString());
</script>
</div>
<form id="form" role="form" method="POST" action="" enctype="application/sparql-update" resource="?this" class="row"
onsubmit="calli.submitUpdate(comparison,event)">
<fieldset class="col-sm-4">
<div class="form-group">
<label for="comment">Comment</label>
<textarea id="comment" class="form-control"
onchange="calli.updateProperty(event, 'rdfs:comment')">{rdfs:comment}</textarea>
</div>
<div class="form-group">
<label for="topics">Topics</label>
<select id="topics" class="form-control" multiple="multiple"
onchange="calli.updateResource(event,'dcterms:hasPart')">
<option selected="selected" rel="dcterms:hasPart" resource="?topic" value="{?topic}">{rdfs:label}</option>
</select>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">Save</button>
<button type="button" onclick="window.location.replace('?view')" class="btn btn-default">Cancel</button>
<button type="button" onclick="calli.deleteResource(event)" class="btn btn-danger">Delete</button>
</div>
</fieldset>
</form>
</div>
</body>
</html>