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
2e922231
Commit
2e922231
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
update docs
parent
1646c97b
No related branches found
No related tags found
1 merge request
!17
Update renderer class: add select box
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/30_Page/20_Navigation.md
+17
-1
17 additions, 1 deletion
docs/30_Page/20_Navigation.md
docs/50_Forms/Select.md
+75
-0
75 additions, 0 deletions
docs/50_Forms/Select.md
with
92 additions
and
1 deletion
docs/30_Page/20_Navigation.md
+
17
−
1
View file @
2e922231
...
@@ -72,4 +72,20 @@ $aReplace['{{NAVI_LEFT}}']=''
...
@@ -72,4 +72,20 @@ $aReplace['{{NAVI_LEFT}}']=''
'nav'
,
[
'class'
=>
'mt-2'
],
'nav'
,
[
'class'
=>
'mt-2'
],
$renderAdminLTE
->
getSidebarNavigation
(
$aSidebarNav
)
$renderAdminLTE
->
getSidebarNavigation
(
$aSidebarNav
)
);
);
```
```
\ No newline at end of file
### Navigation hacks
#### Sidebar
To render a horizontal line in the sidebar menu, add a navigation item with label '-'
```
php
$aSidebarNav
[]
=
[
'href'
=>
'#'
,
'label'
=>
'-'
];
```
In your css file add a rule:
```
css
.nav-item
hr
{
color
:
#505860
;
border-top
:
1px
solid
;
height
:
1px
;
padding
:
0
;
margin
:
0
;
}
```
This diff is collapsed.
Click to expand it.
docs/50_Forms/Select.md
0 → 100644
+
75
−
0
View file @
2e922231
## Select
Draw aselect box with option fields
### Syntax
```
php
$renderAdminLTE
->
getFormSelect
(
$aOptions
);
```
### Return
{string} html code
### Parameters
*
$aOptions - {array} options to describe the element
Option fields:
Key | Description
--- | ---
options | List of option tags
<br>
- value - value in the option
<br>
- label - visible text in the option
<br>
other keys are attributes in the option
Styling for select tag:
Key | Description
--- | ---
class | optional: additional css classes
size | optional: visible option lines
Content:
Key | Description
--- | ---
name | name attribute for sending form data
value | value of the input field/ visible text; for checkbox and radio: the data to send when sending a form
### Example
#### Simple select box
```
php
$renderAdminLTE
->
getFormSelect
(
array
(
'label'
=>
'Select contact'
,
'name'
=>
'contact'
,
'tag'
=>
'select'
,
'size'
=>
1
,
'options'
=>
[
[
'value'
=>
''
,
'label'
=>
'select'
],
[
'value'
=>
'1'
,
'label'
=>
'Tom'
],
[
'value'
=>
'2'
,
'label'
=>
'Dick'
,
'selected'
=>
1
],
[
'value'
=>
'3'
,
'label'
=>
'Harry'
],
],
));
```
You get a label, an select box wrapped in a
``<div class="form-group row">``
.
```
html
<div
class=
"form-group row"
>
<label
for=
"contact-39c4c14176af359d95e81c45078f27f3"
class=
"col-sm-2 col-form-label"
>
Select contact
</label>
<div
class=
"col-sm-10"
>
<div
class=
"form-group"
>
<select
name=
"contact"
tag=
"select"
size=
"1"
class=
"form-control "
>
<option
value=
""
>
select
</option>
<option
value=
"1"
>
Tom
</option>
<option
value=
"2"
selected=
"1"
>
Dick
</option>
<option
value=
"3"
>
Harry
</option>
</select>
</div>
</div>
</div>
```
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