Rename forgotten album names.
[Sone.git] / src / main / resources / templates / imageBrowser.html
1 <%include include/head.html>
2
3         <script language="javascript">
4
5                 /* ajaxify album creation input field. */
6                 $(document).ready(function() {
7                         getTranslation("WebInterface.DefaultText.CreateAlbum.Name", function(text) {
8                                 $("#create-album input[name='name']").each(function() {
9                                         registerInputTextareaSwap(this, text, "name", false, true);
10                                 });
11                         });
12                         getTranslation("WebInterface.DefaultText.CreateAlbum.Description", function(text) {
13                                 $("#create-album input[name='description']").each(function() {
14                                         registerInputTextareaSwap(this, text, "description", true, true);
15                                 });
16                         });
17                         $("#create-album label").hide();
18                 });
19
20         </script>
21
22         <div class="page-id hidden">image-browser</div>
23
24         <%if albumRequested>
25
26                 <%ifnull album>
27
28                         <p><%= Page.ImageBrowser.Album.Error.NotFound.Text|l10n|html></p>
29
30                 <%elseifnull album.title>
31
32                         <p><%= Page.ImageBrowser.Album.Error.NotFound.Text|l10n|html></p>
33
34                 <%else>
35
36                         <h1><%= Page.ImageBrowser.Album.Title|l10n|replace needle='{album}' replacementKey=album.title|html></h1>
37
38                         <div class="backlinks">
39                                 <%foreach album.backlinks backlink backlinks>
40                                         <div class="backlink">
41                                                 <a href="<% backlink.target|html>"><% backlink.name|html></a>
42                                         </div>
43                                         <%if ! backlinks.last>
44                                                 <div class="separator">&gt;</div>
45                                         <%/if>
46                                 <%/foreach>
47                         </div>
48
49                         <%foreach album.albums album>
50                                 <div class="album">
51                                         <a href="imageBrowser.html?album=<% album.id|html>">
52                                                 <%ifnull album.image>
53                                                         <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.title|html>" title="<% album.title|html>" />
54                                                 <%else><!-- TODO -->
55                                                         <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.title|html>" title="<% album.title|html>" />
56                                                 <%/if>
57                                         </a>
58                                 </div>
59                         <%/foreach>
60
61                         <%foreach album.images image>
62                                 <div class="image">
63                                         <a href="imageBrowser.html?image=<%image.id|html>">
64                                                 <%ifnull image.key>
65                                                         <img src="images/unknown-image-0.png" width="200" height="150" alt="<% image.title|html>" title="<% image.title|html>" />
66                                                 <%else>
67                                                         <img src="images/unknown-image-0.png" width="200" height="150" alt="<% image.title|html>" title="<% image.title|html>" />
68                                                 <%/if>
69                                         </a>
70                                 </div>
71                         <%/foreach>
72
73                         <div id="description">
74                                 <% album.description|html>
75                         </div>
76
77                         <%if album.sone.current>
78                                 <%include include/uploadImage.html>
79                                 <%include include/createAlbum.html>
80                         <%/if>
81
82                 <%/if>
83
84         <%elseif imageRequested>
85
86         <%elseif soneRequested>
87
88                 <%ifnull sone>
89
90                         <p><%= Page.ImageBrowser.Sone.Error.NotFound.Text|l10n|html></p>
91
92                 <%else>
93
94                         <h1><%= Page.ImageBrowser.Sone.Title|l10n|replace needle='{sone}' replacementKey=sone.niceName|html></h1>
95
96                         <%foreach sone.albums album>
97                                 <div class="album">
98                                         <div class="image">
99                                                 <a href="imageBrowser.html?album=<% album.id|html>">
100                                                         <%ifnull album.image>
101                                                                 <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.title|html>" title="<% album.title|html>" />
102                                                         <%else><!-- TODO -->
103                                                                 <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.title|html>" title="<% album.title|html>" />
104                                                         <%/if>
105                                                 </a>
106                                         </div>
107                                 </div>
108                         <%/foreach>
109
110                         <%if sone.current>
111                                 <%include include/createAlbum.html>
112                         <%/if>
113
114                 <%/if>
115
116         <%/if>
117
118 <%include include/tail.html>