-
Notifications
You must be signed in to change notification settings - Fork 19
/
clients.php
55 lines (49 loc) · 1.74 KB
/
clients.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
use \OCP\Util;
Util::addScript('timemanager', 'timemanager');
style('timemanager', 'timemanager');
$urlGenerator = \OC::$server->getURLGenerator();
$l = Util::getL10N('timemanager');
?>
<?php print_unescaped($this->inc('partials/navigation')); ?>
<div id="app-content">
<div class="container">
<div class="section">
<h2 class="list-title"><?php p($l->t('Clients')); ?></h2>
<span data-svelte="ClientEditorDialog.svelte"></span>
<span data-store="<?php p($_['store']); ?>"></span>
<?php if (count($_['clients']) > 0) {
foreach ($_['clients'] as $client) { ?>
<div class="tm_item-row with-link">
<a class="timemanager-pjax-link" href="<?php echo $urlGenerator->linkToRoute('timemanager.page.projects'); ?>?client=<?php echo $client->getUuid(); ?>">
<h3><?php p($client->getName()); ?></h3>
<div class="tm_item-excerpt">
<span>
<?php p($l->t('%s projects', [$client->project_count])); ?>
</span> ·
<span>
<?php p($client->hours); ?> <?php p($l->t('hrs.')); ?>
</span> ·
<span>
<?php p($l->t('since %s', [$client->getCreatedYear()])); ?>
</span>
<?php print_unescaped($this->inc('partials/sharestatus', ['entity' => $client])); ?>
</div>
</a>
</div>
<?php }
} else { ?>
<div class="tm_item-row">
<h3><?php p($l->t("You don't have any clients, yet. Get started by clicking “Add client”.")); ?></h3>
</div>
<?php } ?>
</div>
<div class="section" data-svelte-hide="ClientEditor.svelte">
<div class="tm_add">
<div id="new-item" class="tm_new-item">
<?php print_unescaped($_['templates']['ClientEditor.svelte']); ?>
</div>
</div>
</div>
</div>
</div>