Show trust differently.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 18 Dec 2010 00:55:11 +0000 (01:55 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 18 Dec 2010 00:55:11 +0000 (01:55 +0100)
src/main/resources/i18n/sone.en.properties
src/main/resources/static/css/sone.css
src/main/resources/templates/include/viewPost.html
src/main/resources/templates/include/viewReply.html

index e080e4d..66d8f5c 100644 (file)
@@ -159,6 +159,10 @@ View.Post.Reply.DeleteLink=Delete
 View.Post.LikeLink=Like
 View.Post.UnlikeLink=Unlike
 
+View.Trust.Label=Trust:
+View.Trust.IncreaseTrustLink=↑
+View.Trust.DecreaseTrustLink=↓
+
 WebInterface.DefaultText.StatusUpdate=What’s on your mind?
 WebInterface.DefaultText.Message=Write a Message…
 WebInterface.DefaultText.Reply=Write a Reply…
index ec5d1c0..0ca86b0 100644 (file)
@@ -214,9 +214,10 @@ textarea {
        color: #666;
 }
 
-#sone .post .delete, #sone .post .likes, #sone .post .like, #sone .post .unlike {
+#sone .post .delete, #sone .post .likes, #sone .post .like, #sone .post .unlike, #sone .post .increase-trust, #sone .post .decrease-trust {
        display: inline;
        font: inherit;
+       margin: 0px;
 }
 
 #sone .post .likes.hidden {
@@ -227,15 +228,16 @@ textarea {
        display: none;
 }
 
-#sone .post .delete button, #sone .post .like button, #sone .post .unlike button {
+#sone .post .delete button, #sone .post .like button, #sone .post .unlike button, #sone .post .increase-trust button, #sone .post .decrease-trust button {
        border: 0px;
        background: none;
        padding: 0px;
        color: rgb(28, 131, 191);
        font: inherit;
+       margin: 0px;
 }
 
-#sone .post .delete button:hover, #sone .post .like button:hover, #sone .post .unlike button:hover {
+#sone .post .delete button:hover, #sone .post .like button:hover, #sone .post .unlike button:hover, #sone .post .increase-trust button:hover, #sone .post .decrease-trust button:hover {
        border: 0px;
        background: none;
        padding: 0px;
@@ -252,6 +254,19 @@ textarea {
        color: green;
 }
 
+#sone .post .trust {
+       display: inline;
+}
+
+#sone .post .trust:before {
+       content: ' · ';
+}
+
+#sone .trust .explicit, #sone .trust .implicit {
+       font: inherit;
+       display: inline;
+}
+
 #sone .post .replies {
        clear: both;
        padding-top: 0.2ex;
index 84c59d3..8667bac 100644 (file)
@@ -3,16 +3,6 @@
        <div class="post-time hidden"><% post.time|html></div>
        <div class="avatar">
                <img src="/WoT/GetIdenticon?identity=<% post.sone.id|html>&amp;width=48&height=48" width="48" height="48" alt="Avatar Image" />
-               <%if !post.sone.current>
-                       <br />
-                       <div class="trust">
-                               <%if post.sone.trust.assigned>
-                                       <span class="explicit"><% post.sone.trust.explicit></span>
-                               <%else>
-                                       <span class="implicit"><% post.sone.trust.implicit></span>
-                               <%/if>
-                       </div>
-               <%/if>
        </div>
        <div class="inner-part">
                <div>
                                        <button type="submit" value="1"><%= View.Post.UnlikeLink|l10n|html></button>
                                </form>
                        <%/if>
+                       <%if !post.sone.current>
+                               <div class="trust">
+                                       <%= View.Trust.Label|l10n|html>
+                                       <%if post.sone.trust.assigned>
+                                               <div class="explicit"><% post.sone.trust.explicit></div>
+                                       <%else>
+                                               <div class="implicit"><% post.sone.trust.implicit><%if post.sone.trust.hasDistance> (<% post.sone.trust.distance>)<%/if></div>
+                                       <%/if>
+                                       <%if !post.sone.trust.maximum>
+                                               <form class="increase-trust increase-post-trust" action="increaseTrust.html" method="post">
+                                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                                       <input type="hidden" name="identity" value="<% post.sone.id|html>" />
+                                                       <button type="submit"><%= View.Trust.IncreaseTrustLink|l10n|html></button>
+                                               </form>
+                                       <%/if>
+                                       <form class="decrease-trust decrease-post-trust" action="decreaseTrust.html" method="post">
+                                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                               <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                               <input type="hidden" name="identity" value="<% post.sone.id|html>" />
+                                               <button type="submit"><%= View.Trust.DecreaseTrustLink|l10n|html></button>
+                                       </form>
+                               </div>
+                       <%/if>
                        <%if post.sone.current>
                                <form class="delete delete-post" action="deletePost.html" method="post">
                                        <input type="hidden" name="formPassword" value="<% formPassword|html>" />
index 99aa2a6..a9b308e 100644 (file)
@@ -3,16 +3,6 @@
        <div class="reply-time hidden"><% reply.time|html></div>
        <div class="avatar">
                <img src="/WoT/GetIdenticon?identity=<% reply.sone.id|html>&amp;width=36&height=36" width="36" height="36" alt="Avatar Image" />
-               <%if !reply.sone.current>
-                       <br />
-                       <div class="trust">
-                               <%if reply.sone.trust.assigned>
-                                       <span class="explicit"><% reply.sone.trust.explicit></span>
-                               <%else>
-                                       <span class="implicit"><% reply.sone.trust.implicit></span>
-                               <%/if>
-                       </div>
-               <%/if>
        </div>
        <div class="inner-part">
                <div>
                                        <button type="submit" value="1"><%= View.Post.UnlikeLink|l10n|html></button>
                                </form>
                        <%/if>
+                       <%if !reply.sone.current>
+                               <div class="trust">
+                                       <%= View.Trust.Label|l10n|html>
+                                       <%if reply.sone.trust.assigned>
+                                               <div class="explicit"><% reply.sone.trust.explicit></div>
+                                       <%else>
+                                               <div class="implicit"><% reply.sone.trust.implicit><%if reply.sone.trust.hasDistance> (<% reply.sone.trust.distance>)<%/if></div>
+                                       <%/if>
+                                       <%if !reply.sone.trust.maximum>
+                                               <form class="increase-trust increase-reply-trust" action="increaseTrust.html" method="post">
+                                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                                       <input type="hidden" name="identity" value="<% reply.sone.id|html>" />
+                                                       <button type="submit"><%= View.Trust.IncreaseTrustLink|l10n|html></button>
+                                               </form>
+                                       <%/if>
+                                       <form class="decrease-trust decrease-reply-trust" action="decreaseTrust.html" method="post">
+                                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                               <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                               <input type="hidden" name="identity" value="<% reply.sone.id|html>" />
+                                               <button type="submit"><%= View.Trust.DecreaseTrustLink|l10n|html></button>
+                                       </form>
+                               </div>
+                       <%/if>
                        <%if reply.sone.current>
                                <form class="delete delete-reply" action="deleteReply.html" method="post">
                                        <input type="hidden" name="formPassword" value="<% formPassword|html>" />