Skip to content

Commit b29ff83

Browse files
committed
Show full URLs in content download
1 parent f1dc3f1 commit b29ff83

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

R/utils.R

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ check_env_vars <- function(required_env_vars) {
88
}
99

1010
# Create a {DT} datatable with common settings
11-
create_dt <- function(dat, type = c("users", "content")) {
11+
create_dt <- function(
12+
dat,
13+
type = c("users", "content"),
14+
... # pass further options
15+
) {
1216
dat |>
1317
DT::datatable(
1418
filter = "top",
@@ -23,7 +27,8 @@ create_dt <- function(dat, type = c("users", "content")) {
2327
extend = "csv",
2428
title = glue::glue("{Sys.Date()}_su-posit-connect_{type}-lookup")
2529
)
26-
)
30+
),
31+
...
2732
)
2833
)
2934
}

index.qmd

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,17 @@ This table shows one row per content item. There are `r n_content` content items
7171
7272
content |>
7373
dplyr::mutate(
74-
content_url = glue::glue("<a href='{content_url}'>Link</a>"),
75-
dashboard_url = glue::glue("<a href='{dashboard_url}'>Link</a>"),
74+
content_link = glue::glue("<a href='{content_url}'>Link</a>"),
75+
dashboard_link = glue::glue("<a href='{dashboard_url}'>Link</a>"),
7676
dplyr::across(dplyr::where(is.character), as.factor)
7777
) |>
78-
create_dt("content")
78+
create_dt(
79+
"content",
80+
columnDefs = list(
81+
list(
82+
visible = FALSE,
83+
targets = c("content_url", "dashboard_url")
84+
)
85+
)
86+
)
7987
```

posit-connect-people.Rproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Version: 1.0
2+
ProjectId: d00e3496-481b-4ff5-a061-0492ffc1ae2d
23

34
RestoreWorkspace: Default
45
SaveWorkspace: Default

0 commit comments

Comments
 (0)