-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathadmin.html
104 lines (103 loc) · 4.23 KB
/
admin.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
{% extends "base.html" %}
{% block container %}
<!-- thumb-container -->
<div id="thumb-container">
{% if error %}
<div class="message error">An error occured! [{{ error_message }}]</div>
{% endif %}
{% if saved %}
<div class="message success">Successfully saved the settings.</div>
{% endif %}
{% if cache_cleared %}
<div class="message success">Successfully cleared the cache.</div>
{% endif %}
<form id="admin-form" method="post" action="/admin/">
<div class="admin-option">
<label for="backend">Gallery backend:</label>
<select id="backend" name="backend">
{% for o in settings.PHOTO_BACKENDS %}
<option {% ifequal o user.photo_backend %}selected="selected"{% endifequal %} value="{{ o }}">{{ o }}</option>
{% endfor %}
</select>
</div>
<div class="admin-option">
<label for="backend-id">Photo provider ID:</label>
<input id="backend-id" name="backend-id" type="text" value="{{ user.GetUsername }}" />
</div>
<div class="admin-option">
<label for="site-title">Site title:</label>
<input id="site-title" name="site-title" type="text" value="{{ user.site_title }}" />
</div>
<div class="admin-option">
<label for="site-header">Site header:</label>
<input id="site-header" name="site-header" type="text" value="{{ user.site_header }}" />
</div>
<div class="admin-option">
<label for="thumb-size">Thumbnail size:</label>
<select id="thumb-size" name="thumb-size">
{% for o in settings.THUMB_SIZES %}
<option {% ifequal o user.thumb_size %}selected="selected"{% endifequal %}>{{ o }}</option>
{% endfor %}
</select>
</div>
<div class="admin-option">
<label for="thumb-cropped">Thumbnails are cropped:</label>
<select id="thumb-cropped" name="thumb-cropped">
<option value='1' {% if user.thumb_cropped %}selected="selected"{% endif %}>true</option>
<option value='' {% if not user.thumb_cropped %}selected="selected"{% endif %}>false</option>
</select>
</div>
<div class="admin-option">
<label for="full-size">Lightbox size:</label>
<select id="full-size" name="full-size">
{% for o in settings.FULL_SIZES %}
<option {% ifequal o user.full_size %}selected="selected"{% endifequal %}>{{ o }}</option>
{% endfor %}
</select>
</div>
<div class="admin-option">
<label for="homepage-size">Homepage size:</label>
<select id="homepage-size" name="homepage-size">
{% for o in settings.FULL_SIZES %}
<option {% ifequal o user.homepage_size %}selected="selected"{% endifequal %}>{{ o }}</option>
{% endfor %}
</select>
</div>
<div class="admin-option">
<label for="homepage-album">Homepage album:</label>
<select id="homepage-album" name="homepage-album">
{% for a in all_albums %}
<option {% ifequal a.title user.homepage_album %}selected="selected"{% endifequal %}>{{ a.title }}</option>
{% endfor %}
</select>
</div>
<div class="admin-option">
<label for="featured-albums">Featured albums:</label>
<br />
{% for a in all_albums %}
<input id="featured-album{{ forloop.counter0 }}"
type="checkbox"
name="featured-album"
{% if a.featured %}checked="checked"{% endif %}
value="{{ a.title }}" />
<label for="featured-album{{ forloop.counter0 }}">{{ a.title }}</label>
<br />
{% endfor %}
</div>
<div class="admin-option">
<label for="merchant-id">Google Checkout merchant ID:</label>
<input id="merchant-id" name="merchant-id" type="text" value="{{ user.merchant_id|default_if_none:"" }}" />
<a href="https://checkout.google.com/sell/settings?section=Profile">lookup</a>
</div>
<div class="admin-option">
<label for="analytics-id">Google Analytics ID:</label>
<input id="analytics-id" name="analytics-id" type="text" value="{{ user.analytics_id|default_if_none:"" }}" />
</div>
<div class="admin-option">
<input type="submit" name="submit" value="Save" />
<input type="submit" name="clear-cache" value="Clear Cache" />
</div>
</form>
</div>
<!-- end thumb-container -->
{% endblock container %}