Show profile fields on Sone page.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 12 Jan 2011 09:02:30 +0000 (10:02 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 12 Jan 2011 09:02:30 +0000 (10:02 +0100)
src/main/resources/i18n/sone.en.properties
src/main/resources/templates/viewSone.html

index 740cf45..91b39a8 100644 (file)
@@ -92,6 +92,8 @@ Page.ViewSone.UnknownSone.Description=This Sone has not yet been retrieved. Plea
 Page.ViewSone.WriteAMessage=You can write a message to this Sone here. Please note that everybody will be able to read this message!
 Page.ViewSone.PostList.Title=Posts by {sone}
 Page.ViewSone.PostList.Text.NoPostYet=This Sone has not yet posted anything.
+Page.ViewSone.Profile.Title=Profile
+Page.ViewSone.Profile.Label.Name=Name
 
 Page.ViewPost.Title=View Post - Sone
 Page.ViewPost.Page.Title=View Post by {sone}
index 884fa0f..92c9b37 100644 (file)
 
                <%if ! sone.current>
                        <%include include/viewSone.html>
+               <%/if>
+
+               <h1><%= Page.ViewSone.Profile.Title|l10n|html></h1>
 
+                       <div class="profile-field">
+                               <div class="field-name"><%= Page.ViewSone.Profile.Label.Name|l10n|html></div>
+                               <div class="field-value"><% sone.niceName|html></div>
+                       </div>
+
+                       <%foreach sone.profile.fields field>
+                               <div class="profile-field">
+                                       <div class="field-name"><% field.key|html></div>
+                                       <div class="field-value"><% field.value|html></div>
+                               </div>
+                       <%/foreach>
+
+               <%if ! sone.current>
                        <p><%= Page.ViewSone.WriteAMessage|l10n|html></p>
 
                        <form action="createPost.html" id="post-message" method="post">
@@ -31,7 +47,6 @@
                        </form>
                <%/if>
 
-
                <h1><%= Page.ViewSone.PostList.Title|l10n|insert needle="{sone}" key=sone.niceName|html></h1>
 
                <div id="posts">