Compare commits

...

5 Commits

9 changed files with 29 additions and 24 deletions

View File

@@ -168,16 +168,3 @@ scheme_R6 <- R6::R6Class(
}
)
)
# object.size(schm)
# schm$get_key_id("main")
# schm$get_forms_ids("main")
# schm$get_all_ids("main")
# schm$get_scheme("main")
# schm$get_id_type_list("allergo_anamnesis")
# # active
# schm$get_main_key_id
# schm$all_tables_names

View File

@@ -108,7 +108,11 @@ render_forms = function(
} else {
shiny::tagList(
if (!is.na(form_label)) {
shiny::span(form_label, style = "color: #444444; font-weight: 550; line-height: 1.4;")
if (form_type == "description_header") {
shiny::span(form_label, class = "description-header", style = "color: #444444; font-weight: 550; line-height: 1.4;")
} else {
shiny::span(form_label, style = "color: #444444; font-weight: 550; line-height: 1.4;")
}
# если в схеме есть поле с описанием - добавляем его следующей строчкой
},
if (!is.na(description) && !is.na(form_label)) shiny::br(),

7
app.R
View File

@@ -42,15 +42,18 @@ if (!rmarkdown::pandoc_available()) warning("Can't find pandoc!")
# web resources ------
shiny::addResourcePath("www", "www")
shiny::resourcePaths()
# UI =======================
ui <- page_sidebar(
title = config::get("form_name"),
theme = bs_theme(version = 5, preset = "bootstrap"),
header = tags$head(
tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "www/styles.css"),
tags$link(rel = "icon", href = "www/favicon.ico")
),
sidebar = sidebar(
actionButton("add_new_main_key_button", "Добавить новую запись", icon("plus", lib = "font-awesome")),
actionButton("save_data_button", "Сохранить данные", icon("floppy-disk", lib = "font-awesome")),

5
appinfo.json Normal file
View File

@@ -0,0 +1,5 @@
{
"app_id": "formy",
"app_title": "FORMY",
"formy_version": "0.18.4"
}

View File

@@ -1,7 +1,7 @@
default:
form_app_version: !expr config::get("form_app_version", file = "config/descr.yml")
form_id: !expr config::get("form_id", file = "config/descr.yml")
form_name: !expr config::get("form_name", file = "config/descr.yml")
form_app_version: !expr jsonlite::read_json("appinfo.json")$formy_version
form_id: !expr jsonlite::read_json("appinfo.json")$app_id
form_name: !expr jsonlite::read_json("appinfo.json")$app_title
prod:
form_app_configure_path: "example_scheme"

View File

@@ -1,4 +0,0 @@
default:
form_app_version: 0.18.3
form_id: formy
form_name: FORMY

View File

@@ -1,6 +1,6 @@
{
"R": {
"Version": "4.3.2",
"Version": "4.3.3",
"Repositories": [
{
"Name": "CRAN",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

10
www/styles.css Normal file
View File

@@ -0,0 +1,10 @@
.description-header {
/* 1. Add the border around the whole box */
border-bottom: 2px solid #777777;
/* 2. Forces border inside the total width/height (prevents breaking layouts) */
box-sizing: border-box;
/* 3. Ensures the div encloses any internal floated elements */
overflow: auto;
}