From edaacf3d4f43f08d363179a2f5e60394fc209107 Mon Sep 17 00:00:00 2001 From: bsag Date: Sun, 9 Apr 2006 11:03:18 +0000 Subject: [PATCH] Fixed the notes page so that it doesn't raise an error if there are no notes. It shows a message that there are no notes, and that you can add notes from the project pages. Fixes #247. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@217 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/views/note/index.rhtml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tracks/app/views/note/index.rhtml b/tracks/app/views/note/index.rhtml index 03919b43..653b23fc 100644 --- a/tracks/app/views/note/index.rhtml +++ b/tracks/app/views/note/index.rhtml @@ -1,7 +1,11 @@
- <% for notes in @all_notes -%> -
- <%= render_partial "notes", notes %> -
+ <% if @all_notes.empty? -%> +

Currently there are no notes: add notes to projects from individual project pages.

+ <% else -%> + <% for notes in @all_notes -%> +
+ <%= render_partial "notes", notes %> +
+ <% end -%> <% end -%>
\ No newline at end of file