aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrancis <francis>2007-12-13 15:55:31 +0000
committerfrancis <francis>2007-12-13 15:55:31 +0000
commitf784fd6064c69011b8e18c597774422e653a4101 (patch)
tree3e7b9f395ebc62cb76883d9cae6dc5ae0bc23151
parent3b9786bbf3b7f3d44e6ce2eed45c5f2d01c85006 (diff)
Display better when the user hasn't filed any requests.
-rw-r--r--app/views/user/show.rhtml22
1 files changed, 14 insertions, 8 deletions
diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml
index 16cf528c2..ec3d2c33c 100644
--- a/app/views/user/show.rhtml
+++ b/app/views/user/show.rhtml
@@ -8,14 +8,20 @@
<h1><%=@title%></h1>
<p class="subtitle">Joined on <%= simple_date(display_user.created_at) %></p>
- <p>Freedom of Information requests made by this person:</p>
- <ul>
- <% for info_request in display_user.info_requests %>
- <li>
- <%= info_request_link(info_request) %>
- on <%= simple_date(info_request.created_at) %>
- </li>
+ <% if display_user.info_requests.empty? %>
+ <p>This person has made no Freedom of Information requests using this site.</p>
+
+ <% else %>
+ <p>Freedom of Information requests made by this person:</p>
+ <ul>
+ <% for info_request in display_user.info_requests %>
+ <li>
+ <%= info_request_link(info_request) %>
+ on <%= simple_date(info_request.created_at) %>
+ </li>
+ <% end %>
+ </ul>
<% end %>
- </ul>
+
<% end %>