Hide labels after ajaxfication of album creation form fields.
[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.name>
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.name|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                                         <div class="image">
52                                                 <a href="imageBrowser.html?album=<% album.id|html>">
53                                                         <%ifnull album.image>
54                                                                 <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.name|html>" title="<% album.name|html>" />
55                                                         <%else><!-- TODO -->
56                                                                 <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.name|html>" title="<% album.name|html>" />
57                                                         <%/if>
58                                                 </a>
59                                         </div>
60                                 </div>
61                         <%/foreach>
62
63                         <div id="description">
64                                 <% album.description|html>
65                         </div>
66
67                         <%if album.sone.current>
68                                 <%include include/createAlbum.html>
69                         <%/if>
70
71                 <%/if>
72
73         <%elseif imageRequested>
74
75         <%elseif soneRequested>
76
77                 <%ifnull sone>
78
79                         <p><%= Page.ImageBrowser.Sone.Error.NotFound.Text|l10n|html></p>
80
81                 <%else>
82
83                         <h1><%= Page.ImageBrowser.Sone.Title|l10n|replace needle='{sone}' replacementKey=sone.niceName|html></h1>
84
85                         <%foreach sone.albums album>
86                                 <div class="album">
87                                         <div class="image">
88                                                 <a href="imageBrowser.html?album=<% album.id|html>">
89                                                         <%ifnull album.image>
90                                                                 <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.name|html>" title="<% album.name|html>" />
91                                                         <%else><!-- TODO -->
92                                                                 <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.name|html>" title="<% album.name|html>" />
93                                                         <%/if>
94                                                 </a>
95                                         </div>
96                                 </div>
97                         <%/foreach>
98
99                         <%if sone.current>
100                                 <%include include/createAlbum.html>
101                         <%/if>
102
103                 <%/if>
104
105         <%/if>
106
107 <%include include/tail.html>