d718c5a372
CI / compile_and_lint (push) Failing after 0s
CI / docker_build (linux/amd64, -linux-amd64-duckdb, duckdb) (push) Failing after 0s
CI / docker_build (linux/arm64, -linux-arm64, minimal) (push) Failing after 2s
CI / docker_build (linux/arm64, -linux-arm64-duckdb, duckdb) (push) Failing after 1s
CI / docker_build (linux/amd64, minimal) (push) Failing after 1s
CI / test (, sqlite, sqlite::memory:) (push) Has been skipped
CI / test (mssql, mssql, mssql://root:Password123!@127.0.0.1/sqlpage) (push) Has been skipped
CI / test (mysql, mysql, mysql://root:Password123!@127.0.0.1/sqlpage) (push) Has been skipped
CI / test (oracle, oracle, Driver=Oracle 21 ODBC driver;Dbq=//127.0.0.1:1521/FREEPDB1;Uid=root;Pwd=Password123!) (push) Has been skipped
CI / test (postgres, odbc, Driver=PostgreSQL Unicode;Server=127.0.0.1;Port=5432;Database=sqlpage;UID=root;PWD=Password123!, true) (push) Has been skipped
CI / test (postgres, postgres, postgres://root:Password123!@127.0.0.1/sqlpage) (push) Has been skipped
CI / playwright (push) Has been skipped
CI / docker_build (linux/arm/v7, -linux-arm-v7, minimal) (push) Failing after 0s
CI / hurl_examples (push) Failing after 8s
deploy website / deploy_official_site (push) Failing after 1s
CI / hurl (${{ matrix.example }}) (push) Has been skipped
CI / docker_push (duckdb) (push) Has been cancelled
CI / docker_push (minimal) (push) Has been cancelled
CI / windows_test (push) Has been cancelled
115 lines
3.9 KiB
SQL
115 lines
3.9 KiB
SQL
-- =============================================================================
|
|
-- =========================== Module Setting ==================================
|
|
-- =========================== Login / Logout ==================================
|
|
-- =============================================================================
|
|
|
|
-- $_curpath and $_session_required are required for header_shell_session.sql.
|
|
|
|
set _curpath = sqlpage.path();
|
|
set _session_required = 1;
|
|
|
|
SELECT
|
|
'dynamic' AS component,
|
|
sqlpage.run_sql('header_shell_session.sql') AS properties;
|
|
|
|
-- =============================================================================
|
|
-- =============================== Module vars =================================
|
|
-- =============================================================================
|
|
|
|
set _getpath = '&path=' || $_curpath;
|
|
set _item_form = 'currencies_item_form.sql';
|
|
|
|
-- =============================================================================
|
|
-- ======================== Display confirmation ===============================
|
|
-- =============================================================================
|
|
|
|
SELECT
|
|
'alert' AS component,
|
|
'green' AS color,
|
|
'check' AS icon,
|
|
'Success' AS title,
|
|
$info AS description,
|
|
TRUE AS dismissible
|
|
WHERE $info IS NOT NULL;
|
|
|
|
-- =============================================================================
|
|
-- ======================== Display error message ==============================
|
|
-- =============================================================================
|
|
|
|
SELECT
|
|
'alert' AS component,
|
|
'red' AS color,
|
|
'thumb-down' AS icon,
|
|
$op || ' error' AS title,
|
|
$error AS description,
|
|
TRUE AS dismissible
|
|
WHERE $error IS NOT NULL;
|
|
|
|
-- =============================================================================
|
|
-- ========================== New record button ================================
|
|
-- =============================================================================
|
|
|
|
SELECT
|
|
'button' AS component,
|
|
'pill' AS shape,
|
|
'lg' AS size,
|
|
'end' AS justify;
|
|
SELECT
|
|
'New Record' AS title,
|
|
'insert_rec' AS id,
|
|
'circle-plus' AS icon,
|
|
'circle-plus' AS icon_after,
|
|
'green' AS outline,
|
|
$_item_form || '?' || $_getpath || '&action=INSERT' AS link
|
|
;
|
|
|
|
-- =============================================================================
|
|
-- ============================= Show the table ================================
|
|
-- =============================================================================
|
|
|
|
SELECT
|
|
'divider' AS component,
|
|
'currencies' AS contents;
|
|
|
|
-- =============================================================================
|
|
|
|
SELECT
|
|
'title' AS component,
|
|
'Currencies' AS contents,
|
|
4 AS level,
|
|
TRUE AS center,
|
|
'title_class' AS class,
|
|
'title_id' AS id;
|
|
|
|
-- =============================================================================
|
|
-- TABLE
|
|
|
|
SELECT
|
|
'table' AS component,
|
|
TRUE AS sort,
|
|
TRUE AS search,
|
|
TRUE AS border,
|
|
TRUE AS hover,
|
|
TRUE AS striped_columns,
|
|
TRUE AS striped_rows,
|
|
'table_class' AS class,
|
|
'table_id' AS id,
|
|
'actions' AS markdown;
|
|
|
|
SELECT
|
|
id,
|
|
name,
|
|
to_rub,
|
|
'[](' || $_item_form || '?' || $_getpath || '&id=' || id || ') ' ||
|
|
'[](' || $_item_form || '?' || $_getpath || '&id=' || id || '&action=DELETE)' AS actions
|
|
FROM currencies
|
|
ORDER BY id;
|
|
|
|
-- =============================================================================
|
|
-- DEBUG
|
|
-- =============================================================================
|
|
|
|
SELECT
|
|
'dynamic' AS component,
|
|
sqlpage.run_sql('footer_debug_post-get-set.sql') AS properties;
|