1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
library(shiny)
library(DT)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = "TEST",titleWidth = 500
), # dashboardHeader close
dashboardSidebar(## Sidebar content
sidebarMenu(
menuItem("Level", tabName = "level", icon = icon("arrow-down")),
menuSubItem("Country",icon = icon("globe"), tabName = "country"),
menuSubItem("County",icon = icon("circle-o"), tabName = "county"),
menuSubItem("Town",icon = icon("spinner"), tabName = "town"),
menuItem("datas", tabName = "datas", icon = icon("list-alt")),
menuItem("Maps", tabName = "maps", icon = icon("th"))
) # sidebarMenu close
), # f. de dashboardSidebar
# Body content
dashboardBody(
tabItems(# Country tab content
tabItem(tabName = "country",
fluidRow(
box(title = "Click on datas tab", width = 9,
background = "olive")
) # fluidRow close
), # tabItem close
# County tab content
tabItem(tabName = "county",
fluidRow(
box(title = "Counties", width = 3, solidHeader = TRUE,
status = "primary",
checkboxGroupInput("dynamic_counties", label = "",
choices = list("First county" = "North",
"Second county" = "South",
"Third county" = "East"))
) # box close
) # fluidRow close
), # tabItem close
# Town tab content
tabItem(tabName = "town",
#h4("Check one or more box(es)",
checkboxGroupInput(
"dynamic", label = h4("Check one or more box(es)"),
choices = list("01. Town 1" = "01", "02. Town 2" = "02",
"03. Town 3" = "03", "04. Town 4" = "04",
"05. Town 5" = "05", "06. Town 6" = "06",
"07. Town 7" = "07", "08. Town 8" = "08",
"09. Town 9" = "09", "10. Town 10" = "10",
"11. Town 11" = "11", "12. Town 12" = "12"))
), # tabItem close
tabItem(tabName = "datas",
fluidRow(
box(title = "General datas", solidHeader = TRUE,
status = "primary",
DT::dataTableOutput("df"))
) # fluidRow close
) # tabItem close
) # tabItems close
) # dashboardBody close
) # dashboardPage close |
Partager