-
Notifications
You must be signed in to change notification settings - Fork 0
/
plex-request.html
116 lines (103 loc) · 3.03 KB
/
plex-request.html
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<head>
<title>Plex Request</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-sm-6">
<header id="requestHeader">
<h1>Plex Requests</h1>
{{> loginButtons}}
{{> requestForm}}
</header>
<ul>
{{#each requests}}
{{> request}}
{{/each}}
</ul>
<header id="UpcomingRequestHeader">
<h1>Wish List<small> shows and movies not yet released</small></h1>
{{> upcomingRequestForm}}
</header>
<ul>
{{#each upcoming}}
{{> request}}
{{/each}}
</ul>
</div>
<div class="col-sm-6">
<header id="completedHeader">
<div class="row">
<div class="col-xs-6 col-sm-12"><h1 id="completedTitle">Completed Requests</h1></div>
<div class="col-xs-6 col-sm-12">
<div id="plexLink">
<a href="http://theia.feralhosting.com:32400/web/index.html" id="plexBtn" class="btn">Open Plex!</a>
</div>
</div>
</div>
</header>
<ul>
{{#each completes}}
{{> completeRequest}}
{{/each}}
</ul>
</div>
</div>
{{#if currentUser}}
{{#unless isInRole 'subscriber'}}
<footer>
<div id="emailFooter">
{{> emailForm}}
</div>
</footer>
{{/unless}}
{{/if}}
</div>
</body>
<template name="emailForm">
<h5>Get notified when your request completes</h5>
<form class="new-request">
<input type="text" name="text" id="userEmail" placeholder="Enter in your email" />
</form>
</template>
<template name="requestForm">
{{#if currentUser}}
<form class="new-request">
<input type="text" name="text" id="newRequestTitle" placeholder="Type in request title" />
</form>
{{/if}}
</template>
<template name="upcomingRequestForm">
{{#if currentUser}}
<form class="new-request">
<input type="text" name="text" id="UpcomingRequestTitle" placeholder="Type in request title" />
</form>
{{/if}}
</template>
<template name="request">
{{#unless checked}}
<li class="{{#if checked}}checked{{/if}}">
{{#if isAdminOrOwner}}
<button class="delete">×</button>
{{/if}}
{{#if isInRole 'admin'}}
<input type="checkbox" checked="{{checked}}" class="toggle-checked" />
{{/if}}
<span class="text">{{title}}<span class="name"> requested by {{name}}</span></span>
</li>
{{/unless}}
</template>
<template name="completeRequest">
{{#if checked}}
<li class="checked">
{{#if isAdminOrOwner}}
<button class="delete">×</button>
{{/if}}
{{#if isInRole 'admin'}}
<input type="checkbox" checked="{{checked}}" class="toggle-checked" />
{{/if}}
<span class="text">{{title}}<span class="name"> requested by {{name}}</span></span>
</li>
{{/if}}
</template>