Skip to content
Snippets Groups Projects
Commit fbbd8836 authored by Jan Haller's avatar Jan Haller
Browse files

ipa_haller_jan (WIP): Inclusion of form wikiPage, wikiEditor and the report wiki. refs #15634

parent dab2f32c
No related branches found
No related tags found
2 merge requests!691New version v24.3.0,!607ipa_haller_jan: QFQ-Wiki. refs #15634
Pipeline #9599 passed
{
"title": "{{SELECT IF('{{id:R0}}' = 0, \"Edit wiki content\", \"Add wiki content\") }}",
"noteInternal": "",
"tableName": "WikiPage",
"primaryKey": "",
"permitNew": "sip",
"permitEdit": "sip",
"restMethod": "",
"escapeTypeDefault": "c",
"render": "bootstrap",
"requiredParameterNew": "",
"requiredParameterEdit": "",
"dirtyMode": "exclusive",
"showButton": "close,save",
"multiMode": "none",
"multiSql": "",
"multiDetailForm": "",
"multiDetailFormParameter": "",
"forwardMode": "url-sip",
"forwardPage": "url-sip|{{pageSlug:TE}}&wpId={{id:R0}}&action={{action:SE}}&wpIdPrevious={{wpIdPrevious:S0}}&sectionId={{sectionId:S0}}&sectionIdEnd={{sectionIdEnd:S0}}",
"labelAlign": "default",
"bsLabelColumns": "",
"bsInputColumns": "",
"bsNoteColumns": "",
"parameter": "",
"parameterLanguageA": "",
"parameterLanguageB": "",
"parameterLanguageC": "",
"parameterLanguageD": "",
"recordLockTimeoutSeconds": 900,
"deleted": "no",
"modified": "2023-06-05 11:02:01",
"created": "2023-05-10 10:48:25",
"FormElement_ff": [
{
"dynamicUpdate": "no",
"encryption": "no",
"encryptionMethod": "Default",
"enabled": "yes",
"name": "content",
"label": "",
"mode": "show",
"modeSql": "",
"class": "native",
"type": "editor",
"subrecordOption": "",
"encode": "none",
"checkType": "all",
"checkPattern": "",
"onChange": "",
"ord": 10,
"tabindex": 0,
"size": "400,600",
"maxLength": "",
"labelAlign": "default",
"bsLabelColumns": "0",
"bsInputColumns": "12",
"bsNoteColumns": "0",
"rowLabelInputNote": "row,label,\/label,input,\/input,note,\/note,\/row",
"note": "",
"adminNote": "",
"tooltip": "",
"placeholder": "",
"value": "",
"sql1": "",
"parameter": "editor-plugins=code link lists searchreplace table textcolor textpattern visualchars image,paste\r\n\r\neditor-toolbar=code searchreplace undo redo | styleselect link table | bullist numlist outdent indent | forecolor backcolor bold italic | image\r\n\r\neditor-paste_data_images = true\r\n\r\nfileUploadPath = fileadmin\/imageUploadDir\/wiki",
"parameterLanguageA": "",
"parameterLanguageB": "",
"parameterLanguageC": "",
"parameterLanguageD": "",
"clientJs": "",
"feGroup": "",
"deleted": "no",
"modified": "2023-06-01 09:57:33",
"created": "2023-05-10 11:02:27"
},
{
"dynamicUpdate": "no",
"encryption": "no",
"encryptionMethod": "Default",
"enabled": "yes",
"name": "myLoadContent",
"label": "",
"mode": "hidden",
"modeSql": "",
"class": "native",
"type": "note",
"subrecordOption": "",
"encode": "specialchar",
"checkType": "auto",
"checkPattern": "",
"onChange": "",
"ord": 140,
"tabindex": 0,
"size": "",
"maxLength": "",
"labelAlign": "default",
"bsLabelColumns": "",
"bsInputColumns": "",
"bsNoteColumns": "",
"rowLabelInputNote": "row,label,\/label,input,\/input,note,\/note,\/row",
"note": "",
"adminNote": "",
"tooltip": "",
"placeholder": "",
"value": "#!report\r\n#\r\n#\r\n\r\n1 {\r\n sql = SELECT 'F:typo3conf\/ext\/qfq\/wikiScript.php|call:loadWikiContent|arg:sectionId={{sectionId:S0}}&id={{wpIdPrevious:S0}}&action={{action:SE}}' AS _script FROM DUAL WHERE '{{action:SE}}' = 'editSection' OR '{{action:SE}}' = 'editAll' AND '{{submit_reason:CE:alnumx}}' != 'save'\r\n rbeg = <script>window.onload = function() { tinymce.activeEditor.setContent(`\r\n rend = `);};<\/script>\r\n }",
"sql1": "",
"parameter": "",
"parameterLanguageA": "",
"parameterLanguageB": "",
"parameterLanguageC": "",
"parameterLanguageD": "",
"clientJs": "",
"feGroup": "",
"deleted": "no",
"modified": "2023-06-05 21:29:48",
"created": "2023-05-25 12:30:33"
}
]
}
\ No newline at end of file
This diff is collapsed.
#
#
#
form={{form:SE}}
10 {
sql = SELECT '{{action:SE::w}}' AS _action
, '{{wpId:S0}}' AS wpId
, '{{wpIdPrevious:S0}}' AS _wpIdPrevious
, '{{sectionId:S0}}' AS _sectionId
, '{{sectionIdEnd:S0}}' AS _sectionIdEnd
, '{{history:SE}}' AS _history
}
20 {
sql = SELECT 1
FROM DUAL
WHERE FIND_IN_SET('{{action:RE}}', 'new,editAll,editSection')
content = hideLevel
30 {
sql = UPDATE WikiPage AS wp1
JOIN WikiPage AS wp2
ON wp2.id = '{{wpIdPrevious:R0}}'
SET wp1.wpIdParent = wp2.wpIdParent
, wp1.pageSlug = wp2.pageSlug
, wp1.name = wp2.name
, wp1.author = QIFEMPTY('{{feUser:TE}}', 'anonymous')
, wp1.roUser = wp2.roUser
, wp1.roGroup = wp2.roGroup
, wp1.roPublic = wp2.roPublic
, wp1.rwUser = wp2.rwUser
, wp1.rwGroup = wp2.rwGroup
, wp1.rwPublic = wp2.rwPublic
, wp1.pageLock = wp2.pageLock
, wp1.imageBorder = wp2.imageBorder
WHERE wp1.id = '{{wpId:R0}}'
}
40 {
sql = UPDATE WikiPage SET wpIdCurrent = '{{wpId:R0}}'
WHERE IFNULL(wpIdCurrent, id) = '{{wpIdPrevious:R0}}'
}
50 {
sql = UPDATE WikiPage SET wpIdParent = '{{wpId:R0}}'
WHERE wpIdParent = '{{wpIdPrevious:R0}}'
}
60 {
sql = SELECT 1
FROM DUAL
WHERE '{{action:RE}}' = 'editSection'
content = hideLevel
70 {
sql = SELECT 'F:typo3conf/ext/qfq/wikiScript.php|call:getWikiContentSection|arg:sectionIdStart=1&sectionIdEnd={{sectionId:R0}}&id={{wpIdPrevious:R0}}&printBeginning=true' AS _script
}
80 {
sql = SELECT '{{output:VE:all}}' AS _contentBefore
}
90 {
sql = SELECT 'F:typo3conf/ext/qfq/wikiScript.php|call:getWikiContentSection|arg:sectionIdStart={{sectionIdEnd:R0}}&id={{wpIdPrevious:R0}}&printBeginning=false' AS _script
}
100 {
sql = SELECT '{{output:VE:all}}' AS _contentAfter
}
110 {
sql = UPDATE WikiPage SET content = CONCAT('{{contentBefore:RE:all}}', content, '{{contentAfter:RE:all}}')
WHERE id = '{{wpId:R0}}'
}
}
}
120 {
sql = SELECT id AS _wpId
FROM WikiPage
WHERE id = '{{wpId:R0}}'
altsql = SELECT id AS _wpId
FROM WikiPage
WHERE pageSlug = '{{pageSlug:TE}}'
AND ISNULL(wpIdCurrent)
AND ISNULL(wpIdParent)
}
130 {
sql = SELECT 'F:typo3conf/ext/qfq/wikiScript.php|call:checkWikiAccess|arg:id={{wpId:R0}}' AS _script
}
140 {
sql = SELECT CASE
WHEN '{{wikiAccess:VE}}' = 'ro' THEN '5'
WHEN '{{wikiAccess:VE}}' = 'rw' THEN '0'
WHEN '{{wikiAccess:VE}}' = 'off' THEN '5'
END AS _renderMode
}
150 {
sql = SELECT CONCAT('U:id={{pageSlug:TE}}&wpId={{wpId:R0}}&print=true'
, '&--disable-external-links'
, '&--margin-top=20'
, '&--margin-bottom=20'
, '&--margin-left=20'
, '&--margin-right=20'
, '&--header-left={{pageTitle:TE}}'
, '&--header-font-name=Open Sans'
, '&--header-spacing=5'
, '&--footer-left=[date]'
, '&--footer-right=[page]/[topage] '
, '&--footer-font-name=Open Sans'
, '&--footer-spacing=5'
, '&--footer-font-size=10'
, '&type=2'
, '&_sip=1'
, '|g:_blank|b:0|t:<span class="glyphicon glyphicon-print"></span> Print|d:Print wiki') AS '_pdf|pdfDownload|_hide'
}
160 {
sql = SELECT CONCAT('z'
, '||p:{{pageSlug:TE}}&form=wikiPage&r=', wp.id, '|s|b:0|G:glyphicon glyphicon-cog|t:Properties|r:{{renderMode:RE}}'
, '||p:{{pageSlug:TE}}&wpId={{wpId:R0}}&history=true|s|b:0|G:glyphicon glyphicon-backward|t:History'
, '||{{pdfDownload:RE}}'
, '||p:{{pageSlug:TE}}&form=wikiPage&r=0'
,'&wpIdParent=', wp.id
, '&roUser=', wp.roUser
, '&roGroup=', wp.roGroup
, '&roPublic=', wp.roPublic
, '&rwUser=', wp.rwUser
, '&rwGroup=', wp.rwGroup
, '&rwPublic=', wp.rwPublic
, '&pageLock=', wp.pageLock
, '|s|b:0|G:glyphicon glyphicon-plus|t:Add new page|r:{{renderMode:RE}}'
) AS _link
FROM WikiPage AS wp
WHERE wp.id = '{{wpId:R0}}'
AND '{{wikiAccess:VE}}' != 'off'
AND '{{history:SE}}' != 'true'
AND '{{print:SE}}' != 'true'
altsql = SELECT '<div style="float: right;">', 'p:{{pageSlug:TE}}&form=wikiPage&r=0|s|b|N|r:{{renderMode:RE}}' AS _link, '</div>'
FROM DUAL
WHERE '{{wikiAccess:VE}}' != 'off'
rbeg = <div style="float: right;">
rend = </div>
}
170 {
sql = SELECT 'F:typo3conf/ext/qfq/wikiScript.php|call:renderWiki|arg:id={{wpId:R0}}&renderMode={{renderMode:RE}}' AS _script
FROM DUAL
WHERE '{{history:RE}}' = ''
AND '{{wikiAccess:VE}}' != 'off'
altsql = SELECT '<p>Access denied. You don\'t have permissions to access "{{baseUrl:Y}}{{pageSlug:TE}}".</p>'
}
180 {
sql = SELECT wp.created, wp.author
FROM WikiPage AS wp
WHERE IFNULL(wp.wpIdCurrent, wp.id) = '{{wpId:R0}}'
AND wp.pageSlug = '{{pageSlug:TE}}'
AND '{{history:RE}}' = 'true'
ORDER BY wp.created DESC
head = <table class="table qfq-table-50"><thead><tr><th>Updated</th><th>Author</th></thead><tbody>
tail = </tbody></table>
fbeg = <td>
fend = </td>
rbeg = <tr>
rend = </tr>
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment