]> www.vanbest.org Git - lootjes-play/commitdiff
Show organised parties list in base admin page master
authorJP <jp@here>
Tue, 28 Feb 2012 16:25:43 +0000 (17:25 +0100)
committerJP <jp@here>
Tue, 28 Feb 2012 16:25:43 +0000 (17:25 +0100)
app/controllers/Admin.java
app/views/Admin/index.html

index 12cd2e9e843583d635d43bfd3d0aa11dbbf42808..865b343dad60f84b2a25d1f0f2d93ddb077fbe2e 100644 (file)
@@ -19,7 +19,8 @@ public class Admin extends Controller {
     }
  
     public static void index() {
-        render();
+        List<Party> parties = Party.find("organiser.email", Security.connected()).fetch();
+        render(parties);
     }
     
 }
index 0a00e92fc4972f580f2d001beb822221fc81d414..ff0aa8cdf6ccee1f26da13b536682f392ba40a7e 100644 (file)
@@ -1,3 +1,13 @@
 #{extends 'admin.html' /}
-
-Welcome ${user}!
+<h3>Welcome ${user}, <span>you are organising ${parties.size() ?: 'no'} ${parties.pluralize('party', 'parties')}</span></h3>
+#{list items:parties, as:'party'}
+    <p class="post ${party_parity}">
+        <a href="#">${party.toString()}</a>
+    </p>
+#{/list}
+<p id="newPost" >
+    <a href="#"><span>+</span> start a new party</a>
+</p>