Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
e825ae0b
Commit
e825ae0b
authored
Sep 18, 2019
by
Carsten Rose
Browse files
Add `form-editor-usage` best practice report
parent
496b29b3
Pipeline
#2377
passed with stages
in 2 minutes and 40 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Documentation/Manual.rst
View file @
e825ae0b
...
...
@@ -290,6 +290,10 @@ Setup a *report* to manage all *forms*:
}
}
If the QFQ installation becomes bigger and bigger, it me useful to know which form has been used how often, on which
page and when. Find these information included in the `form-editor-usage`_ report.
.. _install-checklist:
Installation: Check List
...
...
@@ -8240,6 +8244,119 @@ If authorization is denied, the request will be answered with a delay of 3 secon
System
======
.. _form-editor-usage:
FormEditor with usage
---------------------
With a large number of forms, it'
s
important
to
know
how
often
a
form
has
been
used
,
on
which
pages
it
's used and when
has the form be used. The following report includes the regular `form-editor`_ as well::
#
# Form
#
# a) List of forms: {{form:S}}='', {{formIdHistory:S}}='', {{formAllUsage:S}}=''
# b) Edit Form: {{form:S}} - Open form {{form:S}} with record {{r:S}} - typically the FormEditor
# c) Usage of all forms: {{formAllUsage:S0}}=1 - first and last use (=save), total count, pages where the form has been used.
# d) Details usage of a given form: {{formIdHistory:S}}
#
# {{form:S}}
# {{formIdHistory:S0}} - usage history of form '
{
{
formIdHistory
:
S
}
}
'
# {{formAllUsage:S0}}=1
form={{form:SE}}
10.sql = SELECT '
<
p
>
'
, '
{
{
pageAlias
:
T0
}
}
&
form
=
copyFormFromExt
|
Copy
Form
from
ExtForm
|||
btn
btn-default
' AS _Page
, '
</
p
>
'
FROM (SELECT '') AS fake
WHERE '
{
{
form
:
SE
}
}
'=''
AND {{formIdHistory:S0}}=0
AND {{formAllUsage:S0}}=0
20 {
# List of Forms: Do not show this list of forms if there is a form given by SIP.
# Table header.
sql = SELECT '
<
th
data-sorter
=
"false"
class
=
"filter-false"
width
=
"90px"
><
div
class
=
"btn-group"
role
=
"group"
>
'
, CONCAT('
p
:
{
{
pageAlias
:
T
}
}
&
form
=
Form
&
') as _pagen
, CONCAT('
p
:
{
{
pageAlias
:
T
}
}
&
formAllUsage
=
1
|
s
|
G
:glyphicon-info-sign
|
o
:Usage
of
all
forms
') as _link
, '
</
div
></
th
><
th
>
#
'
, '
</
th
><
th
>
Name
'
, '
</
th
><
th
>
Title
'
, '
</
th
><
th
>
Table
'
, '
</
th
><
th
class
=
"filter-false sorter-false"
>
'
, '
</
th
><
th
class
=
"filter-false sorter-false"
>
History
</
th
>
'
FROM (SELECT '') AS fake
WHERE '
{
{
form
:
SE
}
}
'='
'
AND
{
{
formIdHistory
:
S0
}
}
=
0
AND
{
{
formAllUsage
:
S0
}
}
=
0
head
=
<
table
class
=
"table table-hover qfq-table-50 tablesorter tablesorter-filter"
id
=
"{{pageAlias:T}}-form"
>
rbeg
=
<
thead
><
tr
>
rend
=
</
tr
></
thead
>
tail
=
</
table
>
30
{
#
All
forms
sql
=
SELECT
CONCAT('
p
:
{{
pageAlias
:
T
}
}
&
form
=
Form
&
r
=
', f.id) as _pagee
, f.id
, f.name
, QMORE(f.title,50)
, f.tableName, CONCAT('
form
=
Form
&
r
=
', f.id) as _Paged
, CONCAT('
p
:
{
{
pageAlias
:
T
}
}
&
formIdHistory
=
', f.id, '
|
s
|
G
:glyphicon-signal
'
)
as
_link
FROM
Form
AS
f
WHERE
{
{
formIdHistory
:
S0
}
}
=
0
AND
{
{
formAllUsage
:
S0
}
}
=
0
ORDER
BY
f
.name
rbeg
=
<
tr
>
rend
=
</
tr
>
fbeg
=
<
td
>
fend
=
</
td
>
}
}
40
{
#
History
of
Form
{{
formIdHistory
:
S0
}
}
sql
=
SELECT
f
.name
,
fsl
.feUser
,
fsl
.recordId
,
fsl
.pageId
,
fsl
.created
FROM
FormSubmitLog
AS
fsl
,
Form
AS
f
WHERE
fsl
.formId
=
{
{
formIdHistory
:
S0
}
}
AND
fsl
.formId
=
f
.id
ORDER
BY
fsl
.created
DESC
head
=
<
table
class
=
"table table-hover qfq-table-50 tablesorter tablesorter-filter"
id
=
"{{pageAlias:T}}-formHistory"
>
<
thead
><
tr
><
th
>
Form
</
th
><
th
>
feUser
</
th
><
th
>
recordId
</
th
><
th
>
pageId
</
th
><
th
>
created
</
th
></
tr
></
thead
>
tail
=
</
table
>
rbeg
=
<
tr
>
rend
=
</
tr
>
fbeg
=
<
td
>
fend
=
</
td
>
}
50
{
#
Usage
of
Form
{{
formAllUsage
:
S0
}
}
sql
=
SELECT
f
.name
,
COUNT
(
fsl
.id
)
,
MIN
(
fsl
.created
)
,
MAX
(
fsl
.created
)
,
GROUP_CONCAT
(
DISTINCT
fsl
.pageId
ORDER
BY
fsl
.pageId
)
FROM
Form
AS
f
LEFT
JOIN
FormSubmitLog
AS
fsl
ON
fsl
.formId
=
f
.id
WHERE
{
{
formAllUsage
:
S0
}
}
=
1
GROUP
BY
fsl
.formId
ORDER
BY
f
.name
head
=
<
table
class
=
"table table-hover qfq-table-50 tablesorter tablesorter-filter"
id
=
"{{pageAlias:T}}-formHistory"
>
<
thead
><
tr
><
th
>
Form
open
:</
th
><
th
>
#
</
th
><
th
>
First
</
th
><
th
>
Last
</
th
><
th
>
on
pageId
</
th
></
tr
></
thead
>
tail
=
</
table
>
rbeg
=
<
tr
>
rend
=
</
tr
>
fbeg
=
<
td
>
fend
=
</
td
>
}
..
_
`
autocron
`
:
AutoCron
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment