Commit ec361b5a authored by Carsten  Rose's avatar Carsten Rose
Browse files

UsersManual/index.rst: _paged, _Paged, _link: delete documented

parent 2eb0d601
...@@ -60,19 +60,31 @@ DELETE ...@@ -60,19 +60,31 @@ DELETE
* class=record-delete * class=record-delete
* Button: data-sip={{SIP}} * Button: data-sip={{SIP}}
* SIP values:
* SIP_RECORD_ID: Mandatory.
* SIP_TABLE: Either SIP_TABLE or SIP_FORM has to be given.
* SIP_FORM: Either SIP_TABLE or SIP_FORM has to be given. Not implemented now.
* SIP_TARGET_URL: Only with SIP_MODE_ANSWER=MODE_HTML - Url to redirect browser to.
* SIP_MODE_ANSWER: MODE_JSON / MODE_HTML. If not given, this means MODE_JSON.
* Three possible variants with delete links: * Three possible variants with delete links:
* Form: main record * (1) Form: main record
* HTML Code: * HTML Code:
<button id="delete-button" type="button" class="btn btn-default navbar-btn" ><span class="glyphicon glyphicon-trash"></span></button> <button id="delete-button" type="button" class="btn btn-default navbar-btn" ><span class="glyphicon glyphicon-trash"></span></button>
* Form: subrecord, one delete button per record * (2) Form: subrecord, one delete button per record
* Report: typially inside a table, but maybe different.
* HTML Code: * HTML Code:
<button type="button" class="record-delete" data-sip={{SIP}} ><span class="glyphicon glyphicon-trash"></span></button> <button type="button" class="record-delete" data-sip={{SIP}} ><span class="glyphicon glyphicon-trash"></span></button>
* (3) Report: typially inside a table, but maybe different.
<button type="button" class="record-delete" data-sip={{SIP}} ><span class="glyphicon glyphicon-trash"></span></button>
Upload Upload
----------------- -----------------
......
...@@ -1293,8 +1293,8 @@ Special column names ...@@ -1293,8 +1293,8 @@ Special column names
.. _column-link: .. _column-link:
Column: link Column: _link
^^^^^^^^^^^^ ^^^^^^^^^^^^^
{{url | display | **i (internal)**, e(external) | **- (same)**,n (new), p (parent), t(top) | **-**, (e(edit), c(copy), n(new), d(delete), i(insert) , f(file)) }} {{url | display | **i (internal)**, e(external) | **- (same)**,n (new), p (parent), t(top) | **-**, (e(edit), c(copy), n(new), d(delete), i(insert) , f(file)) }}
...@@ -1461,6 +1461,25 @@ Examples: ...@@ -1461,6 +1461,25 @@ Examples:
| SELECT "p:form_person|q:Edit Person:::10:0" AS _link | The Alert will be shown 10 seconds and is not modal. | | SELECT "p:form_person|q:Edit Person:::10:0" AS _link | The Alert will be shown 10 seconds and is not modal. |
+------------------------------------------------------------+---------------------------------------------------------------------------+ +------------------------------------------------------------+---------------------------------------------------------------------------+
Delete
^^^^^^
Records will be deleted via `typo3conf/ext/qfq/qfq/api/delete.php` and needs the parameter:
* _targetUrl=<url> , typically, this is the $_SERVER['REQUEST_URI'] available via {{REQUEST_URI:Y}}.
* _answerMode=html
Example:
::
SELECT 'u:typo3conf/ext/qfq/qfq/api/delete.php|U:table=Person&r=123&_targetUrl={{REQUEST_URI:Y}}&_answerMode=html|q:Do you want delete John Doe?|s|c:n' AS _link
It's easier to use the shortcut via special columnname `_paged`.
If the record to delete contains column(s), whose columnname match on `%pathFileName%` and such a column points to a real existing file,
such a file will be deleted too. If the table contains records where the specific file is multiple times referenced, than the file
is not deleted (it would break the still existing references). Multiple references are not found, if they use different colummnnames or tablenames.
Columns: _page[X] Columns: _page[X]
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
...@@ -1527,6 +1546,22 @@ The colum name is composed of the string *page* and a trailing character to spec ...@@ -1527,6 +1546,22 @@ The colum name is composed of the string *page* and a trailing character to spec
|<create sip> |s | |'s': create a SIP | |<create sip> |s | |'s': create a SIP |
+-------------+-------------------------------------------------------------------------------------------------+----------------------------------------------------------+---------------------------------------------------------------+ +-------------+-------------------------------------------------------------------------------------------------+----------------------------------------------------------+---------------------------------------------------------------+
Column: _paged
^^^^^^^^^^^^^^
Necessary parameter:
* table
* r
**Syntax**
::
SELECT "p:delete?table=<tablename>&r=<recordId|q:<question>|..." AS _paged
..
Columns: _Page[X] Columns: _Page[X]
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment