Permalink
Browse files

add rss feed to the MeetingNotes

  • Loading branch information...
1 parent 3798ff3 commit 3ae39e4306fe588ef7352e7f1e002a46b466b76e @jettro committed Jan 10, 2010
@@ -10,6 +10,7 @@
<root url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/navigation-1.1/web-app" relative="/" />
<root url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/db-util-0.4/web-app" relative="/" />
<root url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/searchable-0.5.5/web-app" relative="/" />
+ <root url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/feeds-1.5/web-app" relative="/" />
</webroots>
<sourceRoots />
</configuration>
@@ -31,6 +32,10 @@
<content url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/db-util-0.4">
<sourceFolder url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/db-util-0.4/grails-app/controllers" isTestSource="false" />
</content>
+ <content url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/feeds-1.5">
+ <sourceFolder url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/feeds-1.5/src/groovy" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/feeds-1.5/grails-app/taglib" isTestSource="false" />
+ </content>
<content url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/grails-ui-1.2-SNAPSHOT">
<sourceFolder url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/grails-ui-1.2-SNAPSHOT/src/groovy" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/grails-ui-1.2-SNAPSHOT/grails-app/services" isTestSource="false" />
@@ -75,11 +80,13 @@
<root url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/mail-0.9/lib" />
<root url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/acegi-0.5.2/lib" />
<root url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/searchable-0.5.5/lib" />
+ <root url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/feeds-1.5/lib" />
</CLASSES>
<JAVADOC />
<SOURCES />
<jarDirectory url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/acegi-0.5.2/lib" recursive="false" />
<jarDirectory url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/db-util-0.4/lib" recursive="false" />
+ <jarDirectory url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/feeds-1.5/lib" recursive="false" />
<jarDirectory url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/grails-ui-1.2-SNAPSHOT/lib" recursive="false" />
<jarDirectory url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/joda-time-0.5/lib" recursive="false" />
<jarDirectory url="file://$MODULE_DIR$/../../.grails/1.2.0/projects/MyScheduling/plugins/mail-0.9/lib" recursive="false" />
View
1 README
@@ -13,6 +13,7 @@ next to the plugins that are used out-of-the-box.
- navigation-1.1 (used for the main and top navigation)
- yui-2.7.0.1 (comes with the grails-ui plugin)
- searchable-0.5.5 (plugin using compass and lucene to make you groovy domain objects searchable)
+- feeds-1.5 (plugin used to expose an rss feed)
I am writing a series of blog posts to explain what I am creating:
http://www.gridshore.nl/2009/12/20/starting-with-grails/
View
@@ -1,12 +1,13 @@
#Grails Metadata file
-#Sat Jan 09 18:26:43 CET 2010
+#Sun Jan 10 11:22:33 CET 2010
app.grails.version=1.2.0
app.name=MyScheduling
app.servlet.version=2.4
app.version=0.1
plugins.acegi=0.5.2
plugins.bubbling=2.1.1
plugins.db-util=0.4
+plugins.feeds=1.5
plugins.grails-ui=1.2-SNAPSHOT
plugins.hibernate=1.2.0
plugins.joda-time=0.5
@@ -1,7 +1,7 @@
package nl.gridshore.scheduling
class MeetingNotesController {
- def scaffold = true
+ def scaffold = MeetingNotes
static navigation = [
group: 'tabs',
@@ -10,4 +10,18 @@ class MeetingNotesController {
[group: 'tabs', action: 'create']
]
]
+
+ def feed = {
+ render(feedType: "rss", feedVersion: "2.0") {
+ title = "Meeting Notes feed"
+ link = "${grailsApplication.config.grails.serverURL}/meetingNotes/feed"
+ description = "All meeting notes that have been written per week"
+ MeetingNotes.list().each() {note ->
+ entry("weekNr : ${note.weekNr}") {
+ link = "${grailsApplication.config.grails.serverURL}/meetingNotes/show/${note.id}"
+ "Meeting notes for week number ${note.weekNr} by ${note.user.userRealName}" // return the content
+ }
+ }
+ }
+ }
}
@@ -5,6 +5,7 @@
<meta name="layout" content="main"/>
<g:set var="entityName" value="${message(code: 'meetingNotes.label', default: 'MeetingNotes')}"/>
<title><g:message code="default.list.label" args="[entityName]"/></title>
+ <feed:meta kind="rss" version="2.0" controller="meetingNotes" action="feed"/>
</head>
<body>
<div class="body">

0 comments on commit 3ae39e4

Please sign in to comment.