mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-06 07:23:16 +00:00
Merge pull request #9792 from Techhead0/requestConsole
Request Console part two: NanoUI
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#define RC_INFO 4 //Relay Info
|
||||
|
||||
//Request Console Screens
|
||||
#define RCS_MAINMENU 0 // Main menu
|
||||
#define RCS_RQASSIST 1 // Request supplies
|
||||
#define RCS_RQSUPPLY 2 // Request assistance
|
||||
#define RCS_SENDINFO 3 // Relay information
|
||||
@@ -15,7 +16,6 @@
|
||||
#define RCS_VIEWMSGS 6 // View messages
|
||||
#define RCS_MESSAUTH 7 // Authentication before sending
|
||||
#define RCS_ANNOUNCE 8 // Send announcement
|
||||
#define RCS_MAINMENU 9 // Main menu
|
||||
|
||||
var/req_console_assistance = list()
|
||||
var/req_console_supplies = list()
|
||||
@@ -29,13 +29,12 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
icon = 'icons/obj/terminals.dmi'
|
||||
icon_state = "req_comp0"
|
||||
var/department = "Unknown" //The list of all departments on the station (Determined from this variable on each unit) Set this to the same thing if you want several consoles in one department
|
||||
var/list/messages = list() //List of all messages
|
||||
var/list/message_log = list() //List of all messages
|
||||
var/departmentType = 0 //Bitflag. Zero is reply-only. Map currently uses raw numbers instead of defines.
|
||||
var/newmessagepriority = 0
|
||||
// 0 = no new message
|
||||
// 1 = normal priority
|
||||
// 2 = high priority
|
||||
// 3 = extreme priority - not implemented, will probably require some hacking... everything needs to have a hidden feature in this game.
|
||||
var/screen = RCS_MAINMENU
|
||||
var/silent = 0 // set to 1 for it not to beep all the time
|
||||
// var/hackState = 0
|
||||
@@ -49,7 +48,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
var/msgVerified = "" //Will contain the name of the person who varified it
|
||||
var/msgStamped = "" //If a message is stamped, this will contain the stamp name
|
||||
var/message = "";
|
||||
var/dpt = ""; //the department which will be receiving the message
|
||||
var/recipient = ""; //the department which will be receiving the message
|
||||
var/priority = -1 ; //Priority of the message being sent
|
||||
light_range = 0
|
||||
var/datum/announcement/announcement = new
|
||||
@@ -64,7 +63,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
icon_state = "req_comp_off"
|
||||
else
|
||||
if(icon_state == "req_comp_off")
|
||||
icon_state = "req_comp0"
|
||||
icon_state = "req_comp[newmessagepriority]"
|
||||
|
||||
/obj/machinery/requests_console/New()
|
||||
..()
|
||||
@@ -81,6 +80,8 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
if (departmentType & RC_INFO)
|
||||
req_console_information |= department
|
||||
|
||||
set_light(1)
|
||||
|
||||
/obj/machinery/requests_console/Destroy()
|
||||
allConsoles -= src
|
||||
var/lastDeptRC = 1
|
||||
@@ -100,105 +101,34 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
/obj/machinery/requests_console/attack_hand(user as mob)
|
||||
if(..(user))
|
||||
return
|
||||
var/dat
|
||||
dat = text("<HEAD><TITLE>Requests Console</TITLE></HEAD><H3>[department] Requests Console</H3>")
|
||||
if(!open)
|
||||
switch(screen)
|
||||
if(RCS_RQASSIST) //req. assistance
|
||||
dat += text("Which department do you need assistance from?<BR><BR>")
|
||||
for(var/dpt in req_console_assistance)
|
||||
if (dpt != department)
|
||||
dat += text("[dpt] (<A href='?src=\ref[src];write=[ckey(dpt)]'>Message</A> or ")
|
||||
dat += text("<A href='?src=\ref[src];write=[ckey(dpt)];priority=2'>High Priority</A>")
|
||||
// if (hackState == 1)
|
||||
// dat += text(" or <A href='?src=\ref[src];write=[ckey(dpt)];priority=3'>EXTREME</A>)")
|
||||
dat += text(")<BR>")
|
||||
dat += text("<BR><A href='?src=\ref[src];setScreen=[RCS_MAINMENU]'>Back</A><BR>")
|
||||
ui_interact(user)
|
||||
|
||||
if(RCS_RQSUPPLY) //req. supplies
|
||||
dat += text("Which department do you need supplies from?<BR><BR>")
|
||||
for(var/dpt in req_console_supplies)
|
||||
if (dpt != department)
|
||||
dat += text("[dpt] (<A href='?src=\ref[src];write=[ckey(dpt)]'>Message</A> or ")
|
||||
dat += text("<A href='?src=\ref[src];write=[ckey(dpt)];priority=2'>High Priority</A>")
|
||||
// if (hackState == 1)
|
||||
// dat += text(" or <A href='?src=\ref[src];write=[ckey(dpt)];priority=3'>EXTREME</A>)")
|
||||
dat += text(")<BR>")
|
||||
dat += text("<BR><A href='?src=\ref[src];setScreen=[RCS_MAINMENU]'>Back</A><BR>")
|
||||
/obj/machinery/requests_console/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/data[0]
|
||||
|
||||
if(RCS_SENDINFO) //relay information
|
||||
dat += text("Which department would you like to send information to?<BR><BR>")
|
||||
for(var/dpt in req_console_information)
|
||||
if (dpt != department)
|
||||
dat += text("[dpt] (<A href='?src=\ref[src];write=[ckey(dpt)]'>Message</A> or ")
|
||||
dat += text("<A href='?src=\ref[src];write=[ckey(dpt)];priority=2'>High Priority</A>")
|
||||
// if (hackState == 1)
|
||||
// dat += text(" or <A href='?src=\ref[src];write=[ckey(dpt)];priority=3'>EXTREME</A>)")
|
||||
dat += text(")<BR>")
|
||||
dat += text("<BR><A href='?src=\ref[src];setScreen=[RCS_MAINMENU]'>Back</A><BR>")
|
||||
data["department"] = department
|
||||
data["screen"] = screen
|
||||
data["message_log"] = message_log
|
||||
data["newmessagepriority"] = newmessagepriority
|
||||
data["silent"] = silent
|
||||
data["announcementConsole"] = announcementConsole
|
||||
|
||||
if(RCS_SENTPASS) //sent successfully
|
||||
dat += text("<FONT COLOR='GREEN'>Message sent</FONT><BR><BR>")
|
||||
dat += text("<A href='?src=\ref[src];setScreen=[RCS_MAINMENU]'>Continue</A><BR>")
|
||||
data["assist_dept"] = req_console_assistance
|
||||
data["supply_dept"] = req_console_supplies
|
||||
data["info_dept"] = req_console_information
|
||||
|
||||
if(RCS_SENTFAIL) //unsuccessful; not sent
|
||||
dat += text("<FONT COLOR='RED'>An error occurred. </FONT><BR><BR>")
|
||||
dat += text("<A href='?src=\ref[src];setScreen=[RCS_MAINMENU]'>Continue</A><BR>")
|
||||
data["message"] = message
|
||||
data["recipient"] = recipient
|
||||
data["priortiy"] = priority
|
||||
data["msgStamped"] = msgStamped
|
||||
data["msgVerified"] = msgVerified
|
||||
data["announceAuth"] = announceAuth
|
||||
|
||||
if(RCS_VIEWMSGS) //view messages
|
||||
for (var/obj/machinery/requests_console/Console in allConsoles)
|
||||
if (Console.department == department)
|
||||
Console.newmessagepriority = 0
|
||||
Console.icon_state = "req_comp0"
|
||||
Console.set_light(1)
|
||||
newmessagepriority = 0
|
||||
icon_state = "req_comp0"
|
||||
for(var/msg in messages)
|
||||
dat += text("[msg]<BR>")
|
||||
dat += text("<A href='?src=\ref[src];setScreen=[RCS_MAINMENU]'>Back to main menu</A><BR>")
|
||||
|
||||
if(RCS_MESSAUTH) //authentication before sending
|
||||
dat += text("<B>Message Authentication</B><BR><BR>")
|
||||
dat += text("<b>Message for [dpt]: </b>[message]<BR><BR>")
|
||||
dat += text("You may authenticate your message now by scanning your ID or your stamp<BR><BR>")
|
||||
dat += text("Validated by: [msgVerified]<br>");
|
||||
dat += text("Stamped by: [msgStamped]<br>");
|
||||
dat += text("<A href='?src=\ref[src];department=[dpt]'>Send</A><BR>");
|
||||
dat += text("<BR><A href='?src=\ref[src];setScreen=[RCS_MAINMENU]'>Back</A><BR>")
|
||||
|
||||
if(RCS_ANNOUNCE) //send announcement
|
||||
dat += text("<B>Station wide announcement</B><BR><BR>")
|
||||
if(announceAuth)
|
||||
dat += text("<b>Authentication accepted</b><BR><BR>")
|
||||
else
|
||||
dat += text("Swipe your card to authenticate yourself.<BR><BR>")
|
||||
dat += text("<b>Message: </b>[message] <A href='?src=\ref[src];writeAnnouncement=1'>Write</A><BR><BR>")
|
||||
if (announceAuth && message)
|
||||
dat += text("<A href='?src=\ref[src];sendAnnouncement=1'>Announce</A><BR>");
|
||||
dat += text("<BR><A href='?src=\ref[src];setScreen=[RCS_MAINMENU]'>Back</A><BR>")
|
||||
|
||||
else //main menu
|
||||
screen = RCS_MAINMENU
|
||||
reset_announce()
|
||||
if (newmessagepriority == 1)
|
||||
dat += text("<FONT COLOR='RED'>There are new messages</FONT><BR>")
|
||||
if (newmessagepriority == 2)
|
||||
dat += text("<FONT COLOR='RED'><B>NEW PRIORITY MESSAGES</B></FONT><BR>")
|
||||
dat += text("<A href='?src=\ref[src];setScreen=[RCS_VIEWMSGS]'>View Messages</A><BR><BR>")
|
||||
|
||||
dat += text("<A href='?src=\ref[src];setScreen=[RCS_RQASSIST]'>Request Assistance</A><BR>")
|
||||
dat += text("<A href='?src=\ref[src];setScreen=[RCS_RQSUPPLY]'>Request Supplies</A><BR>")
|
||||
dat += text("<A href='?src=\ref[src];setScreen=[RCS_SENDINFO]'>Relay Anonymous Information</A><BR><BR>")
|
||||
if(announcementConsole)
|
||||
dat += text("<A href='?src=\ref[src];setScreen=[RCS_ANNOUNCE]'>Send station-wide announcement</A><BR><BR>")
|
||||
if (silent)
|
||||
dat += text("Speaker <A href='?src=\ref[src];setSilent=0'>OFF</A>")
|
||||
else
|
||||
dat += text("Speaker <A href='?src=\ref[src];setSilent=1'>ON</A>")
|
||||
|
||||
user << browse("[dat]", "window=request_console")
|
||||
onclose(user, "req_console")
|
||||
return
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "request_console.tmpl", "[department] Request Console", 520, 410)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/requests_console/Topic(href, href_list)
|
||||
if(..()) return
|
||||
@@ -206,38 +136,30 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
add_fingerprint(usr)
|
||||
|
||||
if(reject_bad_text(href_list["write"]))
|
||||
dpt = ckey(href_list["write"]) //write contains the string of the receiving department's name
|
||||
recipient = href_list["write"] //write contains the string of the receiving department's name
|
||||
|
||||
var/new_message = sanitize(input("Write your message:", "Awaiting Input", ""))
|
||||
if(new_message)
|
||||
message = new_message
|
||||
screen = RCS_MESSAUTH
|
||||
switch(href_list["priority"])
|
||||
if("1") priority = 1
|
||||
if("2") priority = 2
|
||||
else priority = -1
|
||||
else priority = 0
|
||||
else
|
||||
dpt = "";
|
||||
msgVerified = ""
|
||||
msgStamped = ""
|
||||
screen = RCS_MAINMENU
|
||||
priority = -1
|
||||
reset_message(1)
|
||||
|
||||
if(href_list["writeAnnouncement"])
|
||||
var/new_message = sanitize(input("Write your message:", "Awaiting Input", ""))
|
||||
if(new_message)
|
||||
message = new_message
|
||||
switch(href_list["priority"])
|
||||
if("2") priority = 2
|
||||
else priority = -1
|
||||
else
|
||||
reset_announce()
|
||||
screen = RCS_MAINMENU
|
||||
reset_message(1)
|
||||
|
||||
if(href_list["sendAnnouncement"])
|
||||
if(!announcementConsole) return
|
||||
announcement.Announce(message, msg_sanitized = 1)
|
||||
reset_announce()
|
||||
screen = RCS_MAINMENU
|
||||
reset_message(1)
|
||||
|
||||
if( href_list["department"] && message )
|
||||
var/log_msg = message
|
||||
@@ -245,38 +167,37 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
screen = RCS_SENTFAIL
|
||||
for (var/obj/machinery/message_server/MS in world)
|
||||
if(!MS.active) continue
|
||||
MS.send_rc_message(href_list["department"],department,log_msg,msgStamped,msgVerified,priority)
|
||||
MS.send_rc_message(ckey(href_list["department"]),department,log_msg,msgStamped,msgVerified,priority)
|
||||
pass = 1
|
||||
if(pass)
|
||||
screen = RCS_SENTPASS
|
||||
messages += "<B>Message sent to [dpt]</B><BR>[message]"
|
||||
message_log += "<B>Message sent to [recipient]</B><BR>[message]"
|
||||
else
|
||||
audible_message(text("\icon[src] *The Requests Console beeps: 'NOTICE: No server detected!'"),,4)
|
||||
|
||||
|
||||
//Handle screen switching
|
||||
if(href_list["setScreen"])
|
||||
var/tempScreen = text2num(href_list["setScreen"])
|
||||
if(tempScreen)
|
||||
if(tempScreen == RCS_ANNOUNCE && !announcementConsole)
|
||||
return
|
||||
if(tempScreen == RCS_VIEWMSGS)
|
||||
for (var/obj/machinery/requests_console/Console in allConsoles)
|
||||
if (Console.department == department)
|
||||
Console.newmessagepriority = 0
|
||||
Console.icon_state = "req_comp0"
|
||||
Console.set_light(1)
|
||||
if(tempScreen == RCS_MAINMENU)
|
||||
dpt = ""
|
||||
msgVerified = ""
|
||||
msgStamped = ""
|
||||
message = ""
|
||||
priority = -1
|
||||
reset_message()
|
||||
screen = tempScreen
|
||||
|
||||
//Handle silencing the console
|
||||
switch( href_list["setSilent"] )
|
||||
if(null) //skip
|
||||
if("1") silent = 1
|
||||
else silent = 0
|
||||
if(href_list["toggleSilent"])
|
||||
silent = !silent
|
||||
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
//err... hacking code, which has no reason for existing... but anyway... it's supposed to unlock priority 3 messanging on that console (EXTREME priority...) the code for that actually exists.
|
||||
//err... hacking code, which has no reason for existing... but anyway... it was once supposed to unlock priority 3 messanging on that console (EXTREME priority...), but the code for that was removed.
|
||||
/obj/machinery/requests_console/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob)
|
||||
/*
|
||||
if (istype(O, /obj/item/weapon/crowbar))
|
||||
@@ -301,6 +222,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
user << "You can't do much with that."*/
|
||||
|
||||
if (istype(O, /obj/item/weapon/card/id))
|
||||
if(inoperable(MAINT)) return
|
||||
if(screen == RCS_MESSAUTH)
|
||||
var/obj/item/weapon/card/id/T = O
|
||||
msgVerified = text("<font color='green'><b>Verified by [T.registered_name] ([T.assignment])</b></font>")
|
||||
@@ -311,27 +233,24 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
announceAuth = 1
|
||||
announcement.announcer = ID.assignment ? "[ID.assignment] [ID.registered_name]" : ID.registered_name
|
||||
else
|
||||
reset_announce()
|
||||
reset_message()
|
||||
user << "<span class='warning'>You are not authorized to send announcements.</span>"
|
||||
updateUsrDialog()
|
||||
if (istype(O, /obj/item/weapon/stamp))
|
||||
if(inoperable(MAINT)) return
|
||||
if(screen == RCS_MESSAUTH)
|
||||
var/obj/item/weapon/stamp/T = O
|
||||
msgStamped = text("<font color='blue'><b>Stamped with the [T.name]</b></font>")
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/requests_console/proc/reset_announce()
|
||||
announceAuth = 0
|
||||
/obj/machinery/requests_console/proc/reset_message(var/mainmenu = 0)
|
||||
message = ""
|
||||
recipient = ""
|
||||
priority = 0
|
||||
msgVerified = ""
|
||||
msgStamped = ""
|
||||
announceAuth = 0
|
||||
announcement.announcer = ""
|
||||
|
||||
#undef RCS_RQASSIST
|
||||
#undef RCS_RQSUPPLY
|
||||
#undef RCS_SENDINFO
|
||||
#undef RCS_SENTPASS
|
||||
#undef RCS_SENTFAIL
|
||||
#undef RCS_VIEWMSGS
|
||||
#undef RCS_MESSAUTH
|
||||
#undef RCS_ANNOUNCE
|
||||
#undef RCS_MAINMENU
|
||||
if(mainmenu)
|
||||
screen = RCS_MAINMENU
|
||||
|
||||
@@ -44,27 +44,12 @@
|
||||
for(var/area/A in world)
|
||||
if(is_type_in_list(A,areaType) && !is_type_in_list(A,areaNotType))
|
||||
areas += A
|
||||
|
||||
if(areas && areas.len > 0)
|
||||
var/pass = 0
|
||||
var/my_department = "[station_name()] firewall subroutines"
|
||||
var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [worldtime2text()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.<br>"
|
||||
for(var/obj/machinery/message_server/MS in world)
|
||||
MS.send_rc_message("Engineering", my_department, rc_message, "", "", 2)
|
||||
pass = 1
|
||||
if(pass) //This entire block should be handled by send_rc_message(). I'm not rewriting it.
|
||||
var/sending = rc_message + "<font color='blue'><b>Message dispatched by [my_department].</b></font>"
|
||||
for (var/obj/machinery/requests_console/Console in allConsoles)
|
||||
var/keyed_department = ckey(Console.department)
|
||||
if(keyed_department == ckey("Engineering"))
|
||||
if(Console.newmessagepriority < 2)
|
||||
Console.newmessagepriority = 2
|
||||
Console.icon_state = "req_comp2"
|
||||
if(!Console.silent)
|
||||
playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(5, Console.loc))
|
||||
O.show_message(text("\icon[Console] *The Requests Console beeps: 'PRIORITY Alert in [my_department]'"))
|
||||
Console.messages += "<B><FONT color='red'>High Priority message from [my_department]</FONT></B><BR>[sending]"
|
||||
|
||||
for(var/mob/living/silicon/ai/A in player_list)
|
||||
A << "<span class='danger'>Malicious program detected in the [english_list(areaName)] lighting and airlock control systems by [my_department].</span>"
|
||||
|
||||
|
||||
@@ -115,6 +115,9 @@ var/global/list/obj/machinery/message_server/message_servers = list()
|
||||
authmsg += "[stamp]<br>"
|
||||
for (var/obj/machinery/requests_console/Console in allConsoles)
|
||||
if (ckey(Console.department) == ckey(recipient))
|
||||
if(Console.inoperable())
|
||||
Console.message_log += "<B>Message lost due to console failure.</B><BR>Please contact [station_name()] system adminsitrator or AI for technical assistance.<BR>"
|
||||
continue
|
||||
if(Console.newmessagepriority < priority)
|
||||
Console.newmessagepriority = priority
|
||||
Console.icon_state = "req_comp[priority]"
|
||||
@@ -123,17 +126,12 @@ var/global/list/obj/machinery/message_server/message_servers = list()
|
||||
if(!Console.silent)
|
||||
playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
Console.audible_message(text("\icon[Console] *The Requests Console beeps: 'PRIORITY Alert in [sender]'"),,5)
|
||||
Console.messages += "<B><FONT color='red'>High Priority message from <A href='?src=\ref[Console];write=[ckey(sender)]'>[sender]</A></FONT></B><BR>[authmsg]"
|
||||
if(3)
|
||||
if(!Console.silent)
|
||||
playsound(Console.loc, 'sound/machines/twobeep.ogg', 70, 1)
|
||||
Console.audible_message(text("\icon[Console] *The Requests Console yells: 'EXTREME PRIORITY alert in [sender]'"),,7)
|
||||
Console.messages += "<B><FONT color='red'>Extreme Priority message from <A href='?src=\ref[Console];write=[ckey(sender)]'>[sender]</A></FONT></B><BR>[authmsg]"
|
||||
Console.message_log += "<B><FONT color='red'>High Priority message from <A href='?src=\ref[Console];write=[sender]'>[sender]</A></FONT></B><BR>[authmsg]"
|
||||
else
|
||||
if(!Console.silent)
|
||||
playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
Console.audible_message(text("\icon[Console] *The Requests Console beeps: 'Message from [sender]'"),,4)
|
||||
Console.messages += "<B>Message from <A href='?src=\ref[Console];write=[ckey(sender)]'>[sender]</A></B><BR>[authmsg]"
|
||||
Console.message_log += "<B>Message from <A href='?src=\ref[Console];write=[sender]'>[sender]</A></B><BR>[authmsg]"
|
||||
Console.set_light(2)
|
||||
|
||||
|
||||
|
||||
4
html/changelogs/Techhead-RCNanoUI.yml
Normal file
4
html/changelogs/Techhead-RCNanoUI.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
author: Techhead
|
||||
delete-after: True
|
||||
changes:
|
||||
- rscadd: "Converted Request Console interface into NanoUI."
|
||||
122
nano/templates/request_console.tmpl
Normal file
122
nano/templates/request_console.tmpl
Normal file
@@ -0,0 +1,122 @@
|
||||
<!--
|
||||
Title: Request Console
|
||||
Used In File(s): \code\game\machinery\requests_console.dm
|
||||
|
||||
#define RCS_MAINMENU 0 // Main men
|
||||
#define RCS_RQASSIST 1 // Request supplies
|
||||
#define RCS_RQSUPPLY 2 // Request assistance
|
||||
#define RCS_SENDINFO 3 // Relay information
|
||||
#define RCS_SENTPASS 4 // Message sent successfully
|
||||
#define RCS_SENTFAIL 5 // Message sent unsuccessfully
|
||||
#define RCS_VIEWMSGS 6 // View messages
|
||||
#define RCS_MESSAUTH 7 // Authentication before sending
|
||||
#define RCS_ANNOUNCE 8 // Send announcementu
|
||||
|
||||
-->
|
||||
|
||||
{{if data.screen == 1}}
|
||||
<div class="item"><h3>Request assistance from another department.</h3></div>
|
||||
<table class="block">
|
||||
{{for data.assist_dept}}
|
||||
{{if value != data.department}}
|
||||
<tr>
|
||||
<td><div class="itemLabelWidest" align="right">{{:value}} -</div></td>
|
||||
<td><div class="item">{{:helper.link('Message', null, { 'write' : value , 'priority' : 1 })}}</div></td>
|
||||
<td><div class="item">{{:helper.link('High Priority', null, { 'write' : value , 'priority' : 2 })}}</div></td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{empty}}
|
||||
<tr><td><div class="itemLabel">There are no available departments to request assistance from.</div></td></tr>
|
||||
{{/for}}
|
||||
</table><br>
|
||||
<div class="item">{{:helper.link('Back', 'arrowreturnthick-1-w', { 'setScreen' : 0 })}}</div>
|
||||
{{else data.screen == 2}}
|
||||
<div class="item"><h3>Request supplies from another department.</h3></div>
|
||||
<table class="block">
|
||||
{{for data.supply_dept}}
|
||||
{{if value != data.department}}
|
||||
<tr>
|
||||
<td><div class="itemLabelWidest" align="right">{{:value}} - </div></td>
|
||||
<td><div class="item">{{:helper.link('Message', null, { 'write' : value , 'priority' : 1 })}}</div></td>
|
||||
<td><div class="item">{{:helper.link('High Priority', null, { 'write' : value , 'priority' : 2 })}}</div></td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{empty}}
|
||||
<tr><td><div class="itemLabel">There are no available departments to request supplies from.</div></td></tr>
|
||||
{{/for}}
|
||||
</table><br>
|
||||
<div class="item">{{:helper.link('Back', 'arrowreturnthick-1-w', { 'setScreen' : 0 })}}</div>
|
||||
{{else data.screen == 3}}
|
||||
<div class="item"><h3>Relay info to another department.</h3></div>
|
||||
<table class="block">
|
||||
{{for data.info_dept}}
|
||||
{{if value != data.department}}
|
||||
<tr>
|
||||
<td><div class="itemLabelWidest" align="right">{{:value}} -</div></td>
|
||||
<td width=70px><div class="item">{{:helper.link('Message', null, { 'write' : value , 'priority' : 1 })}}</div></td>
|
||||
<td width=90px><div class="item">{{:helper.link('High Priority', null, { 'write' : value , 'priority' : 2 })}}</div></td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{empty}}
|
||||
<tr><td><div class="itemLabel">There are no available departments to relay information to.</div></td></tr>
|
||||
{{/for}}
|
||||
</table><br>
|
||||
<div class="item">{{:helper.link('Back', 'arrowreturnthick-1-w', { 'setScreen' : 0 })}}</div>
|
||||
{{else data.screen == 4}}
|
||||
<div class="item"><b>Message sent successfully.</b></div>
|
||||
<div class="item">{{:helper.link('Continue', 'arrowthick-1-e', { 'setScreen' : 0 })}}</div>
|
||||
{{else data.screen == 5}}
|
||||
<div class="item"><b>An Error occured. Message not sent.</b></div>
|
||||
<div class="item">{{:helper.link('Continue', 'arrowthick-1-e', { 'setScreen' : 0 })}}</div>
|
||||
{{else data.screen == 6}}
|
||||
<div class="statusDisplay" style="overflow: auto;">
|
||||
{{for data.message_log}}
|
||||
<div class="item">{{:value}}</div>
|
||||
{{empty}}
|
||||
<div class="item">No messages have been recieved.</div>
|
||||
{{/for}}
|
||||
</div>
|
||||
<div class="item">{{:helper.link('Back', 'arrowreturnthick-1-w', { 'setScreen' : 0 })}}</div>
|
||||
{{else data.screen == 7}}
|
||||
<div class="item"><h2>Message Authentication</h2></div><br>
|
||||
<div class="statusDisplay" style="overflow: auto;">
|
||||
<div class="item"><b>Message for {{:data.recipient}}:</b> {{:data.message}}</div>
|
||||
<div class="item"><b>Validated by:</b> {{:data.msgVerified}}</div>
|
||||
<div class="item"><b>Stamped by:</b> {{:data.msgStamped}}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
{{:helper.link('Send Message', 'arrowthick-1-e', { 'department' : data.recipient })}}
|
||||
{{:helper.link('Back', 'arrowreturnthick-1-w', { 'setScreen' : 0 })}}
|
||||
</div>
|
||||
{{else data.screen == 8}}
|
||||
<div class="item"><h2>Station wide announcement</h2></div>
|
||||
<div class="item"><b>Message:</b> {{:data.message}} {{:helper.link('Write Message', 'pencil', { 'writeAnnouncement' : 1 })}}</div>
|
||||
<br>
|
||||
{{if data.announceAuth}}
|
||||
<div class="item"><b>ID verified. Authentication accepted.</b></div>
|
||||
{{else}}
|
||||
<div class="item">Swipe your ID card to authenticate yourself.</div>
|
||||
{{/if}}
|
||||
<br>
|
||||
<div class="item">
|
||||
{{:helper.link('Announce', 'signal-diag', { 'sendAnnouncement' : 1 }, (data.announceAuth && data.message) ? null : 'disabled' )}}
|
||||
{{:helper.link('Back', 'arrowreturnthick-1-w', { 'setScreen' : 0 })}}
|
||||
</div>
|
||||
{{else}}
|
||||
{{if data.newmessagepriority == 1}}
|
||||
<div class="item"><font color='red'>There are new messages</font></div>
|
||||
{{else data.newmessagepriority == 2}}
|
||||
<div class="item"><font color='red'><b>NEW PRIORITY MESSAGES</b></font></div>
|
||||
{{/if}}
|
||||
<div class="item">{{:helper.link('View Messages', data.newmessagepriority ? 'mail-closed' : 'mail-open', { 'setScreen' : 6 })}}</div>
|
||||
<br>
|
||||
<div class="item">{{:helper.link('Request Assistance', 'gear', { 'setScreen' : 1 })}}</div>
|
||||
<div class="item">{{:helper.link('Request Supplies', 'gear', { 'setScreen' : 2 })}}</div>
|
||||
<div class="item">{{:helper.link('Relay Anonymous Information', 'gear', { 'setScreen' : 3})}}</div>
|
||||
<br>
|
||||
{{if data.announcementConsole}}
|
||||
<div class="item">{{:helper.link('Send Station-wide Announcement', 'signal-diag', { 'setScreen' : 8})}}</div>
|
||||
<br>
|
||||
{{/if}}
|
||||
<div class="item">{{:helper.link(data.silent ? 'Speaker OFF' : 'Speaker ON', data.silent ? 'volume-off' : 'volume-on', { 'toggleSilent' : 1})}}</div>
|
||||
{{/if}}
|
||||
Reference in New Issue
Block a user