From: JP Date: Tue, 14 Feb 2012 10:53:43 +0000 (+0100) Subject: Add link to party page X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=176b069dd3ea15760e1e019e5bf0c67f984f78c6;p=lootjes-play Add link to party page --- diff --git a/app/controllers/Application.java b/app/controllers/Application.java index 1e40507..080785a 100644 --- a/app/controllers/Application.java +++ b/app/controllers/Application.java @@ -15,6 +15,11 @@ public class Application extends Controller { renderArgs.put("blogBaseline", Play.configuration.getProperty("blog.baseline")); } + public static void showParty(Long id) { + Party party = Party.findById(id); + render(party); + } + public static void index() { List parties = Party.find( "order by date desc" diff --git a/app/views/Application/showParty.html b/app/views/Application/showParty.html new file mode 100644 index 0000000..d9efbe6 --- /dev/null +++ b/app/views/Application/showParty.html @@ -0,0 +1,4 @@ +#{extends 'main.html' /} +#{set title:party.description/} + +#{display_party party:party, as:'full' /} diff --git a/app/views/main.html b/app/views/main.html index 16855b2..79d4d34 100644 --- a/app/views/main.html +++ b/app/views/main.html @@ -20,10 +20,10 @@
- About this blog -

${blogTitle}

+ About this application +

${blogTitle}

${blogBaseline}

-
+
@@ -35,6 +35,6 @@ Play framework as a tutorial application.

- + diff --git a/app/views/tags/display_party.html b/app/views/tags/display_party.html index cd8342e..a473118 100644 --- a/app/views/tags/display_party.html +++ b/app/views/tags/display_party.html @@ -2,7 +2,7 @@

- ${_party.description} + ${_party.description}