summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/feed/project.php23
-rw-r--r--app/Template/feed/user.php23
2 files changed, 46 insertions, 0 deletions
diff --git a/app/Template/feed/project.php b/app/Template/feed/project.php
new file mode 100644
index 00000000..5bf4264e
--- /dev/null
+++ b/app/Template/feed/project.php
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+ <title><?= e("%s's activity", $project['name']) ?></title>
+ <updated><?= date(DATE_ATOM) ?></updated>
+ <link rel="alternate" type="text/html" href="<?= $this->url->base() ?>"/>
+ <link rel="self" type="application/atom+xml" href="<?= $this->url->href('FeedController', 'project', ['token' => $project['token']], false, '', true) ?>"/>
+ <id><?= $this->url->href('FeedController', 'project', ['token' => $project['token']], false, '', true) ?></id>
+
+ <?php foreach ($events as $event): ?>
+ <entry>
+ <id><?= $this->url->href('TaskViewController', 'show', ['task_id' => $event['task_id']], false, 'event-'.$event['id'], true) ?></id>
+ <link rel="alternate" type="text/html" href="<?= $this->url->href('TaskViewController', 'show', ['task_id' => $event['task_id']], false, 'event-'.$event['id'], true) ?>"/>
+ <updated><?= date(DATE_ATOM, $event['date_creation']) ?></updated>
+ <published><?= date(DATE_ATOM, $event['date_creation']) ?></published>
+ <author>
+ <name><?= $event['author'] ?></name>
+ </author>
+ <title><?= $event['event_title'] ?></title>
+ <content type="html"><![CDATA[<?= $event['event_content'] ?>]]></content>
+ </entry>
+ <?php endforeach ?>
+
+</feed> \ No newline at end of file
diff --git a/app/Template/feed/user.php b/app/Template/feed/user.php
new file mode 100644
index 00000000..7d3c596a
--- /dev/null
+++ b/app/Template/feed/user.php
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+ <title><?= e('Project activities for %s', $this->user->getFullname($user)) ?></title>
+ <updated><?= date(DATE_ATOM) ?></updated>
+ <link rel="alternate" type="text/html" href="<?= $this->url->base() ?>"/>
+ <link rel="self" type="application/atom+xml" href="<?= $this->url->href('FeedController', 'user', ['token' => $user['token']], false, '', true) ?>"/>
+ <id><?= $this->url->href('FeedController', 'user', ['token' => $user['token']], false, '', true) ?></id>
+
+ <?php foreach ($events as $event): ?>
+ <entry>
+ <id><?= $this->url->href('TaskViewController', 'show', ['task_id' => $event['task_id']], false, 'event-'.$event['id'], true) ?></id>
+ <link rel="alternate" type="text/html" href="<?= $this->url->href('TaskViewController', 'show', ['task_id' => $event['task_id']], false, 'event-'.$event['id'], true) ?>"/>
+ <updated><?= date(DATE_ATOM, $event['date_creation']) ?></updated>
+ <published><?= date(DATE_ATOM, $event['date_creation']) ?></published>
+ <author>
+ <name><?= $event['author'] ?></name>
+ </author>
+ <title><?= $event['event_title'] ?></title>
+ <content type="html"><![CDATA[<?= $event['event_content'] ?>]]></content>
+ </entry>
+ <?php endforeach ?>
+
+</feed> \ No newline at end of file