1 <%include include/head.html>
3 <div class="page-id hidden">image-browser</div>
5 <script language="javascript">
8 /* hide all those forms. */
9 hideAndShowBlock = function(blockElement, clickToShowElement, clickToHideElement) {
10 $(blockElement).hide();
11 $(clickToShowElement).removeClass("hidden");
12 $(clickToShowElement).click(function() {
13 $(blockElement).slideDown();
14 $(clickToShowElement).addClass("hidden");
15 $(clickToHideElement).removeClass("hidden");
17 $(clickToHideElement).click(function() {
18 $(blockElement).slideUp();
19 $(clickToHideElement).addClass("hidden");
20 $(clickToShowElement).removeClass("hidden");
31 <p><%= Page.ImageBrowser.Album.Error.NotFound.Text|l10n|html></p>
33 <%elseifnull album.title>
35 <p><%= Page.ImageBrowser.Album.Error.NotFound.Text|l10n|html></p>
39 <%if album.sone.local>
40 <script language="javascript">
42 getTranslation("WebInterface.DefaultText.UploadImage.Title", function(text) {
43 $("#upload-image :input[name='title']").each(function() {
44 registerInputTextareaSwap(this, text, "title", false, true);
47 getTranslation("WebInterface.DefaultText.UploadImage.Description", function(text) {
48 $("#upload-image :input[name='description']").each(function() {
49 registerInputTextareaSwap(this, text, "description", true, false);
52 $("#upload-image label").hide();
53 getTranslation("WebInterface.DefaultText.CreateAlbum.Name", function(text) {
54 $("#create-album input[name='name']").each(function() {
55 registerInputTextareaSwap(this, text, "name", false, true);
58 getTranslation("WebInterface.DefaultText.CreateAlbum.Description", function(text) {
59 $("#create-album input[name='description']").each(function() {
60 registerInputTextareaSwap(this, text, "description", true, true);
63 $("#create-album label").hide();
64 getTranslation("WebInterface.DefaultText.EditAlbum.Title", function(text) {
65 $("#edit-album input[name='title']").each(function() {
66 registerInputTextareaSwap(this, text, "title", false, true);
69 getTranslation("WebInterface.DefaultText.EditAlbum.Description", function(text) {
70 $("#edit-album :input[name='description']").each(function() {
71 registerInputTextareaSwap(this, text, "description", true, false);
74 $("#edit-album label").hide();
76 hideAndShowBlock(".edit-album", ".show-edit-album", ".hide-edit-album");
77 hideAndShowBlock(".create-album", ".show-create-album", ".hide-create-album");
78 hideAndShowBlock(".upload-image", ".show-upload-image", ".hide-upload-image");
79 hideAndShowBlock(".delete-album", ".show-delete-album", ".hide-delete-album");
84 <h1 class="backlink"><%= Page.ImageBrowser.Album.Title|l10n|replace needle='{album}' replacementKey=album.title|html></h1>
86 <div class="backlinks">
87 <%foreach album.backlinks backlink backlinks>
88 <div class="backlink">
89 <a href="<% backlink.target|html>"><% backlink.name|html></a>
91 <%if ! backlinks.last>
92 <div class="separator">></div>
97 <p id="description"><% album.description|html></p>
99 <%if album.sone.local>
100 <div class="show-edit-album hidden toggle-link"><a class="small-link">» <%= Page.ImageBrowser.Album.Edit.Title|l10n|html></a></div>
101 <div class="hide-edit-album hidden toggle-link"><a class="small-link">« <%= Page.ImageBrowser.Album.Edit.Title|l10n|html></a></div>
102 <div class="edit-album">
103 <h2><%= Page.ImageBrowser.Album.Edit.Title|l10n|html></h2>
105 <form id="edit-album" action="editAlbum.html" method="post">
106 <input type="hidden" name="formPassword" value="<%formPassword|html>" />
107 <input type="hidden" name="album" value="<%album.id|html>" />
110 <label for="title"><%= Page.ImageBrowser.Album.Label.Title|l10n|html></label>
111 <input type="text" name="title" value="<%album.title|html>" />
114 <label for="description"><%= Page.ImageBrowser.Album.Label.Description|l10n|html></label>
115 <textarea name="description"><%album.description|html></textarea>
117 <button type="submit"><%= Page.ImageBrowser.Album.Button.Save|l10n|html></button>
122 <%foreach album.albums album>
123 <%first><h2><%= Page.ImageBrowser.Header.Albums|l10n|html></h2><%/first>
124 <%if loop.count|mod divisor=3><div class="image-row"><%/if>
125 <div class="album image">
126 <a href="imageBrowser.html?album=<% album.id|html>" title="<% album.title|html>">
127 <%ifnull album.albumImage>
128 <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.title|html>" title="<% album.title|html>" />
130 <% album.albumImage|image-link max-width=200 max-height=150 title==album.title>
136 <%= false|store key=endRow>
137 <%if loop.count|mod divisor=3 offset=1><%= true|store key=endRow><%/if>
138 <%last><%= true|store key=endRow><%/last>
139 <%if endRow></div><%/if>
142 <%if album.sone.local>
143 <div class="show-create-album hidden toggle-link"><a class="small-link">» <%= View.CreateAlbum.Title|l10n|html></a></div>
144 <div class="hide-create-album hidden toggle-link"><a class="small-link">« <%= View.CreateAlbum.Title|l10n|html></a></div>
145 <div class="create-album">
146 <%include include/createAlbum.html>
150 <%foreach album.images image>
151 <%first><h2><%= Page.ImageBrowser.Header.Images|l10n|html></h2><%/first>
152 <%if loop.count|mod divisor=3><div class="image-row"><%/if>
154 <a href="imageBrowser.html?image=<%image.id|html>"><% image|image-link max-width=200 max-height=150></a>
155 <%if album.sone.local>
157 <form class="edit-image" action="editImage.html" method="post">
158 <input type="hidden" name="formPassword" value="<%formPassword|html>" />
159 <input type="hidden" name="returnPage" value="<%request.uri|html>" />
160 <input type="hidden" name="image" value="<%image.id|html>" />
163 <input type="text" name="title" value="<%image.title|html>" />
166 <textarea name="description"><%image.description|html></textarea>
169 <button type="submit"><%= Page.ImageBrowser.Image.Button.Save|l10n|html></button>
174 <%= false|store key=endRow>
175 <%if loop.count|mod divisor=3 offset=1><%= true|store key=endRow><%/if>
176 <%last><%= true|store key=endRow><%/last>
177 <%if endRow></div><%/if>
180 <%if album.sone.local>
181 <div class="show-upload-image hidden toggle-link"><a class="small-link">» <%= View.UploadImage.Title|l10n|html></a></div>
182 <div class="hide-upload-image hidden toggle-link"><a class="small-link">« <%= View.UploadImage.Title|l10n|html></a></div>
183 <div class="upload-image">
184 <%include include/uploadImage.html>
188 <div class="show-delete-album hidden toggle-link"><a class="small-link">» <%= Page.ImageBrowser.Album.Delete.Title|l10n|html></a></div>
189 <div class="hide-delete-album hidden toggle-link"><a class="small-link">« <%= Page.ImageBrowser.Album.Delete.Title|l10n|html></a></div>
190 <div class="delete-album">
191 <form id="delete-album" action="deleteAlbum.html" method="get">
192 <input type="hidden" name="album" value="<%album.id|html>" />
193 <button type="submit"><%= Page.ImageBrowser.Album.Button.Delete|l10n|html></button>
202 <%elseif imageRequested>
204 <h1 class="backlink"><%image.title|html></h1>
206 <div class="backlinks">
207 <%foreach image.album.backlinks backlink backlinks>
208 <div class="backlink">
209 <a href="<% backlink.target|html>"><% backlink.name|html></a>
211 <%if ! backlinks.last>
212 <div class="separator">></div>
221 <%if image.sone.local>
222 <script language="javascript">
224 getTranslation("WebInterface.DefaultText.EditImage.Title", function(text) {
225 $("#edit-image input[name='title']").each(function() {
226 registerInputTextareaSwap(this, text, "title", false, true);
229 getTranslation("WebInterface.DefaultText.EditImage.Description", function(text) {
230 $("#edit-image :input[name='description']").each(function() {
231 registerInputTextareaSwap(this, text, "description", true, false);
234 $("#edit-image label").hide();
236 hideAndShowBlock(".edit-image", ".show-edit-image", ".hide-edit-image");
237 hideAndShowBlock(".delete-image", ".show-delete-image", ".hide-delete-image");
242 <div class="single-image">
244 <a href="/<%image.key|html>"><% image|image-link max-width=640 max-height=480></a>
246 <a href="imageBrowser.html?image=<%image.id|html>"><% image|image-link max-width=640 max-height=480></a>
250 <p class="parsed"><%image.description|parse sone=image.sone></p>
252 <%if image.sone.local>
254 <div class="show-edit-image hidden toggle-link"><a class="small-link">» <%= Page.ImageBrowser.Image.Edit.Title|l10n|html></a></div>
255 <div class="hide-edit-image hidden toggle-link"><a class="small-link">« <%= Page.ImageBrowser.Image.Edit.Title|l10n|html></a></div>
256 <div class="edit-image">
257 <h2><%= Page.ImageBrowser.Image.Edit.Title|l10n|html></h2>
259 <form id="edit-image" action="editImage.html" method="post">
260 <input type="hidden" name="formPassword" value="<%formPassword|html>" />
261 <input type="hidden" name="returnPage" value="<%request.uri|html>" />
262 <input type="hidden" name="image" value="<%image.id|html>" />
265 <label for="title"><%= Page.ImageBrowser.Image.Title.Label|l10n|html></label>
266 <input type="text" name="title" value="<%image.title|html>" />
269 <label for="description"><%= Page.ImageBrowser.Image.Description.Label|l10n|html></label>
270 <textarea name="description"><%image.description|html></textarea>
273 <button type="submit"><%= Page.ImageBrowser.Image.Button.Save|l10n|html></button>
278 <div class="show-delete-image hidden toggle-link"><a class="small-link">» <%= Page.ImageBrowser.Image.Delete.Title|l10n|html></a></div>
279 <div class="hide-delete-image hidden toggle-link"><a class="small-link">« <%= Page.ImageBrowser.Image.Delete.Title|l10n|html></a></div>
280 <div class="delete-image">
281 <h2><%= Page.ImageBrowser.Image.Delete.Title|l10n|html></h2>
283 <form id="delete-image" action="deleteImage.html" method="get">
284 <input type="hidden" name="image" value="<%image.id|html>" />
285 <button type="submit"><%= Page.ImageBrowser.Image.Button.Delete|l10n|html></button>
293 <%elseif soneRequested>
296 <script language="javascript">
298 getTranslation("WebInterface.DefaultText.CreateAlbum.Name", function(text) {
299 $("#create-album input[name='name']").each(function() {
300 registerInputTextareaSwap(this, text, "name", false, true);
303 getTranslation("WebInterface.DefaultText.CreateAlbum.Description", function(text) {
304 $("#create-album input[name='description']").each(function() {
305 registerInputTextareaSwap(this, text, "description", true, true);
308 $("#create-album label").hide();
310 hideAndShowBlock(".create-album", ".show-create-album", ".hide-create-album");
317 <p><%= Page.ImageBrowser.Sone.Error.NotFound.Text|l10n|html></p>
321 <h1><%= Page.ImageBrowser.Sone.Title|l10n|replace needle='{sone}' replacementKey=sone.niceName|html></h1>
323 <%foreach sone.albums album>
324 <%if loop.count|mod divisor=3><div class="image-row"><%/if>
325 <div class="album image">
326 <a href="imageBrowser.html?album=<% album.id|html>" title="<% album.title|html>">
327 <%ifnull album.albumImage>
328 <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.title|html>" title="<% album.title|html>" />
330 <% album.albumImage|image-link max-width=200 max-height=150 title==album.title>
336 <%= false|store key=endRow>
337 <%if loop.count|mod divisor=3 offset=1><%= true|store key=endRow><%/if>
338 <%last><%= true|store key=endRow><%/last>
339 <%if endRow></div><%/if>
343 <div class="show-create-album hidden toggle-link"><a class="small-link">» <%= View.CreateAlbum.Title|l10n|html></a></div>
344 <div class="hide-create-album hidden toggle-link"><a class="small-link">« <%= View.CreateAlbum.Title|l10n|html></a></div>
345 <div class="create-album">
346 <%include include/createAlbum.html>
354 <%include include/tail.html>