-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathf_UI_builder.R
49 lines (48 loc) · 1.84 KB
/
f_UI_builder.R
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
f_fund_quicklinks_box <- function(filter_cond, in_not_in, df){
switch (in_not_in,
"in" = fluidRow(
column(width = 12,
box(width = NULL,
solidHeader = T,
tags$table(
tags$col(width="75"),
tags$tr(
tags$td(tags$small("Quick Links")),
tags$td(
HTML(
paste(
lapply((filter(df, fund_category %in% filter_cond) %>% arrange(desc(nav_recent)))$fund_id, function(i_fundid) {
sprintf("<a href=\"#fund_card_%i\">%s</a>",i_fundid,df[df$fund_id==i_fundid,"short_name"])
}),
collapse = " | ")
)
)
)
)
)
)
),
"not in" = fluidRow(
column(width = 12,
box(width = NULL,
solidHeader = T,
tags$table(
tags$col(width="75"),
tags$tr(
tags$td(tags$small("Quick Links")),
tags$td(
HTML(
paste(
lapply((filter(df, !fund_category %in% filter_cond) %>% arrange(desc(nav_recent)))$fund_id, function(i_fundid) {
sprintf("<a href=\"#fund_card_%i\">%s</a>",i_fundid,df[df$fund_id==i_fundid,"short_name"])
}),
collapse = " | ")
)
)
)
)
)
)
)
)
}