summaryrefslogtreecommitdiff
path: root/includes/sys_template.php
diff options
context:
space:
mode:
authorBot <bot@myigel.name>2017-01-02 15:43:36 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-02 15:49:53 +0100
commitd71e7bbfad2f07f82df0c515608996d250fd4182 (patch)
tree5083a17b218c08b3a699a0bf15bec926cc2dd185 /includes/sys_template.php
parent7313e15ce8236e19331fb6639a3a5b97c8f06ecd (diff)
Formatting
Diffstat (limited to 'includes/sys_template.php')
-rw-r--r--includes/sys_template.php34
1 files changed, 18 insertions, 16 deletions
diff --git a/includes/sys_template.php b/includes/sys_template.php
index 059d3169..b543ce9a 100644
--- a/includes/sys_template.php
+++ b/includes/sys_template.php
@@ -95,7 +95,7 @@ function toolbar_pills($items)
* @param string $href
* @param string $glyphicon
* @param string $label
- * @param bool $selected
+ * @param bool $selected
* @return string
*/
function toolbar_item_link($href, $glyphicon, $label, $selected = false)
@@ -158,18 +158,18 @@ function page_with_title($title, $elements)
function table($columns, $rows_raw, $data = true)
{
// If only one column is given
- if (! is_array($columns)) {
- $rows = [];
- foreach ($rows_raw as $row) {
- $rows[] = [
- 'col' => $row
- ];
- }
- return render_table([
- 'col' => $columns
- ], $rows, $data);
- }
-
+ if (!is_array($columns)) {
+ $rows = [];
+ foreach ($rows_raw as $row) {
+ $rows[] = [
+ 'col' => $row
+ ];
+ }
+ return render_table([
+ 'col' => $columns
+ ], $rows, $data);
+ }
+
return render_table($columns, $rows_raw, $data);
}
@@ -182,7 +182,7 @@ function render_table($columns, $rows, $data = true)
if (count($rows) == 0) {
return info(_("No data found."), true);
}
-
+
$html = '<table class="table table-striped' . ($data ? ' data' : '') . '">';
$html .= '<thead><tr>';
foreach ($columns as $key => $column) {
@@ -255,7 +255,9 @@ function shorten($str, $length = 50)
if (strlen($str) < $length) {
return $str;
}
- return '<span title="' . htmlentities($str, ENT_COMPAT, 'UTF-8') . '">' . substr($str, 0, $length - 3) . '...</span>';
+ return '<span title="' . htmlentities($str, ENT_COMPAT, 'UTF-8') . '">'
+ . substr($str, 0, $length - 3)
+ . '...</span>';
}
function table_body($array)
@@ -297,6 +299,6 @@ function ReplaceSmilies($neueckig)
$neueckig = str_replace(";P", "<img src=\"pic/smiles/icon_mad.gif\">", $neueckig);
$neueckig = str_replace(";oP", "<img src=\"pic/smiles/icon_mad.gif\">", $neueckig);
$neueckig = str_replace("?)", "<img src=\"pic/smiles/icon_question.gif\">", $neueckig);
-
+
return $neueckig;
}