diff options
author | jessib <jessib@leap.se> | 2013-01-15 11:03:02 -0800 |
---|---|---|
committer | jessib <jessib@leap.se> | 2013-01-15 11:03:02 -0800 |
commit | 9d53f7b2d1b34da6b6103e97bd6c931cedb23e9b (patch) | |
tree | 78034e20632f9e6361deb7e1000db0bcb079f03f | |
parent | be8ee9fa669bc5554796be1fc99867fc99ba21bc (diff) |
Show different ticket characteristics when viewing the users versus when listing the tickets. Give a message if a user has no tickets.
-rw-r--r-- | help/app/views/tickets/_ticket.html.haml | 23 | ||||
-rw-r--r-- | users/app/views/users/show.html.haml | 12 | ||||
-rw-r--r-- | users/config/locales/en.yml | 2 |
3 files changed, 22 insertions, 15 deletions
diff --git a/help/app/views/tickets/_ticket.html.haml b/help/app/views/tickets/_ticket.html.haml index e02aaeb..7b37652 100644 --- a/help/app/views/tickets/_ticket.html.haml +++ b/help/app/views/tickets/_ticket.html.haml @@ -1,14 +1,17 @@ -= # TODO---this is now used in 2 places, and not sure we want the same CSS in both places +- updated_at_text = 'updated: ' + ticket.updated_at.to_s(:long) %tr %td %b = link_to ticket.title, ticket - %br - %small - created: - = ticket.created_at.to_s(:short) #todo doesn't show year - updated: - = ticket.updated_at.to_s(:short) # doesn't show year - %small.pull-right - comments by: - = ticket.commenters + - if params[:controller] == 'tickets' + %br + %small + created: + = ticket.created_at.to_s(:long) + = updated_at_text + %small.pull-right + comments by: + = ticket.commenters + - else + %small + = updated_at_text
\ No newline at end of file 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" |