1 <%include include/head.html>
3 <div class="page-id hidden">image-browser</div>
9 <p><%= Page.ImageBrowser.Album.Error.NotFound.Text|l10n|html></p>
11 <%elseifnull album.title>
13 <p><%= Page.ImageBrowser.Album.Error.NotFound.Text|l10n|html></p>
17 <%if album.sone.local>
18 <script language="javascript">
20 getTranslation("WebInterface.DefaultText.UploadImage.Title", function(text) {
21 $("#upload-image :input[name='title']").each(function() {
22 registerInputTextareaSwap(this, text, "title", false, true);
25 getTranslation("WebInterface.DefaultText.UploadImage.Description", function(text) {
26 $("#upload-image :input[name='description']").each(function() {
27 registerInputTextareaSwap(this, text, "description", true, false);
30 $("#upload-image label").hide();
31 getTranslation("WebInterface.DefaultText.CreateAlbum.Name", function(text) {
32 $("#create-album input[name='name']").each(function() {
33 registerInputTextareaSwap(this, text, "name", false, true);
36 getTranslation("WebInterface.DefaultText.CreateAlbum.Description", function(text) {
37 $("#create-album input[name='description']").each(function() {
38 registerInputTextareaSwap(this, text, "description", true, true);
41 $("#create-album label").hide();
42 getTranslation("WebInterface.DefaultText.EditAlbum.Title", function(text) {
43 $("#edit-album input[name='title']").each(function() {
44 registerInputTextareaSwap(this, text, "title", false, true);
47 getTranslation("WebInterface.DefaultText.EditAlbum.Description", function(text) {
48 $("#edit-album :input[name='description']").each(function() {
49 registerInputTextareaSwap(this, text, "description", true, false);
52 $("#edit-album label").hide();
54 /* hide all those forms. */
55 hideBlock = function(blockElement, clickElement) {
56 $(blockElement).hide();
57 $(clickElement).removeClass("hidden").click(function() {
58 $(blockElement).slideDown();
64 hideBlock(".edit-album", ".show-edit-album");
65 hideBlock(".create-album", ".show-create-album");
66 hideBlock(".upload-image", ".show-upload-image");
71 <h1 class="backlink"><%= Page.ImageBrowser.Album.Title|l10n|replace needle='{album}' replacementKey=album.title|html></h1>
73 <div class="backlinks">
74 <%foreach album.backlinks backlink backlinks>
75 <div class="backlink">
76 <a href="<% backlink.target|html>"><% backlink.name|html></a>
78 <%if ! backlinks.last>
79 <div class="separator">></div>
84 <p id="description"><% album.description|html></p>
86 <%if album.sone.local>
87 <p><a class="show-edit-album hidden small-link">» <%= Page.ImageBrowser.Album.Edit.Title|l10n|html></a></p>
88 <div class="edit-album">
89 <h2><%= Page.ImageBrowser.Album.Edit.Title|l10n|html></h2>
91 <form id="edit-album" action="editAlbum.html" method="post">
92 <input type="hidden" name="formPassword" value="<%formPassword|html>" />
93 <input type="hidden" name="album" value="<%album.id|html>" />
96 <label for="title"><%= Page.ImageBrowser.Album.Label.Title|l10n|html></label>
97 <input type="text" name="title" value="<%album.title|html>" />
100 <label for="description"><%= Page.ImageBrowser.Album.Label.Description|l10n|html></label>
101 <textarea name="description"><%album.description|html></textarea>
103 <button type="submit"><%= Page.ImageBrowser.Album.Button.Save|l10n|html></button>
108 <%foreach album.albums album>
109 <%first><h2><%= Page.ImageBrowser.Header.Albums|l10n|html></h2><%/first>
110 <%if loop.count|mod divisor=3><div class="image-row"><%/if>
111 <div class="album image">
112 <a href="imageBrowser.html?album=<% album.id|html>" title="<% album.title|html>">
113 <%ifnull album.albumImage>
114 <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.title|html>" title="<% album.title|html>" />
116 <% album.albumImage|image-link max-width=200 max-height=150 title==album.title>
122 <%= false|store key=endRow>
123 <%if loop.count|mod divisor=3 offset=1><%= true|store key=endRow><%/if>
124 <%last><%= true|store key=endRow><%/last>
125 <%if endRow></div><%/if>
128 <%if album.sone.local>
129 <p><a class="show-create-album hidden small-link">» <%= View.CreateAlbum.Title|l10n|html></a></p>
130 <div class="create-album">
131 <%include include/createAlbum.html>
135 <%foreach album.images image>
136 <%first><h2><%= Page.ImageBrowser.Header.Images|l10n|html></h2><%/first>
137 <%if loop.count|mod divisor=3><div class="image-row"><%/if>
139 <a href="imageBrowser.html?image=<%image.id|html>"><% image|image-link max-width=200 max-height=150></a>
141 <%= false|store key=endRow>
142 <%if loop.count|mod divisor=3 offset=1><%= true|store key=endRow><%/if>
143 <%last><%= true|store key=endRow><%/last>
144 <%if endRow></div><%/if>
147 <%if album.sone.local>
148 <p><a class="show-upload-image hidden small-link">» <%= View.UploadImage.Title|l10n|html></a></p>
149 <div class="upload-image">
150 <%include include/uploadImage.html>
154 <form id="delete-album" action="deleteAlbum.html" method="get">
155 <input type="hidden" name="album" value="<%album.id|html>" />
156 <button type="submit"><%= Page.ImageBrowser.Album.Button.Delete|l10n|html></button>
164 <%elseif imageRequested>
166 <h1 class="backlink"><%image.title|html></h1>
168 <div class="backlinks">
169 <%foreach image.album.backlinks backlink backlinks>
170 <div class="backlink">
171 <a href="<% backlink.target|html>"><% backlink.name|html></a>
173 <%if ! backlinks.last>
174 <div class="separator">></div>
183 <%if image.sone.local>
184 <script language="javascript">
186 getTranslation("WebInterface.DefaultText.EditImage.Title", function(text) {
187 $("#edit-image input[name='title']").each(function() {
188 registerInputTextareaSwap(this, text, "title", false, true);
191 getTranslation("WebInterface.DefaultText.EditImage.Description", function(text) {
192 $("#edit-image :input[name='description']").each(function() {
193 registerInputTextareaSwap(this, text, "description", true, false);
196 $("#edit-image label").hide();
198 /* hide all those forms. */
199 hideBlock = function(blockElement, clickElement) {
200 $(blockElement).hide();
201 $(clickElement).removeClass("hidden").click(function() {
202 $(blockElement).slideDown();
208 hideBlock(".edit-image", ".show-edit-image");
209 hideBlock(".delete-image", ".show-delete-image");
214 <div class="single-image">
216 <a href="/<%image.key|html>"><% image|image-link max-width=640 max-height=480></a>
218 <a href="imageBrowser.html?image=<%image.id|html>"><% image|image-link max-width=640 max-height=480></a>
222 <p class="parsed"><%image.description|parse sone=image.sone></p>
224 <%if image.sone.local>
226 <p><a class="show-edit-image hidden small-link">» <%= Page.ImageBrowser.Image.Edit.Title|l10n|html></a></p>
227 <div class="edit-image">
228 <h2><%= Page.ImageBrowser.Image.Edit.Title|l10n|html></h2>
230 <form id="edit-image" action="editImage.html" method="post">
231 <input type="hidden" name="formPassword" value="<%formPassword|html>" />
232 <input type="hidden" name="returnPage" value="<%request.uri|html>" />
233 <input type="hidden" name="image" value="<%image.id|html>" />
236 <label for="title"><%= Page.ImageBrowser.Image.Title.Label|l10n|html></label>
237 <input type="text" name="title" value="<%image.title|html>" />
240 <label for="description"><%= Page.ImageBrowser.Image.Description.Label|l10n|html></label>
241 <textarea name="description"><%image.description|html></textarea>
244 <button type="submit"><%= Page.ImageBrowser.Image.Button.Save|l10n|html></button>
249 <p><a class="show-delete-image hidden small-link">» <%= Page.ImageBrowser.Image.Delete.Title|l10n|html></a></p>
250 <div class="delete-image">
251 <h2><%= Page.ImageBrowser.Image.Delete.Title|l10n|html></h2>
253 <form id="delete-image" action="deleteImage.html" method="get">
254 <input type="hidden" name="image" value="<%image.id|html>" />
255 <button type="submit"><%= Page.ImageBrowser.Image.Button.Delete|l10n|html></button>
263 <%elseif soneRequested>
266 <script language="javascript">
268 getTranslation("WebInterface.DefaultText.CreateAlbum.Name", function(text) {
269 $("#create-album input[name='name']").each(function() {
270 registerInputTextareaSwap(this, text, "name", false, true);
273 getTranslation("WebInterface.DefaultText.CreateAlbum.Description", function(text) {
274 $("#create-album input[name='description']").each(function() {
275 registerInputTextareaSwap(this, text, "description", true, true);
278 $("#create-album label").hide();
280 /* hide all those forms. */
281 hideBlock = function(blockElement, clickElement) {
282 $(blockElement).hide();
283 $(clickElement).removeClass("hidden").click(function() {
284 $(blockElement).slideDown();
290 hideBlock(".create-album", ".show-create-album");
297 <p><%= Page.ImageBrowser.Sone.Error.NotFound.Text|l10n|html></p>
301 <h1><%= Page.ImageBrowser.Sone.Title|l10n|replace needle='{sone}' replacementKey=sone.niceName|html></h1>
303 <%foreach sone.albums album>
304 <%if loop.count|mod divisor=3><div class="image-row"><%/if>
305 <div class="album image">
306 <a href="imageBrowser.html?album=<% album.id|html>" title="<% album.title|html>">
307 <%ifnull album.albumImage>
308 <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.title|html>" title="<% album.title|html>" />
310 <% album.albumImage|image-link max-width=200 max-height=150 title==album.title>
316 <%= false|store key=endRow>
317 <%if loop.count|mod divisor=3 offset=1><%= true|store key=endRow><%/if>
318 <%last><%= true|store key=endRow><%/last>
319 <%if endRow></div><%/if>
323 <p><a class="show-create-album hidden small-link">» <%= View.CreateAlbum.Title|l10n|html></a></p>
324 <div class="create-album">
325 <%include include/createAlbum.html>
333 <%include include/tail.html>