summaryrefslogtreecommitdiff
path: root/views/docs.ejs
blob: e3f08236cf6dd6d0ce467b4dca546b9e2b971aa6 (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
53
54
<!doctype html>
<html>
<head>
	<title>vvalls</title>
	[[ include partials/meta ]]
</head>
<body class="loading">
<div class="rapper page docs">
	[[ include partials/header ]]

	<br clear="all">
	
	[[ if (! isNew) { ]]
		<h1>[[- doc.displayName ]]</h1>

		<div class="content">
		[[- 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="delete-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>