Merge branch 'ui' into dev

This commit is contained in:
Lukas Halbritter
2018-10-16 10:53:48 +02:00
16 changed files with 379 additions and 260 deletions
+6 -6
View File
@@ -36,15 +36,15 @@ function formatAmount(float $amount, $cash = true, $text = false,
$euro = ($cash) ? ' €' : '';
if (!$text) {
$sign = ($amount < 0) ? '- ' : '';
$left = '<span style=\'float: left;\'>';
$right = '<span style=\'float: right;\'>';
$span = '</span>';
if ($amount == 0) {
return $right . '-&nbsp;' . $euro . $span;
return $right . '-&nbsp;' . $euro . $span;
}
return $left . $sign . $span . $right .
number_format(abs($amount), $decimals, ',', '.') . $euro . $span;
}
@@ -85,7 +85,7 @@ function formatDate($date, $format='d.m.Y')
*
* @param string $year
* @param string $month
* @return string
* @return string
*/
function startOfMonth($year, $month, $format='d.m.Y')
{
@@ -99,7 +99,7 @@ function startOfMonth($year, $month, $format='d.m.Y')
*
* @param string $year
* @param string $month
* @return string
* @return string
*/
function endOfMonth($year, $month, $format='d.m.Y') {
return Carbon\Carbon::createFromDate($year, $month)
+12
View File
@@ -0,0 +1,12 @@
<?php
/**
* Return nav-here if current path begins with this path.
*
* @param string $path
* @return string
*/
function setActive($path)
{
return Request::is($path . '*') ? ' active' : '';
}