summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorFrédéric Guillot <contact@fredericguillot.com>2014-02-22 16:30:03 -0500
committerFrédéric Guillot <contact@fredericguillot.com>2014-02-22 16:30:03 -0500
commit2f4651411b1827e1e5859ba6053052b508f455e0 (patch)
treeea07631e7a5e5850367f873c7a9c1a0e07e10638 /templates
parenta1923d3d7f9276e859d6fd6bee339f0ea00f6544 (diff)
Add kiosk mode, public board access with read-only and auto-refresh
Diffstat (limited to 'templates')
-rw-r--r--templates/board_public.php41
-rw-r--r--templates/layout.php3
-rw-r--r--templates/project_index.php3
3 files changed, 47 insertions, 0 deletions
diff --git a/templates/board_public.php b/templates/board_public.php
new file mode 100644
index 00000000..d01bae0f
--- /dev/null
+++ b/templates/board_public.php
@@ -0,0 +1,41 @@
+<section id="main">
+
+ <table id="board">
+ <tr>
+ <?php $column_with = round(100 / count($columns), 2); ?>
+ <?php foreach ($columns as $column): ?>
+ <th width="<?= $column_with ?>%">
+ <?= Helper\escape($column['title']) ?>
+ </th>
+ <?php endforeach ?>
+ </tr>
+ <tr>
+ <?php foreach ($columns as $column): ?>
+ <td class="column">
+ <?php foreach ($column['tasks'] as $task): ?>
+ <div class="draggable-item">
+ <div class="task task-<?= $task['color_id'] ?>">
+
+ #<?= $task['id'] ?> -
+
+ <span class="task-user">
+ <?php if (! empty($task['owner_id'])): ?>
+ <?= t('Assigned to %s', $task['username']) ?>
+ <?php else: ?>
+ <span class="task-nobody"><?= t('No body assigned') ?></span>
+ <?php endif ?>
+ </span>
+
+ <div class="task-title">
+ <?= Helper\escape($task['title']) ?>
+ </div>
+
+ </div>
+ </div>
+ <?php endforeach ?>
+ </td>
+ <?php endforeach ?>
+ </tr>
+ </table>
+
+</section> \ No newline at end of file
diff --git a/templates/layout.php b/templates/layout.php
index 1c89f2ab..0791b910 100644
--- a/templates/layout.php
+++ b/templates/layout.php
@@ -10,6 +10,9 @@
<link rel="apple-touch-icon" sizes="114x114" href="assets/img/touch-icon-iphone-retina.png">
<link rel="apple-touch-icon" sizes="144x144" href="assets/img/touch-icon-ipad-retina.png">
<title><?= isset($title) ? Helper\escape($title) : 'Kanboard' ?></title>
+ <?php if (isset($auto_refresh)): ?>
+ <meta http-equiv="refresh" content="<?= AUTO_REFRESH_DURATION ?>" >
+ <?php endif ?>
</head>
<body>
<?php if (isset($no_layout)): ?>
diff --git a/templates/project_index.php b/templates/project_index.php
index d144e41f..8c75ef0b 100644
--- a/templates/project_index.php
+++ b/templates/project_index.php
@@ -75,6 +75,9 @@
<li>
<a href="?controller=project&amp;action=confirm&amp;project_id=<?= $project['id'] ?>"><?= t('Remove') ?></a>
</li>
+ <li>
+ <a href="?controller=board&amp;action=readonly&amp;token=<?= $project['token'] ?>" target="_blank"><?= t('Public link') ?></a>
+ </li>
</ul>
</td>
<?php endif ?>