diff --git a/app/Controller/Project.php b/app/Controller/Project.php index 6356a9c6a..ef9eac6b2 100644 --- a/app/Controller/Project.php +++ b/app/Controller/Project.php @@ -405,6 +405,27 @@ class Project extends Base $this->response->redirect('?controller=project&action=show&project_id='.$project_id); } + /** + * RSS feed for a project + * + * @access public + */ + public function feed() + { + $token = $this->request->getStringParam('token'); + $project = $this->project->getByToken($token); + + // Token verification + if (! $project) { + $this->forbidden(true); + } + + $this->response->xml($this->template->load('project_feed', array( + 'events' => $this->project->getActivity($project['id']), + 'project' => $project, + ))); + } + /** * Activity page for a project * diff --git a/app/Model/Acl.php b/app/Model/Acl.php index ca00a09e3..aea13e8cb 100644 --- a/app/Model/Acl.php +++ b/app/Model/Acl.php @@ -20,6 +20,7 @@ class Acl extends Base 'user' => array('login', 'check', 'google', 'github'), 'task' => array('add', 'readonly'), 'board' => array('readonly'), + 'project' => array('feed'), ); /** diff --git a/app/Templates/project_activity.php b/app/Templates/project_activity.php index b79d97f9a..86e17e7f8 100644 --- a/app/Templates/project_activity.php +++ b/app/Templates/project_activity.php @@ -12,6 +12,9 @@

+ +

+

diff --git a/app/Templates/project_feed.php b/app/Templates/project_feed.php new file mode 100644 index 000000000..b47c87ad0 --- /dev/null +++ b/app/Templates/project_feed.php @@ -0,0 +1,27 @@ +' ?> + + <?= t('%s\'s activity', $project['name']) ?> + + + + + assets/img/favicon.png + + + + <?= $e['event_title'] ?> + + + + + + + + + + ]]> + + + + \ No newline at end of file diff --git a/app/Templates/project_share.php b/app/Templates/project_share.php index 62e05b737..6cfd85f6c 100644 --- a/app/Templates/project_share.php +++ b/app/Templates/project_share.php @@ -5,7 +5,10 @@

-
+
diff --git a/app/Templates/project_show.php b/app/Templates/project_show.php index 12b0ae641..98ffb581d 100644 --- a/app/Templates/project_show.php +++ b/app/Templates/project_show.php @@ -5,7 +5,8 @@
  • -
  • +
  • +
  • diff --git a/app/Templates/user_external.php b/app/Templates/user_external.php index 727cd2bfd..a67d886e2 100644 --- a/app/Templates/user_external.php +++ b/app/Templates/user_external.php @@ -3,7 +3,7 @@
    -

    +

    @@ -19,7 +19,7 @@ -

    +

    diff --git a/app/Templates/user_index.php b/app/Templates/user_index.php index 7e9197b51..d4e1bbf9b 100644 --- a/app/Templates/user_index.php +++ b/app/Templates/user_index.php @@ -53,10 +53,10 @@

    diff --git a/assets/css/app.css b/assets/css/app.css index 97e84b478..abe8130d0 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -65,6 +65,10 @@ ul.no-bullet li { margin-left: 0; } +.pull-right { + text-align: right; +} + /* tables */ table { width: 100%;