Rename “isCurrent” property to “current”.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 19 Oct 2010 06:41:49 +0000 (08:41 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 19 Oct 2010 06:41:49 +0000 (08:41 +0200)
src/main/java/net/pterodactylus/sone/template/SoneAccessor.java
src/main/resources/templates/include/viewPost.html
src/main/resources/templates/include/viewSone.html
src/main/resources/templates/viewSone.html

index 54a5a86..ee7d16d 100644 (file)
@@ -33,7 +33,7 @@ import net.pterodactylus.util.template.ReflectionAccessor;
  * <dd>Will return {@code true} if the sone in question is a friend of the
  * currently logged in Sone (as determined by accessing the “currentSone”
  * variable of the given {@link DataProvider}).</dd>
- * <dt>isCurrent</dt>
+ * <dt>current</dt>
  * <dd>Will return {@code true} if the sone in question is the currently logged
  * in Sone.</dd>
  * </dl>
@@ -53,7 +53,7 @@ public class SoneAccessor extends ReflectionAccessor {
                } else if (member.equals("friend")) {
                        Sone currentSone = (Sone) dataProvider.getData("currentSone");
                        return currentSone.hasFriend(sone) ? true : null;
-               } else if (member.equals("isCurrent")) {
+               } else if (member.equals("current")) {
                        Sone currentSone = (Sone) dataProvider.getData("currentSone");
                        return currentSone.equals(sone);
                } else if (member.equals("blocked")) {
index 9eb5925..7c0eb19 100644 (file)
@@ -5,7 +5,7 @@
        </div>
        <div class="status-line">
                <div class="time"><a href="viewPost.html?post=<% post.id>"><% post.time|date format="MMM d, yyyy, HH:mm:ss"></a></div>
-               <%if post.sone.isCurrent><div class="delete"><a href="deletePost.html?post=<% post.id>"><%= View.Post.DeleteLink|l10n|html></a></div><%/if>
+               <%if post.sone.current><div class="delete"><a href="deletePost.html?post=<% post.id>"><%= View.Post.DeleteLink|l10n|html></a></div><%/if>
        </div>
        <div class="replies">
                <%foreach post.replies reply>
@@ -16,7 +16,7 @@
                                </div>
                                <div class="status-line">
                                        <div class="time"><% reply.time|date format="MMM d, yyyy, HH:mm:ss"></div>
-                                       <%if reply.sone.isCurrent><div class="delete"><a href="deleteReply.html?reply=<% reply.id>"><%= View.Post.Reply.DeleteLink|l10n|html></a></div><%/if>
+                                       <%if reply.sone.current><div class="delete"><a href="deleteReply.html?reply=<% reply.id>"><%= View.Post.Reply.DeleteLink|l10n|html></a></div><%/if>
                                </div>
                        </div>
                <%/foreach>
index c75119a..a5debbc 100644 (file)
@@ -2,7 +2,7 @@
        <div class="profile-link"><a href="viewSone.html?sone=<% sone.id>" title="<% sone.requestUri|html>"><% sone.niceName|html></a></div>
        <div class="last-update">(<%= View.Sone.Label.LastUpdate|l10n|html> <% sone.time|date format="MMM d, yyyy, HH:mm:ss">)</div>
        <%ifnull ! currentSone>
-               <%if ! sone.isCurrent>
+               <%if ! sone.current>
                        <%if sone.friend>
                                <form class="unfollow" action="unfollowSone.html" method="post">
                                        <input type="hidden" name="formPassword" value="<% formPassword|html>" />
index 84c9c51..aad70ee 100644 (file)
@@ -12,7 +12,7 @@
 
                <h1><%= Page.ViewSone.PostList.Title|l10n|insert needle="{sone}" key=sone.niceName|html></h1>
 
-               <%if ! sone.isCurrent>
+               <%if ! sone.current>
                        <%if sone.friend>
                                <div><a href="unfollowSone.html?sone=<% sone.id>"><%= Page.ViewSone.UnfollowSone.Text|l10n|html></a></div>
                        <%else>