genHrefTable: Generate a table that lists tabs by rows

Description Usage Arguments Details Value Examples

View source: R/spsUIcollections.R

Description

A fast way in SPS to generate a table that lists some SPS tabs

Usage

1
2
3
4
5
6
7
8
genHrefTable(
  rows,
  Id = NULL,
  title = "A Table to list tabs",
  text_color = "#0275d8",
  app_path = NULL,
  ...
)

Arguments

rows

a named list of character vector, the item names in the list will be the row names and each item should be a vector of tab IDs. Or you can use one of 'core', 'wf', 'vs', 'data', 'plot' to specify a tab type, so it will find all tabs matching that type. See tab_info.csv under config directory for type info.

Id

element ID

title

table title

text_color

text color for table

app_path

app path, default is current working directory

...

any additional arguments to the html element, like class, style...

Details

For rows, there are some specially reserved characters for type and sub-types, one of c('core', 'wf', 'vs', 'data', 'plot'). If indicated, it will return a list of tabs matching the indicated tabs instead of searching individual tab names. See examples.

This function requires a SPS project and the config/tabs.csv file. If you want to use hrefTable outside a SPS project, or want to create some links pointing to outside web resources, use spsComps::hrefTable

Value

HTML elements

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
if(interactive()){
    spsInit()
    # will be two rows, one row is searched by tab IDs and the other is
    # searched by type.
    rows <- list(row1 = c("core_canvas", "core_about"),
                 row2 =  "data")
    ui <- fluidPage(
        genHrefTable(rows)
    )
    server <- function(input, output, session) {

    }
    shinyApp(ui, server)
}

systemPipeShiny documentation built on March 16, 2021, 6:01 p.m.