summaryrefslogtreecommitdiff
path: root/views/docs.ejs
blob: b3ead82767156d3fc53c8cf019ad69398fa036aa (plain)
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
47
48
49
50
51
52
<!doctype html>
<html>
<head>
	<title>vvalls</title>
	[[ include partials/meta ]]
</head>
<body class="loading">
<div class="rapper page docs about">
	[[ include partials/header ]]

	[[ if (! isNew) { ]]
		<h1>[[- doc.displayName ]]</h1>

		<div class="content doc-[[- doc.name]]">
		[[- content ]]
		</div>
		
		[[ if (user.isStaff) { ]]
		<div class="options">
			<a href="#" data-role="new-document-modal">New Document</a> |
			<a href="#" data-role="edit-document-modal" data-name="[[- doc.name ]]">Edit</a> |
			<a href="#" data-role="destroy-document-modal" data-name="[[- doc.name ]]">Delete</a>
			[[ include partials/edit-documentation ]]
		</div>
		[[ } ]]
	
	[[ } else { ]]
		[[ if (doc.name !== "new") { ]]
		<h1>404!</h1>
		<p>
			[[- doc.name ]] not found!
		</p>
		[[ } ]]
		
		[[ if (user.isStaff) { ]]
			<p>
			<a href="#" data-role="new-document-modal" data-name="[[- doc.name ]]">Create this document</a>
			</p>
			[[ include partials/edit-documentation ]]
		[[ } ]]

	[[ } ]]
	
	[[ include partials/confirm-modal ]]	
	[[ include partials/sign-in ]]
	[[ include partials/footer ]]

</div>

</body>
[[ include partials/scripts ]]
</html>