summaryrefslogtreecommitdiff
path: root/app/Templates/project_feed.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-09-10 18:12:12 +0200
committerFrédéric Guillot <fred@kanboard.net>2014-09-10 18:12:12 +0200
commitbb5b5dee2d7ef2244300ff622d11d5a32f6ba55f (patch)
treec1bce860c2ac54c7102fb269ee40925b6c92fc0f /app/Templates/project_feed.php
parentcede5d5434e4e50145daf2413c962a335c13cc99 (diff)
Add Atom feed for project activity
Diffstat (limited to 'app/Templates/project_feed.php')
-rw-r--r--app/Templates/project_feed.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/app/Templates/project_feed.php b/app/Templates/project_feed.php
new file mode 100644
index 00000000..b47c87ad
--- /dev/null
+++ b/app/Templates/project_feed.php
@@ -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&amp;action=feed&amp;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&amp;action=show&amp;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> \ No newline at end of file