From f5795e2840701328c40a2c87f412488c7dc04edb Mon Sep 17 00:00:00 2001 From: David Edwards Date: Sun, 12 Oct 2014 13:33:05 +0200 Subject: [PATCH] Fixes to admin tickets. Added some data folders to gitignore. Investigate and logs arent necessary in the repo. --- .gitignore | 2 + code/modules/admin/tickets/admin_ticket.dm | 2 +- .../admin/tickets/admin_ticket_procs.dm | 43 +++++++++------ .../admin/tickets/admin_ticket_templates.dm | 29 ++++++++--- .../admin/tickets/admin_ticket_topic.dm | 52 ++++++++----------- .../admin/tickets/admin_ticket_verbs.dm | 2 +- data/investigate/gravity.html | 2 - data/investigate/singulo.html | 9 ---- 8 files changed, 77 insertions(+), 64 deletions(-) delete mode 100644 data/investigate/gravity.html delete mode 100644 data/investigate/singulo.html diff --git a/.gitignore b/.gitignore index 09dcb42f12..3cee5052c4 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ *.lk *.int /data/mode.txt +/data/logs +/data/investigate \ No newline at end of file diff --git a/code/modules/admin/tickets/admin_ticket.dm b/code/modules/admin/tickets/admin_ticket.dm index 2af9d474c2..239d597edf 100644 --- a/code/modules/admin/tickets/admin_ticket.dm +++ b/code/modules/admin/tickets/admin_ticket.dm @@ -26,7 +26,7 @@ // var/msg = "New ticket created: [key_name(owner, 1)] (?) (PP) (VV) (SM) (JMP) (CA) [ai_found ? " (CL)" : ""]: [title] View (Un)Monitor (Un)Resolve" var/msg = "New ticket created: [key_name(owner, 1)]: [title] View" - log_file << msg + log_file << "

[msg]

" //send this msg to all admins var/admin_number_total = 0 //Total number of admins diff --git a/code/modules/admin/tickets/admin_ticket_procs.dm b/code/modules/admin/tickets/admin_ticket_procs.dm index 8d7ca599a6..ebe192c514 100644 --- a/code/modules/admin/tickets/admin_ticket_procs.dm +++ b/code/modules/admin/tickets/admin_ticket_procs.dm @@ -10,22 +10,27 @@ var/message = "[time] - [calling_user] - [log_message]" log += "[message]" + world << output(message, "ViewTicketLog[ticket_id].browser:add_message") + log_file << "

[message]

" var/found = 0 for(var/M in monitors) - M << "\"[log_message]\" added to ticket by [calling_user]" + if(owner == M || calling_user == handling_admin) + break + + M << "\"[log_message]\" added to ticket by [calling_user]" if(M == calling_user) found = 1 - if(handling_admin) - handling_admin << "\"[log_message]\" added to ticket by [calling_user]" + if(handling_admin != calling_user) + handling_admin << "\"[log_message]\" added to ticket by [calling_user]" - if(owner && calling_user != owner) - calling_user << "\"[log_message]\" added to your ticket by [calling_user]" - else if(!found) - calling_user << "Your reply has been noted " + owner << "\"[log_message]\" added to your ticket by [calling_user]" + + if(!found && calling_user != owner) + calling_user << "Your reply has been noted." /datum/admin_ticket/proc/toggle_monitor(calling_user as mob) var/found = 0 @@ -36,16 +41,16 @@ if(!found) log_file << "

[calling_user] is now monitoring this ticket.

" monitors += calling_user - calling_user << "You are now monitoring this ticket" + calling_user << "You are now monitoring this ticket" if(owner) - owner << "[calling_user] is now monitoring your ticket" + owner << "[calling_user] is now monitoring your ticket" return 1 else log_file << "

[calling_user] is no longer monitoring this ticket.

" monitors -= calling_user - calling_user << "You are no longer monitoring this ticket" + calling_user << "You are no longer monitoring this ticket" if(owner) - owner << "[calling_user] is no longer monitoring your ticket" + owner << "[calling_user] is no longer monitoring your ticket" return 0 /datum/admin_ticket/proc/view_log(mob/calling_user as mob) @@ -54,11 +59,12 @@ var/content = "" content += "

[reply_link] [refresh_link]

" - content += "

Primary Admin: [handling_admin != null ? key_name(handling_admin, 1) : "Unassigned"]

" + content += "

[title]

" + content += "

Primary Admin: [handling_admin != null ? (usr.client.holder ? key_name(handling_admin, 1) : "[handling_admin]") : "Unassigned"]

" content += "

Monitors:" for(var/M in monitors) - content += " [M]" + content += " [M]" content += "

" content += "

[resolved ? "Is resolved" : "Is not resolved"]

" @@ -100,8 +106,15 @@ content += "

Location: [location]

" content += "
" - for(var/line in log) - content += "

[line]

" + + + var/i = 0 + for(i = log.len; i > 0; i--) + content += "

[log[i]]

" + + /*for(var/line in log) + content += "

[line]

"*/ + content += "
" content += "

[reply_link] [refresh_link]

" content += "
" diff --git a/code/modules/admin/tickets/admin_ticket_templates.dm b/code/modules/admin/tickets/admin_ticket_templates.dm index 4e450e28b0..3ce6802569 100644 --- a/code/modules/admin/tickets/admin_ticket_templates.dm +++ b/code/modules/admin/tickets/admin_ticket_templates.dm @@ -67,6 +67,13 @@ font-size: 12px; } + .monitor { + background-color: #202020; + border: solid 1px #404040; + margin: 2px; + padding: 2px + } + .notice { background: url(uiNoticeBackground.jpg) 0 0 repeat; color: #15345A; @@ -88,7 +95,7 @@ .info-bar { margin: 4px; - padding: 4px + padding: 4px; } .emboldened { @@ -102,32 +109,42 @@ padding: 2px 2px 2px 4px; } + .title-bar { + background-color: #202020; + border: solid 1px #404040; + margin: 4px; + padding: 4px; + text-align: center; + font-size: 15px; + font-weight: bold; + } + .control-bar { background-color: #202020; border: solid 1px #404040; margin: 4px; - padding: 4px + padding: 4px; } .resolved-bar { background-color: #202020; border: solid 1px #404040; margin: 4px; - padding: 4px + padding: 4px; } .user-bar { background-color: #202020; border: solid 1px #404040; margin: 4px; - padding: 4px + padding: 4px; } .ticket-bar { background-color: #202020; border: solid 1px #404040; margin: 4px; - padding: 4px + padding: 4px; } .large-font { @@ -177,7 +194,7 @@