summaryrefslogtreecommitdiff
path: root/templates/event.html
blob: f2a69d7cd82459b8bdb0d623264ddbc94b398304 (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
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
<!DOCTYPE html>
<html>
  <head>
    <title>Symposium</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="/static/styles.css">
    <link rel="stylesheet" type="text/css" href="/symposium/static/styles.css">
    <link rel="shortcut icon" type="image/x-icon" href="/symposium/static/favicon.ico">
  </head>
  <body>
	<div class="container">
        <div>
            <div class="home">
                <a href="/symposium" class="home-title">{% event.title %} - Symposium</a>
                <span> at </span><a class="site" href="/">cyfraeviolae.org</a>
                <a class="source" href="/git/symposium">[src]</a>
            </div>
        </div>
        <br>
        {% if manage %}
        <span class="manage">Admin Management Interface</span>
        <br>
        <br>
        Save your admin management link. You will need it to be able to edit your event.
        <br>
        <br>
        <button onclick="navigator.clipboard.writeText(document.location.host + '/symposium/event/{{event.iden}}?password={{event.password}}')">Copy admin management link (keep safe)</button>
        <br>
        <br>
        <button onclick="navigator.clipboard.writeText(document.location.host + '/symposium/event/{{event.iden}}')">Copy invite link</button>
        <button onclick="window.open('/symposium/event/{{event.iden}}', '_blank')">Visit public invite page</button>
        <button onclick="window.open('/symposium/event/{{event.iden}}/calendar')">Save to calendar</button>
        <br>
        <hr>
        {% endif %}
        {% if manage %}
        <form method="POST" action="/symposium/event/{{ event.iden }}/edit?password={{event.password}}">
        <span class="q">Title:</span>
        <input name="title" type="text" value="{{ event.title }}" required></input>
        {% else %}
        <h3>{{ event.title }}</h3>
        {% endif %}
        <br>
        {% if not manage %}
        <button onclick="navigator.clipboard.writeText(document.location.host + '/symposium/event/{{event.iden}}'); return false">Copy invite link</button>
        <button onclick="window.open('/symposium/event/{{event.iden}}/calendar'); return false">Save to calendar</button>
        <br>
        {% endif %}
        <br>
        <span class="q">When?</span>
        {% if manage %}
        <input name="when" class="when" type="datetime-local" value="{{ event.time }}" required>
        {% else %}
        <input name="when" class="when" type="datetime-local" value="{{ event.time }}" disabled>
        {% endif %}
        <br>
        <br>

        <span class="q">Where?</span>
        {% if manage %}
        <input name="where" type="text" value="{{ event.location }}" required></input>
        {% else %}
        <a target="_blank" href="http://maps.google.com/?q={{ event.location }}">{{ event.location }}</a>
        {% endif %}

        <br><br>

        <span class="q">What?</span>
        <br>
        {% if manage %}
        <textarea name="what" class="desc" required>{{event.description}}</textarea>
        <br>
        {% else %}
        {% for el in event.description.split('\n') %}
        {{ el }}
        <br>
        {% endfor %}
        {% endif %}

        <br>
        {% if manage %}
        <button>Save changes</button>
        <br>
        <br>
        </form>
        {% endif %}
        <span class="q">Who?</span>
        <br>
        {% for name in event.get_invites() %}
		&mdash; {{ name }}
        {% if manage %}
		<form class="remove" method="POST" action="/symposium/event/{{ event.iden }}/remove?password={{ event.password }}">
			<input type="hidden" name="name" value="{{ name }}">
			<button href="#">remove</button>
		</form>
        {% endif %}
        <br>
        {% endfor %}
        {% if manage %}
        <form method="POST" action="/symposium/event/{{ event.iden }}/join?password={{ event.password }}" class="join-form">
        {% else %}
        <form method="POST" action="/symposium/event/{{ event.iden }}/join" class="join-form">
        {% endif %}
            <input class="join-input" type="text" name="name" required>
            <button type="submit">Add attendee</button>
        </form>
    </div>
  </body>
</html>