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

index 97cf327..54a5a86 100644 (file)
@@ -29,7 +29,7 @@ import net.pterodactylus.util.template.ReflectionAccessor;
  * <dt>niceName</dt>
  * <dd>Will show a combination of first name, middle name, and last name, if
  * available, otherwise the username of the Sone is returned.</dd>
- * <dt>isFriend</dt>
+ * <dt>friend</dt>
  * <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>
@@ -50,7 +50,7 @@ public class SoneAccessor extends ReflectionAccessor {
                Sone sone = (Sone) object;
                if (member.equals("niceName")) {
                        return getNiceName(sone);
-               } else if (member.equals("isFriend")) {
+               } else if (member.equals("friend")) {
                        Sone currentSone = (Sone) dataProvider.getData("currentSone");
                        return currentSone.hasFriend(sone) ? true : null;
                } else if (member.equals("isCurrent")) {
index 57ab384..c75119a 100644 (file)
@@ -3,7 +3,7 @@
        <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.isFriend>
+                       <%if sone.friend>
                                <form class="unfollow" action="unfollowSone.html" method="post">
                                        <input type="hidden" name="formPassword" value="<% formPassword|html>" />
                                        <input type="hidden" name="sone" value="<% sone.id>" />
index 7b0647f..84c9c51 100644 (file)
@@ -13,7 +13,7 @@
                <h1><%= Page.ViewSone.PostList.Title|l10n|insert needle="{sone}" key=sone.niceName|html></h1>
 
                <%if ! sone.isCurrent>
-                       <%if sone.isFriend>
+                       <%if sone.friend>
                                <div><a href="unfollowSone.html?sone=<% sone.id>"><%= Page.ViewSone.UnfollowSone.Text|l10n|html></a></div>
                        <%else>
                                <div><a href="followSone.html?sone=<% sone.id>"><%= Page.ViewSone.FollowSone.Text|l10n|html></a></div>