summaryrefslogtreecommitdiff
path: root/app/Template/project_view/show.php
blob: 7dee08be0ad6566d4ae28b0bd5a878164e3d5bf0 (plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<div class="page-header">
    <h2><?= t('Summary') ?></h2>
</div>
<ul class="panel">
    <li><strong><?= $project['is_active'] ? t('Active') : t('Inactive') ?></strong></li>

    <?php if ($project['owner_id'] > 0): ?>
        <li><?= t('Project owner: ') ?><strong><?= $this->text->e($project['owner_name'] ?: $project['owner_username']) ?></strong></li>
    <?php endif ?>

    <?php if ($project['is_private']): ?>
        <li><i class="fa fa-lock"></i> <?= t('This project is private') ?></li>
    <?php endif ?>

    <?php if ($project['is_public']): ?>
        <li><?= $this->url->icon('share-alt', t('Public link'), 'BoardViewController', 'readonly', array('token' => $project['token']), false, '', '', true) ?></li>
        <li><?= $this->url->icon('rss-square', t('RSS feed'), 'FeedController', 'project', array('token' => $project['token']), false, '', '', true) ?></li>
        <li><?= $this->url->icon('calendar', t('iCal feed'), 'ICalendarController', 'project', array('token' => $project['token'])) ?></li>
    <?php else: ?>
        <li><?= t('Public access disabled') ?></li>
    <?php endif ?>

    <?php if ($project['last_modified']): ?>
        <li><?= t('Modified:').' '.$this->dt->datetime($project['last_modified']) ?></li>
    <?php endif ?>

    <?php if ($project['start_date']): ?>
        <li><?= t('Start date: ').$this->dt->date($project['start_date']) ?></li>
    <?php endif ?>

    <?php if ($project['end_date']): ?>
        <li><?= t('End date: ').$this->dt->date($project['end_date']) ?></li>
    <?php endif ?>
</ul>

<?php if (! empty($project['description'])): ?>
    <div class="page-header">
        <h2><?= t('Description') ?></h2>
    </div>

    <article class="markdown">
        <?= $this->text->markdown($project['description']) ?>
    </article>
<?php endif ?>

<div class="page-header">
    <h2><?= t('Columns') ?></h2>
</div>
<?php if (empty($columns)): ?>
    <p class="alert alert-error"><?= t('Your board doesn\'t have any columns!') ?></p>
<?php else: ?>
    <table class="table-striped table-scrolling"
        <thead>
        <tr>
            <th class="column-40"><?= t('Column') ?></th>
            <th class="column-10"><?= t('Task limit') ?></th>
            <th class="column-20"><?= t('Visible on dashboard') ?></th>
            <th class="column-15"><?= t('Open tasks') ?></th>
            <th class="column-15"><?= t('Closed tasks') ?></th>
        </tr>
        </thead>
        <tbody>
        <?php foreach ($columns as $column): ?>
            <tr data-column-id="<?= $column['id'] ?>">
                <td>
                    <?= $this->text->e($column['title']) ?>
                    <?php if (! empty($column['description'])): ?>
                        <span class="tooltip" title="<?= $this->text->markdownAttribute($column['description']) ?>">
                        <i class="fa fa-info-circle"></i>
                    </span>
                    <?php endif ?>
                </td>
                <td>
                    <?= $column['task_limit'] ?: '∞' ?>
                </td>
                <td>
                    <?= $column['hide_in_dashboard'] == 0 ? t('Yes') : t('No') ?>
                </td>
                <td>
                    <?= $column['nb_open_tasks'] ?>
                </td>
                <td>
                    <?= $column['nb_closed_tasks'] ?>
                </td>
            </tr>
        <?php endforeach ?>
        </tbody>
    </table>
<?php endif ?>