radar2/ui.R

164 lines
4.6 KiB
R
Raw Permalink Normal View History

2021-11-01 14:38:23 +01:00
2023-02-07 16:49:16 +01:00
jsc <- '
$(document).ready(function () {
$("#allInput").parent().parent().parent().parent().css({ "width": "600px" });
$("#specialtyInput").css({ "width": "590px" });
$("#materialInput").parent().parent().css({ "width": "200px" });
$("#materialInput").css({ "width": "190px" });
});
'
2021-11-01 14:38:23 +01:00
2021-11-16 12:21:55 +01:00
ui <- dashboardPage(
title = "RadaR2",
2023-02-07 16:49:16 +01:00
skin = "black",
2021-11-01 14:38:23 +01:00
# HEADER ------------------------------------------------------------------
2023-02-07 16:49:16 +01:00
2021-11-01 14:38:23 +01:00
dashboardHeader(
2021-11-16 12:21:55 +01:00
title = span(img(src = "radar.png", height = 30), strong("RadaR2")),
2023-02-07 16:49:16 +01:00
titleWidth = 358,
2021-11-01 14:38:23 +01:00
tags$li(
a(
2021-11-16 12:21:55 +01:00
strong(trnslt("About RadaR2")),
2021-11-01 14:38:23 +01:00
height = 40,
href = "https://www.jmir.org/2019/6/e12843/",
title = "",
target = "_blank"
),
class = "dropdown",
)
),
2023-02-07 16:49:16 +01:00
2021-11-01 14:38:23 +01:00
# SIDEBAR -----------------------------------------------------------------
2023-02-07 16:49:16 +01:00
dashboardSidebar(
disable = TRUE,
width = 400,
sidebarMenu(
id = "sidebar_id",
menuItem(
icon = icon("user-nurse"),
div(
materialSwitch(
inputId = "allInput",
label = trnslt("All specialties selected"),
value = TRUE,
status = "danger"
),
checkboxGroupInput(
# tags$head(tags$style("width: 400px; max-width: 400px;")),
inputId = "specialtyInput",
label = trnslt("Select specialties"),
choices = sort(unique(radar_data$specialty_shiny)),
)
)
),
menuItem(
icon = icon("hospital"),
div(
materialSwitch(
inputId = "allDepartments",
label = trnslt("All deparmtents selected"),
value = TRUE,
status = "danger"
),
checkboxGroupInput(
inputId = "departmentInput",
label = trnslt("Select departments"),
choices = sort(unique(radar_data$department))
)
)
),
menuItem(
icon = icon("flask"),
div(
checkboxGroupInput(
inputId = "materialInput",
label = trnslt("Select material"),
choices = sort(unique(radar_data$Materiaal))
)
)
)
)
),
2021-11-01 14:38:23 +01:00
# BODY --------------------------------------------------------------------
dashboardBody(
2023-02-07 16:49:16 +01:00
tags$head(tags$script(jsc)),
2021-11-01 14:38:23 +01:00
# fluidRow(
# column = 12,
# infoBoxOutput(outputId = "no_tests", width = 4),
# infoBoxOutput(outputId = "no_pos", width = 4),
# infoBoxOutput(outputId = "top_mo", width = 4)
# ),
# br(),
fluidRow(
tags$style(
".nav-tabs {background-color: white;}
.nav-tabs-custom .nav-tabs li.active:hover a, .nav-tabs-custom .nav-tabs li.active a {background-color: transparent; border-color: transparent;}
.nav-tabs-custom .nav-tabs li.active {border-top-color: black;}"),
2023-02-07 16:49:16 +01:00
tabBox(
id = 'RadaRtabs',
width = '100%',
# column(width = 6, 'Instructie'),
# column(width = 6, 'Disclaimer, blabla blab la bla lbal bla lbal blablal', style="height: 300px;")
tabPanel(
'Start',
div(
h3('Disclaimer'),
paste('blabla bla bla, legal legal legal.',
'Ok, someone needs to write some wise stuff here.',
"Like only use for surveillance, not intended for ",
"individual patients' clinical support, etc. etc. ",
"Yadda yadda yadda"),
hr()
),
fluidRow(
column(2, checkboxInput('cbDisclaimerRead', "I understand"),
style = 'margin-left: 10px;'),
column(2, actionButton('btnDisclaimerUnderstood',
label = 'confirm',
icon = icon("legal", class = "opt")))
),
fluidRow(
hr()
),
div(
h3('Instruction'),
tags$ul(tags$li('do this'),
tags$li('do that'),
tags$li('do such'),
tags$li('do so'))
),
2021-11-01 14:38:23 +01:00
),
2023-02-07 16:49:16 +01:00
tabPanel(
'Data',
style = "width: 100%;",
div(
id = "resistance",
column(
width = 6,
uiOutput("box2")
),
column(
width = 6,
uiOutput("box1")
),
column(
width = 6,
uiOutput("box3")
),
column(
width = 6,
uiOutput("box4")
)
)
2021-11-01 14:38:23 +01:00
)
)
)
)
)