Add Atom feed for project activity
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
<?php if (empty($events)): ?>
|
||||
<p class="alert"><?= t('No activity.') ?></p>
|
||||
<?php else: ?>
|
||||
|
||||
<p class="pull-right"><i class="fa fa-rss-square"></i> <a href="?controller=project&action=feed&token=<?= $project['token'] ?>" target="_blank"><?= t('RSS feed') ?></a></p>
|
||||
|
||||
<?php foreach ($events as $event): ?>
|
||||
<div class="activity-event">
|
||||
<p class="activity-datetime">
|
||||
|
||||
27
app/Templates/project_feed.php
Normal file
27
app/Templates/project_feed.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?= '<?xml version="1.0" encoding="utf-8"?>' ?>
|
||||
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
|
||||
<title><?= t('%s\'s activity', $project['name']) ?></title>
|
||||
<link rel="alternate" type="text/html" href="<?= Helper\get_current_base_url() ?>"/>
|
||||
<link rel="self" type="application/atom+xml" href="<?= Helper\get_current_base_url() ?>?controller=project&action=feed&token=<?= $project['token'] ?>"/>
|
||||
<updated><?= date(DATE_ATOM) ?></updated>
|
||||
<id><?= Helper\get_current_base_url() ?></id>
|
||||
<icon><?= Helper\get_current_base_url() ?>assets/img/favicon.png</icon>
|
||||
|
||||
<?php foreach ($events as $e): ?>
|
||||
<entry>
|
||||
<title type="text"><?= $e['event_title'] ?></title>
|
||||
<link rel="alternate" href="<?= Helper\get_current_base_url().'?controller=task&action=show&task_id='.$e['task_id'] ?>"/>
|
||||
<id><?= $e['id'].'-'.$e['event_name'].'-'.$e['task_id'].'-'.$e['date_creation'] ?></id>
|
||||
<published><?= date(DATE_ATOM, $e['date_creation']) ?></published>
|
||||
<updated><?= date(DATE_ATOM, $e['date_creation']) ?></updated>
|
||||
<author>
|
||||
<name><?= Helper\escape($e['author']) ?></name>
|
||||
</author>
|
||||
<content type="html">
|
||||
<![CDATA[
|
||||
<?= $e['event_content'] ?>
|
||||
]]>
|
||||
</content>
|
||||
</entry>
|
||||
<?php endforeach ?>
|
||||
</feed>
|
||||
@@ -5,7 +5,10 @@
|
||||
<?php if ($project['is_public']): ?>
|
||||
|
||||
<div class="settings">
|
||||
<strong><a href="?controller=board&action=readonly&token=<?= $project['token'] ?>" target="_blank"><?= t('Public link') ?></a></strong><br/>
|
||||
<ul class="no-bullet">
|
||||
<li><strong><i class="fa fa-share-alt"></i> <a href="?controller=board&action=readonly&token=<?= $project['token'] ?>" target="_blank"><?= t('Public link') ?></a></strong></li>
|
||||
<li><strong><i class="fa fa-rss-square"></i> <a href="?controller=project&action=feed&token=<?= $project['token'] ?>" target="_blank"><?= t('RSS feed') ?></a></strong></li>
|
||||
</ul>
|
||||
<input type="text" readonly="readonly" value="<?= Helper\get_current_base_url() ?>?controller=board&action=readonly&token=<?= $project['token'] ?>"/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
<li><strong><?= $project['is_active'] ? t('Active') : t('Inactive') ?></strong></li>
|
||||
|
||||
<?php if ($project['is_public']): ?>
|
||||
<li><a href="?controller=board&action=readonly&token=<?= $project['token'] ?>" target="_blank"><?= t('Public link') ?></a></li>
|
||||
<li><i class="fa fa-share-alt"></i> <a href="?controller=board&action=readonly&token=<?= $project['token'] ?>" target="_blank"><?= t('Public link') ?></a></li>
|
||||
<li><i class="fa fa-rss-square"></i> <a href="?controller=project&action=feed&token=<?= $project['token'] ?>" target="_blank"><?= t('RSS feed') ?></a></li>
|
||||
<?php else: ?>
|
||||
<li><?= t('Public access disabled') ?></li>
|
||||
<?php endif ?>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
</div>
|
||||
|
||||
<?php if (GOOGLE_AUTH): ?>
|
||||
<h3><?= t('Google Account') ?></h3>
|
||||
<h3><i class="fa fa-google"></i> <?= t('Google Account') ?></h3>
|
||||
|
||||
<p class="settings">
|
||||
<?php if (Helper\is_current_user($user['id'])): ?>
|
||||
@@ -19,7 +19,7 @@
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (GITHUB_AUTH): ?>
|
||||
<h3><?= t('Github Account') ?></h3>
|
||||
<h3><i class="fa fa-github"></i> <?= t('Github Account') ?></h3>
|
||||
|
||||
<p class="settings">
|
||||
<?php if (Helper\is_current_user($user['id'])): ?>
|
||||
|
||||
@@ -53,10 +53,10 @@
|
||||
<td>
|
||||
<ul class="no-bullet">
|
||||
<?php if ($user['google_id']): ?>
|
||||
<li><?= t('Google account linked') ?></li>
|
||||
<li><i class="fa fa-google"></i> <?= t('Google account linked') ?></li>
|
||||
<?php endif ?>
|
||||
<?php if ($user['github_id']): ?>
|
||||
<li><?= t('Github account linked') ?></li>
|
||||
<li><i class="fa fa-github"></i> <?= t('Github account linked') ?></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user