From 176b069dd3ea15760e1e019e5bf0c67f984f78c6 Mon Sep 17 00:00:00 2001 From: JP Date: Tue, 14 Feb 2012 11:53:43 +0100 Subject: [PATCH] Add link to party page --- app/controllers/Application.java | 5 +++++ app/views/Application/showParty.html | 4 ++++ app/views/main.html | 8 ++++---- app/views/tags/display_party.html | 2 +- conf/application.conf | 3 +++ conf/routes | 6 ++++++ 6 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 app/views/Application/showParty.html 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}