From 313000fec18d56fba8f720ac32ae3ca8a92e4e36 Mon Sep 17 00:00:00 2001 From: jessib Date: Mon, 24 Dec 2012 16:22:39 -0800 Subject: Rough functionality for unauthenticated tickets. --- help/app/views/tickets/_ticket_data.html.haml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'help/app/views/tickets/_ticket_data.html.haml') diff --git a/help/app/views/tickets/_ticket_data.html.haml b/help/app/views/tickets/_ticket_data.html.haml index 3d301be..80c0d74 100644 --- a/help/app/views/tickets/_ticket_data.html.haml +++ b/help/app/views/tickets/_ticket_data.html.haml @@ -5,6 +5,13 @@ = User.find(@ticket.created_by).login - else Unauthenticated ticket creator + - if @ticket.regarding_user + %b + Regarding user: + - if regarding_user = User.find_by_login(@ticket.regarding_user) + = link_to @ticket.regarding_user, edit_user_path(regarding_user) + - else + = @ticket.regarding_user + '(no such user)' - if @ticket.email %b email: -- cgit v1.2.3 From 4f35e7555feae15fb86eb81a38d4ff39b97ab576 Mon Sep 17 00:00:00 2001 From: jessib Date: Mon, 24 Dec 2012 16:34:49 -0800 Subject: Link to edit page (as show doesn't now exist, and not clear if we will want it) of user who created ticket. --- help/app/views/tickets/_ticket_data.html.haml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'help/app/views/tickets/_ticket_data.html.haml') diff --git a/help/app/views/tickets/_ticket_data.html.haml b/help/app/views/tickets/_ticket_data.html.haml index 80c0d74..fd5d3bf 100644 --- a/help/app/views/tickets/_ticket_data.html.haml +++ b/help/app/views/tickets/_ticket_data.html.haml @@ -1,8 +1,11 @@ .spam12 %b Created by: - - if User.find(@ticket.created_by) - = User.find(@ticket.created_by).login + - if creator = User.find(@ticket.created_by) + - if !creator.is_admin? + = link_to creator.login, edit_user_path(creator) + - else + = creator.login - else Unauthenticated ticket creator - if @ticket.regarding_user -- cgit v1.2.3 From 2485527650c4832d764d318e91c10bafde8b8ae5 Mon Sep 17 00:00:00 2001 From: jessib Date: Mon, 14 Jan 2013 11:19:55 -0800 Subject: Some fixes to the how we keep track of information about users associated with a ticket. --- help/app/views/tickets/_ticket_data.html.haml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'help/app/views/tickets/_ticket_data.html.haml') diff --git a/help/app/views/tickets/_ticket_data.html.haml b/help/app/views/tickets/_ticket_data.html.haml index fd5d3bf..2261d8f 100644 --- a/help/app/views/tickets/_ticket_data.html.haml +++ b/help/app/views/tickets/_ticket_data.html.haml @@ -1,20 +1,20 @@ .spam12 %b Created by: - - if creator = User.find(@ticket.created_by) - - if !creator.is_admin? - = link_to creator.login, edit_user_path(creator) - - else - = creator.login + - if @ticket.created_by_user + = link_to @ticket.created_by_user.login, edit_user_path(@ticket.created_by_user) #todo: won't want edit path - else Unauthenticated ticket creator - if @ticket.regarding_user %b Regarding user: - - if regarding_user = User.find_by_login(@ticket.regarding_user) - = link_to @ticket.regarding_user, edit_user_path(regarding_user) - - else - = @ticket.regarding_user + '(no such user)' + - if admin? + - if @ticket.regarding_user_actual_user + = link_to @ticket.regarding_user_actual_user.login, edit_user_path(@ticket.regarding_user_actual_user) #todo: won't want edit path + - else + = @ticket.regarding_user + ' (no such user)' + - else # a non-admin is viewing the ticket, so they shouldn't see confirmation of whether the regarding_user exists or not. + = @ticket.regarding_user - if @ticket.email %b email: -- cgit v1.2.3