Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AdminLTE renderer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
AdminLTE renderer
Commits
9dc47d00
Commit
9dc47d00
authored
2 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
loop over all params
parent
408402f0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public_html/pages/component.php
+30
-21
30 additions, 21 deletions
public_html/pages/component.php
with
30 additions
and
21 deletions
public_html/pages/component.php
+
30
−
21
View file @
9dc47d00
...
@@ -108,6 +108,7 @@ if(!$renderAdminLTE->getComponent($sComponent)) {
...
@@ -108,6 +108,7 @@ if(!$renderAdminLTE->getComponent($sComponent)) {
<tr><td colspan="2">
<tr><td colspan="2">
<button class="btn btn-primary">Submit</button>
<button class="btn btn-primary">Submit</button>
<a href="?id='
.
$sComponent
.
'" class="btn btn-secondary">Reset</a>
<a href="?id='
.
$sComponent
.
'" class="btn btn-secondary">Reset</a>
<a href="?id='
.
$sComponent
.
'&doloop=1" class="btn btn-secondary">Loop all</a>
</td></tr>
</td></tr>
</tbody></table>
</tbody></table>
</form>
</form>
...
@@ -115,21 +116,34 @@ if(!$renderAdminLTE->getComponent($sComponent)) {
...
@@ -115,21 +116,34 @@ if(!$renderAdminLTE->getComponent($sComponent)) {
// --------- loop over a single var
// --------- loop over a single var
$sLooper
=
''
;
$sLooper
=
''
;
if
(
$sLoopvar
=
isset
(
$_GET
[
'doloop'
])
?
$_GET
[
'doloop'
]
:
''
;
isset
(
$_GET
[
'doloop'
])
$aLoopvars
=
[];
&&
$renderAdminLTE
->
getComponentParamkey
(
$sComponent
,
$_GET
[
'doloop'
])
){
if
(
$sLoopvar
==
1
){
$sLoopvar
=
$_GET
[
'doloop'
];
$aLoopvars
=
$renderAdminLTE
->
getComponentParamkeys
(
$sComponent
);
}
elseif
(
$renderAdminLTE
->
getComponentParamkey
(
$sComponent
,
$sLoopvar
))
{
foreach
(
$renderAdminLTE
->
getValidParamValues
(
$sComponent
,
$sLoopvar
)
as
$sLoopValue
){
$aLoopvars
=
[
$sLoopvar
];
$aLoopoptions
=
$aWidgetOptions
;
}
$aLoopoptions
[
$sLoopvar
]
=
$sLoopValue
;
if
(
count
(
$aLoopvars
)){
$sLooper
.
=
$renderAdminLTE
->
addCol
(
foreach
(
$aLoopvars
as
$sLoopvar
){
'<h4>"'
.
$sLoopvar
.
'" => "'
.
$sLoopValue
.
'"</h4>'
$sLoop4Var
=
''
;
.
getOutput
(
'$renderAdminLTE->'
.
$aComp
[
'method'
]
.
'('
.
var_export
(
$aLoopoptions
,
1
)
.
')'
),
foreach
(
$renderAdminLTE
->
getValidParamValues
(
$sComponent
,
$sLoopvar
)
as
$sLoopValue
){
3
$aLoopoptions
=
$aWidgetOptions
;
);
$aLoopoptions
[
$sLoopvar
]
=
$sLoopValue
;
$sLoop4Var
.
=
$renderAdminLTE
->
addCol
(
'<br><code>"'
.
$sLoopvar
.
'" => "'
.
$sLoopValue
.
'"</code><br>'
.
getOutput
(
'$renderAdminLTE->'
.
$aComp
[
'method'
]
.
'('
.
var_export
(
$aLoopoptions
,
1
)
.
')'
),
3
);
}
$sLooper
.
=
$sLoop4Var
?
$renderAdminLTE
->
addRow
(
'<h4>Loop over values of key "'
.
$sLoopvar
.
'"</h4>'
)
.
$renderAdminLTE
->
addRow
(
$sLoop4Var
)
.
'<hr>'
:
''
;
}
}
}
}
...
@@ -157,11 +171,6 @@ if(!$renderAdminLTE->getComponent($sComponent)) {
...
@@ -157,11 +171,6 @@ if(!$renderAdminLTE->getComponent($sComponent)) {
8
8
)
)
)
)
.
(
.
$sLooper
$sLooper
?
$renderAdminLTE
->
addRow
(
$sLooper
)
:
''
)
;
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment