Add images-per-post option.
[Sone.git] / src / main / resources / templates / options.html
index 76954eb..3b954c4 100644 (file)
@@ -8,6 +8,9 @@
                        getTranslation("WebInterface.DefaultText.Option.PostsPerPage", function(postsPerPageText) {
                                registerInputTextareaSwap("#sone #options input[name=posts-per-page]", postsPerPageText, "posts-per-page", true, true);
                        });
+                       getTranslation("WebInterface.DefaultText.Option.ImagesPerPage", function(imagesPerPageText) {
+                               registerInputTextareaSwap("#sone #options input[name=images-per-page]", imagesPerPageText, "images-per-page", true, true);
+                       });
                        getTranslation("WebInterface.DefaultText.Option.CharactersPerPost", function(postsPerPageText) {
                                registerInputTextareaSwap("#sone #options input[name=characters-per-post]", postsPerPageText, "characters-per-post", true, true);
                        });
                        <%= Page.Options.Option.ShowNotificationNewReplies.Description|l10n|html>
                </p>
 
-               <%ifnull !currentSone>
-                       <ul id="avatar-selection">
-                               <li><input type="radio" name="avatar-image" value="none"<%ifnull avatar-image> checked="checked"<%/if>/><%= Page.Options.Option.Avatar.Delete|l10n|html></input></li>
-                               <%foreach currentSone.allImages image>
-                                       <li>
-                                               <input type="radio" name="avatar-image" value="<%image.id|html>"<%if avatar-image|match key=image.id> checked="checked"<%/if>/>
-                                               <div class="post-avatar"><% image|image-link max-width=48 max-height=48 mode=enlarge title==image.title></div>
-                                       </li>
-                               <%/foreach>
-                       </ul>
-               <%/if>
+               <h2><%= Page.Options.Section.AvatarOptions.Title|l10n|html></h2>
+
+               <p><%= Page.Options.Option.ShowAvatars.Description|l10n|html></p>
+               
+               <ul>
+                       <li>
+                               <input type="radio" name="show-custom-avatars" value="NEVER"<%if show-custom-avatars|match value=NEVER> checked="checked"<%/if>/>
+                               <%=Page.Options.Option.ShowAvatars.Never.Description|l10n|html>
+                       </li>
+                       <li>
+                               <input type="radio" name="show-custom-avatars" value="FOLLOWED"<%if show-custom-avatars|match value=FOLLOWED> checked="checked"<%/if>/>
+                               <%=Page.Options.Option.ShowAvatars.Followed.Description|l10n|html>
+                       </li>
+                       <li>
+                               <input type="radio" name="show-custom-avatars" value="MANUALLY_TRUSTED"<%if show-custom-avatars|match value=MANUALLY_TRUSTED> checked="checked"<%/if>/>
+                               <%=Page.Options.Option.ShowAvatars.ManuallyTrusted.Description|l10n|html>
+                       </li>
+                       <li>
+                               <input type="radio" name="show-custom-avatars" value="TRUSTED"<%if show-custom-avatars|match value=TRUSTED> checked="checked"<%/if>/>
+                               <%=Page.Options.Option.ShowAvatars.Trusted.Description|l10n|html>
+                       </li>
+                       <li>
+                               <input type="radio" name="show-custom-avatars" value="ALWAYS"<%if show-custom-avatars|match value=ALWAYS> checked="checked"<%/if>/>
+                               <%=Page.Options.Option.ShowAvatars.Always.Description|l10n|html>
+                       </li>
+               </ul>
 
                <h2><%= Page.Options.Section.RuntimeOptions.Title|l10n|html></h2>
 
                <%/if>
                <p><input type="text" name="posts-per-page" value="<% posts-per-page|html>" /></p>
 
+               <p><%= Page.Options.Option.ImagesPerPage.Description|l10n|html></p>
+               <%if =images-per-page|in collection=fieldErrors>
+                       <p class="warning"><%= Page.Options.Warnings.ValueNotChanged|l10n|html></p>
+               <%/if>
+               <p><input type="text" name="images-per-page" value="<% images-per-page|html>" /></p>
+
                <p><%= Page.Options.Option.CharactersPerPost.Description|l10n|html></p>
                <%if =characters-per-post|in collection=fieldErrors>
                        <p class="warning"><%= Page.Options.Warnings.ValueNotChanged|l10n|html></p>