improvements

This commit is contained in:
Kevin Papst
2016-10-30 23:39:55 +01:00
parent 55ac11d517
commit 1678129fe9
47 changed files with 4390 additions and 1746 deletions

View File

@@ -35,37 +35,39 @@ class ProfileController extends Controller
*/
public function indexAction($ident)
{
$user = $this->getUser();
$isAdmin = false;
if ($isAdmin) {
} else {
}
$timesheetRepo = $this->getDoctrine()->getRepository(Timesheet::class);
$userStats = $timesheetRepo->getUserStatistics($user);
// FIXME fetch values dynamically and add trans filter to macros
$items = [
[
'title' => 'Projects',
'title' => 'Stundenlohn',
'url' => '#',
'color' => 'blue',
'amount' => 12
'color' => 'blue', // aqua, red, green
'value' => 70
],
[
'title' => 'Tasks',
'title' => 'Sprache',
'url' => '#',
'color' => 'aqua',
'amount' => 5
],
[
'title' => 'Projects',
'url' => '#',
'color' => 'red',
'amount' => 27
],
[
'title' => 'Einträge',
'url' => '#',
'color' => 'green',
'amount' => 842
'color' => 'green', // aqua, red, green
'value' => 'deutsch'
],
];
return $this->render(
'user/profile.html.twig',
['user' => $this->getUser(), 'items' => $items]
[
'user' => $this->getUser(),
'settings' => $items,
'stats' => $userStats
]
);
}
}