Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create.table = function(tables) {
- rowCount <- c(1:nrow(tables))
- htmlTbl <-
- paste(
- "tags$table(
- tags$tr(
- tags$th('Select'),
- tags$th('Confirm'),
- tags$th('Reason')
- ),"
- )
- for (val in rowCount) {
- htmlTbl <- paste(
- htmlTbl,"tags$tr(
- tags$td(checkboxInput('check",val,"', label=NULL, value=FALSE, width='25px')),
- tags$td(selectInput('conf",val,"',NULL, width='50px',
- choices = list('Approve' = 1, 'Deny' = 2),selected = NULL)),
- tags$td(selectInput('reas",val,"',NULL, width='50px',
- choices = list('Still Used' = 1, 'Not Used' = 2),selected = NULL))
- )"
- )
- if (val != length(rowCount))
- htmlTbl <- paste(htmlTbl,",")
- }
- htmlTbl <- paste(htmlTbl,")")
- htmlTbl <- eval(parse(text=htmlTbl))
- return(htmlTbl)
- }
- table {
- font-family: arial, sans-serif;
- border-collapse: collapse;
- width: 100%;
- }
- td, th {
- border: 1px solid #eeeeee;
- text-align: left;
- padding: 8px;
- white-space: nowrap;
- }
- tr:nth-child(even) {
- background-color: #dddddd;
- }
- input[type='checkbox'] {
- width: 20px;
- height: 20px;
- line-height: 20px;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement