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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
AdminLTE renderer
Commits
a9d7b2ae
Commit
a9d7b2ae
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
reformat classes
parent
2023b30d
Branches
Branches containing commit
No related tags found
1 merge request
!18
Update renderer class
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
public_html/classes/htmlelements.class.php
+73
-62
73 additions, 62 deletions
public_html/classes/htmlelements.class.php
public_html/classes/render-adminlte.class.php
+921
-785
921 additions, 785 deletions
public_html/classes/render-adminlte.class.php
with
994 additions
and
847 deletions
public_html/classes/htmlelements.class.php
+
73
−
62
View file @
a9d7b2ae
...
@@ -16,7 +16,8 @@
...
@@ -16,7 +16,8 @@
*
*
* @author Axel
* @author Axel
*/
*/
class
htmlelements
{
class
htmlelements
{
/**
/**
* set of auto generated icon prefixes
* set of auto generated icon prefixes
...
@@ -34,7 +35,8 @@ class htmlelements {
...
@@ -34,7 +35,8 @@ class htmlelements {
// CONSTRUCTOR
// CONSTRUCTOR
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
public
function
__construct
()
{
public
function
__construct
()
{
return
true
;
return
true
;
}
}
...
@@ -49,7 +51,8 @@ class htmlelements {
...
@@ -49,7 +51,8 @@ class htmlelements {
* generate html attibutes with all internal attributes key -> values
* generate html attibutes with all internal attributes key -> values
* @return string
* @return string
*/
*/
protected
function
_addAttributes
()
{
protected
function
_addAttributes
()
{
$sReturn
=
''
;
$sReturn
=
''
;
foreach
(
$this
->
_aAttributes
as
$sAttr
=>
$sValue
)
{
foreach
(
$this
->
_aAttributes
as
$sAttr
=>
$sValue
)
{
if
(
is_array
(
$sValue
))
{
if
(
is_array
(
$sValue
))
{
...
@@ -71,7 +74,8 @@ class htmlelements {
...
@@ -71,7 +74,8 @@ class htmlelements {
* @param array $aAttributes
* @param array $aAttributes
* @return boolean
* @return boolean
*/
*/
protected
function
_setAttributes
(
$aAttributes
){
protected
function
_setAttributes
(
$aAttributes
)
{
$this
->
_sLabel
=
''
;
$this
->
_sLabel
=
''
;
if
(
isset
(
$aAttributes
[
'icon'
])
&&
$aAttributes
[
'icon'
])
{
if
(
isset
(
$aAttributes
[
'icon'
])
&&
$aAttributes
[
'icon'
])
{
$this
->
_sLabel
.
=
$this
->
getIcon
(
$aAttributes
[
'icon'
]);
$this
->
_sLabel
.
=
$this
->
getIcon
(
$aAttributes
[
'icon'
]);
...
@@ -100,7 +104,8 @@ class htmlelements {
...
@@ -100,7 +104,8 @@ class htmlelements {
* @param boolean $bCloseTag optional: set false if tag has no closing tag (= ending with "/>")
* @param boolean $bCloseTag optional: set false if tag has no closing tag (= ending with "/>")
* @return type
* @return type
*/
*/
public
function
getTag
(
$sTag
,
$aAttributes
,
$bCloseTag
=
true
){
public
function
getTag
(
$sTag
,
$aAttributes
,
$bCloseTag
=
true
)
{
$sTpl
=
$bCloseTag
?
"<
$sTag
%s>%s</
$sTag
>"
:
"<
$sTag
%s/>%s"
;
$sTpl
=
$bCloseTag
?
"<
$sTag
%s>%s</
$sTag
>"
:
"<
$sTag
%s/>%s"
;
$this
->
_setAttributes
(
$aAttributes
);
$this
->
_setAttributes
(
$aAttributes
);
return
sprintf
(
$sTpl
,
$this
->
_addAttributes
(),
$this
->
_sLabel
);
return
sprintf
(
$sTpl
,
$this
->
_addAttributes
(),
$this
->
_sLabel
);
...
@@ -120,7 +125,8 @@ class htmlelements {
...
@@ -120,7 +125,8 @@ class htmlelements {
* @param string $sIconclass
* @param string $sIconclass
* @return boolean
* @return boolean
*/
*/
public
function
getIcon
(
$sIconclass
=
false
){
public
function
getIcon
(
$sIconclass
=
false
)
{
if
(
!
$sIconclass
)
{
if
(
!
$sIconclass
)
{
return
''
;
return
''
;
}
}
...
@@ -150,7 +156,8 @@ class htmlelements {
...
@@ -150,7 +156,8 @@ class htmlelements {
* @param array $aAttributes attributes of the select tag
* @param array $aAttributes attributes of the select tag
* @return string
* @return string
*/
*/
public
function
getFormInput
(
$aAttributes
){
public
function
getFormInput
(
$aAttributes
)
{
$sTpl
=
'<input %s/>'
;
$sTpl
=
'<input %s/>'
;
$this
->
_setAttributes
(
$aAttributes
);
$this
->
_setAttributes
(
$aAttributes
);
return
sprintf
(
$sTpl
,
$this
->
_addAttributes
());
return
sprintf
(
$sTpl
,
$this
->
_addAttributes
());
...
@@ -161,7 +168,8 @@ class htmlelements {
...
@@ -161,7 +168,8 @@ class htmlelements {
* @param array $aAttributes attributes of the option tag
* @param array $aAttributes attributes of the option tag
* @return string
* @return string
*/
*/
public
function
getFormOption
(
$aAttributes
){
public
function
getFormOption
(
$aAttributes
)
{
$sTpl
=
'<option %s>%s</option>'
;
$sTpl
=
'<option %s>%s</option>'
;
$this
->
_setAttributes
(
$aAttributes
);
$this
->
_setAttributes
(
$aAttributes
);
return
sprintf
(
$sTpl
,
$this
->
_addAttributes
(),
$this
->
_sLabel
);
return
sprintf
(
$sTpl
,
$this
->
_addAttributes
(),
$this
->
_sLabel
);
...
@@ -173,7 +181,8 @@ class htmlelements {
...
@@ -173,7 +181,8 @@ class htmlelements {
* @param array $aOptions array for all option fields
* @param array $aOptions array for all option fields
* @return string
* @return string
*/
*/
public
function
getFormSelect
(
$aAttributes
,
$aOptions
=
array
()){
public
function
getFormSelect
(
$aAttributes
,
$aOptions
=
array
())
{
// $sTpl = '<select %s>%s</select>';
// $sTpl = '<select %s>%s</select>';
if
(
!
count
(
$aOptions
))
{
if
(
!
count
(
$aOptions
))
{
...
@@ -193,7 +202,8 @@ class htmlelements {
...
@@ -193,7 +202,8 @@ class htmlelements {
*/
*/
}
}
public
function
getTable
(
$aHead
,
$aBody
,
$aTableAttributes
=
array
()){
public
function
getTable
(
$aHead
,
$aBody
,
$aTableAttributes
=
array
())
{
$sReturn
=
''
;
$sReturn
=
''
;
$sTdata
=
''
;
$sTdata
=
''
;
$sThead
=
''
;
$sThead
=
''
;
...
@@ -213,7 +223,8 @@ class htmlelements {
...
@@ -213,7 +223,8 @@ class htmlelements {
$sTdata
.
=
'</tr>'
;
$sTdata
.
=
'</tr>'
;
}
}
$this
->
_setAttributes
(
$aTableAttributes
);
$this
->
_setAttributes
(
$aTableAttributes
);
return
sprintf
(
$sTpl
,
return
sprintf
(
$sTpl
,
$this
->
_addAttributes
(),
$this
->
_addAttributes
(),
$sThead
,
$sThead
,
$sTdata
$sTdata
...
...
This diff is collapsed.
Click to expand it.
public_html/classes/render-adminlte.class.php
+
921
−
785
View file @
a9d7b2ae
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