Skip to content
Snippets Groups Projects
Commit 009ff051 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch 'update_2022-12' into 'main'

Update 2022 12

See merge request !1
parents 5bb63b77 220b8a11
Branches
No related tags found
1 merge request!1Update 2022 12
......@@ -27,6 +27,7 @@ Variable | Description
{{NAVI_TOP}} | top navigation bar |
{{BRAND}} | sidebar: logo area on top; default color: `bg-primary`
{{NAVI_LEFT}} | left sidebar with navigation |
{{PAGE_TITLE}} | page: title in html head |
{{PAGE_HEADER_LEFT}} | page: head area left: h1 headline |
{{PAGE_HEADER_RIGHT}} | page: head area right: breadcrumb |
{{PAGE_BODY}} | page: main content |
......
## Smallbox
Solid colored box to highlight a single value; optional with a link
### Syntax
```php
$renderAdminLTE->getSmallbox($aOptions);
```
### Return
{string} html code
### Parameters
* $aOptions - {array} options to describe the element
Styling:
Key | Description
--- | ---
type | one of [none]\|danger\|dark\|info\|primary\|secondary\|success\|warning
shadow | size of shadow; one of [none] (=default: between small and regular)|none|small|regular|large
Content:
Key | Description
--- | ---
icon | icon css class; eg. fontawesome "far fa-thumbs-up"
text | visible text
number | Value as string, eg. to format large integers
url | optional: url to set a link on the bottom
linktext | used if a url was given: linked text
### Example
```php
$renderAdminLTE->getSmallbox(array (
'type' => 'info',
'icon' => 'fas fa-shopping-cart',
'text' => 'New orders',
'number' => '150',
'url' => '#',
'linktext' => 'More info',
))
```
......@@ -379,7 +379,7 @@ class renderadminlte {
'text'=>['group'=>'content', 'description'=>'short information text', 'example_value'=>'New orders'],
'number'=>['group'=>'content', 'description'=>'a number to highlight', 'example_value'=>"150"],
'url'=>['group'=>'content', 'description'=>'optional: url to set a link on the bottom', 'example_value'=>'#'],
'linktext'=>['group'=>'content', 'optional: description'=>'linktext', 'example_value'=>'More info']
'linktext'=>['group'=>'content', 'description'=>'used if a url was given: linked text', 'example_value'=>'More info']
]
],
];
......
This diff is collapsed.
<?php
return [
// '{{DIR_ADMINLTE}}' =>'https://cdnjs.cloudflare.com/ajax/libs/admin-lte/3.2.0/',
'{{DIR_ADMINLTE}}' =>'/vendor/admin-lte/3.2.0',
'{{DIR_ADMINLTEPLUGINS}}' =>'/vendor/admin-lte-plugins',
'{{PAGE_TITLE}}' =>'My Admin page using AdminLTE',
'{{PAGE_SKIN}}' =>'',
'{{PAGE_LAYOUT}}' =>'layout-navbar-fixed layout-fixed sidebar-mini',
'{{NAVI_TOP}}' =>'{{NAVI_TOP}}',
'{{BRAND}}' =>'<a href="/" class="brand-link bg-teal">
<!--
<img src="dist/img/AdminLTELogo.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3"
style="opacity: .8">
-->
Render
<span class="brand-text font-weight-light">AdminLTE 3</span>
</a>',
'{{NAVI_LEFT}}' =>'{{NAVI_LEFT}}',
'{{PAGE_HEADER_LEFT}}'=>'<h1>{{PAGE_HEADER_LEFT}}</h1>',
'{{PAGE_HEADER_RIGHT}}'=>'{{PAGE_HEADER_RIGHT}}',
'{{PAGE_BODY}}'=>'{{PAGE_BODY}}',
'{{PAGE_FOOTER_LEFT}}'=>'&copy; Institute for Medical education * University of Bern',
'{{PAGE_FOOTER_RIGHT}}'=>'{{TODO: PAGE_FOOTER_RIGHT}}',
];
\ No newline at end of file
......@@ -3,6 +3,8 @@
return [
'{{DIR_ADMINLTE}}' =>'/vendor/admin-lte/3.2.0',
'{{DIR_ADMINLTEPLUGINS}}' =>'/vendor/admin-lte-plugins',
'{{PAGE_TITLE}}' =>'My Admin page using AdminLTE',
'{{PAGE_SKIN}}' =>'',
'{{PAGE_LAYOUT}}' =>'layout-navbar-fixed layout-fixed sidebar-mini',
'{{NAVI_TOP}}' =>'{{NAVI_TOP}}',
......
......@@ -3,7 +3,7 @@
require_once('classes/render-adminlte.class.php');
$renderAdminLTE=new renderadminlte();
$aReplace=include("./config/replace_defaults.php.dist");
$aReplace=include("./config/page_replacements.php.dist");
// ---------- TOP BAR
$aReplace['{{NAVI_TOP}}']=''
......@@ -31,5 +31,5 @@ $aReplace['{{NAVI_LEFT}}']=''
;
// ---------- send content
$sTemplate=file_get_contents('config/00_page.tpl.php');
$sTemplate=file_get_contents('config/page.tpl.php');
echo $renderAdminLTE->render($sTemplate,$aReplace);
......@@ -9,7 +9,7 @@ require_once('inc_functions.php');
// CONFIG
// ----------------------------------------------------------------------
$aReplace=include("./config/replace_defaults.php");
$aReplace=include("./config/page_replacements.php");
// $aReplace['{{DIR_ADMINLTE}}']='/vendor/admin-lte/AdminLTE-3.2.0/';
......@@ -143,5 +143,5 @@ $aReplace['{{PAGE_BODY}}']=$sBody
// ---------- send content
$sTemplate=file_get_contents('config/00_page.tpl.php');
$sTemplate=file_get_contents('config/page.tpl.php');
echo $renderAdminLTE->render($sTemplate,$aReplace);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment