From 9d53f7b2d1b34da6b6103e97bd6c931cedb23e9b Mon Sep 17 00:00:00 2001 From: jessib Date: Tue, 15 Jan 2013 11:03:02 -0800 Subject: Show different ticket characteristics when viewing the users versus when listing the tickets. Give a message if a user has no tickets. --- users/app/views/users/show.html.haml | 12 ++++++++---- users/config/locales/en.yml | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'users') diff --git a/users/app/views/users/show.html.haml b/users/app/views/users/show.html.haml index ec5cea6..a1eeccb 100644 --- a/users/app/views/users/show.html.haml +++ b/users/app/views/users/show.html.haml @@ -17,11 +17,15 @@ %ul.pull-left.unstyled = render aliases - else - =t :none_set + =t :none .clearfix %dt =t :most_recently_updated_tickets %dd - %table - %tbody - = render @user.most_recent_tickets + - tix = @user.most_recent_tickets + - if tix.present? + %table + %tbody + = render @user.most_recent_tickets + - else + =t :none \ No newline at end of file diff --git a/users/config/locales/en.yml b/users/config/locales/en.yml index 7aa23f1..7a6ab90 100644 --- a/users/config/locales/en.yml +++ b/users/config/locales/en.yml @@ -1,5 +1,5 @@ en: - none_set: "None set." + none: "None." signup: "Sign up" signup_message: "Please create an account." cancel: "Cancel" -- cgit v1.2.3