From 1c8c7c349e057403f5a28da8bde3937732332136 Mon Sep 17 00:00:00 2001 From: Carsten Rose <carsten.rose@math.uzh.ch> Date: Wed, 11 May 2016 09:46:43 +0200 Subject: [PATCH] UsersManual/index.rst: adjusted recordId, recordid & fe_user testtables.sql: added 'picture', 'modified' and 'created' --- extension/Documentation/UsersManual/Index.rst | 12 +++---- extension/qfq/sql/testtables.sql | 34 ++++++++++++------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/extension/Documentation/UsersManual/Index.rst b/extension/Documentation/UsersManual/Index.rst index f56153961..9decea54f 100644 --- a/extension/Documentation/UsersManual/Index.rst +++ b/extension/Documentation/UsersManual/Index.rst @@ -140,11 +140,11 @@ Most fields of a form specification might contain: * Example: - *{{recordid}}* + *{{r}}* *{{SELECT name FROM person WHERE id=1234}}* - *{{SELECT name FROM person WHERE id={{recordid}} }}* + *{{SELECT name FROM person WHERE id={{r}} }}* *{{SELECT name FROM person WHERE id={{key1:C:alnumx}} }}* @@ -208,7 +208,7 @@ Only variables that are known in a specified store can be substituted. +-----+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------+ | C | Client: POST variable, if not found: GET variable | Parameter sent from the Client (=Browser). | +-----+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------+ - | T | Typo3: a) Bodytext (ttcontent record), b) Typo3 internal varibles like fe_user_uid, ...| See Typo3 tt_content record configuration | + | T | Typo3: a) Bodytext (ttcontent record), b) Typo3 internal varibles like feUser, ... | See Typo3 tt_content record configuration | +-----+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------+ | V | Vars - Generic variables | | +-----+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------+ @@ -342,8 +342,8 @@ SQL * Example:: {{SELECT id, name FROM Person}} - {{SELECT id, name, IF({{fe_user}}=0,'Yes','No') FROM Vorlesung WHERE sem_id={{keySemId:Y}} }} - {{SELECT id, city FROM Address AS adr WHERE adr.p_id={{SELECT id FROM Account AS acc WHERE acc.name={{fe_user}} }} }} + {{SELECT id, name, IF({{feUser}}=0,'Yes','No') FROM Vorlesung WHERE sem_id={{keySemId:Y}} }} + {{SELECT id, city FROM Address AS adr WHERE adr.p_id={{SELECT id FROM Account AS acc WHERE acc.name={{feUser}} }} }} * Special case for SELECT input fields. To deliver a result array specify an '!' before the SELECT: @@ -1453,7 +1453,7 @@ below. +-------------+-------------------------------------------------------------------------------------------------+----------------------------------------------------------+---------------------------------------------------------------+ |<page> |TYPO3 page id or page alias. |The current page: *{{pageId}}* |45 application application&N_param1=1045 | +-------------+-------------------------------------------------------------------------------------------------+----------------------------------------------------------+---------------------------------------------------------------+ -|<recordid> |Effective Record ID stored in hash array. |<empty> |7011 | +|<r> |Effective Record ID stored in hash array. |<empty> |7011 | +-------------+-------------------------------------------------------------------------------------------------+----------------------------------------------------------+---------------------------------------------------------------+ |<text> |Text, wrapped by the link. If there is an icon, text will be displayed to the right of it. |empty string | | +-------------+-------------------------------------------------------------------------------------------------+----------------------------------------------------------+---------------------------------------------------------------+ diff --git a/extension/qfq/sql/testtables.sql b/extension/qfq/sql/testtables.sql index 82dfeb87f..0e699149f 100644 --- a/extension/qfq/sql/testtables.sql +++ b/extension/qfq/sql/testtables.sql @@ -1,11 +1,14 @@ DROP TABLE IF EXISTS Person; CREATE TABLE Person ( - id BIGINT AUTO_INCREMENT PRIMARY KEY, - name VARCHAR(128), - firstname VARCHAR(128), - gender ENUM('', 'male', 'female') NOT NULL DEFAULT 'male', - groups SET('', 'a', 'b', 'c') NOT NULL DEFAULT '', - birthday DATE NOT NULL DEFAULT '0000-00-00' + id BIGINT AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(128) NOT NULL DEFAULT '', + firstname VARCHAR(128) NOT NULL DEFAULT '', + picture VARCHAR(255) NOT NULL DEFAULT '', + gender ENUM('', 'male', 'female') NOT NULL DEFAULT 'male', + groups SET('', 'a', 'b', 'c') NOT NULL DEFAULT '', + birthday DATE NOT NULL DEFAULT '0000-00-00', + modified TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' ); # @@ -17,12 +20,14 @@ INSERT INTO Person (id, name, firstname, gender, groups) VALUES DROP TABLE IF EXISTS PersFunction; CREATE TABLE PersFunction ( - id BIGINT AUTO_INCREMENT PRIMARY KEY, + id BIGINT AUTO_INCREMENT PRIMARY KEY, personId BIGINT, type ENUM('Student', 'Assistant', 'Professor', 'Administration'), - start DATE NOT NULL DEFAULT '0000-00-00', - end DATE NOT NULL DEFAULT '0000-00-00', - note VARCHAR(255) + start DATE NOT NULL DEFAULT '0000-00-00', + end DATE NOT NULL DEFAULT '0000-00-00', + note VARCHAR(255), + modified TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' ); # --------------------------- @@ -73,12 +78,15 @@ VALUES # DROP TABLE IF EXISTS Address; CREATE TABLE Address ( - id BIGINT AUTO_INCREMENT PRIMARY KEY, - personId BIGINT, + id BIGINT AUTO_INCREMENT PRIMARY KEY, + personId BIGINT, street VARCHAR(128), city VARCHAR(128), country ENUM('Switzerland', 'Austria', 'France', 'Germany'), - gr_id_typ BIGINT + gr_id_typ BIGINT, + modified TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' + ); INSERT INTO Address (personId, street, city) VALUES -- GitLab