From 4c018cc42de3dd6ac629152e3077a3a7ec3459ff Mon Sep 17 00:00:00 2001 From: Marios Antonoudiou Date: Sat, 12 Mar 2016 19:48:46 +0200 Subject: [PATCH] Add routes for issues and pr views. Closes https://github.com/gitsup/gitsup/issues/6 --- .../components/issuesIndex/issuesIndex.html | 9 ++++++++ client/components/issuesIndex/issuesIndex.js | 5 +++++ client/components/pullsIndex/pullsIndex.html | 9 ++++++++ client/components/pullsIndex/pullsIndex.js | 5 +++++ routes/routes.js | 22 +++++++++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 client/components/pullsIndex/pullsIndex.html create mode 100644 client/components/pullsIndex/pullsIndex.js diff --git a/client/components/issuesIndex/issuesIndex.html b/client/components/issuesIndex/issuesIndex.html index e69de29..7445279 100644 --- a/client/components/issuesIndex/issuesIndex.html +++ b/client/components/issuesIndex/issuesIndex.html @@ -0,0 +1,9 @@ + diff --git a/client/components/issuesIndex/issuesIndex.js b/client/components/issuesIndex/issuesIndex.js index e69de29..828c1c0 100644 --- a/client/components/issuesIndex/issuesIndex.js +++ b/client/components/issuesIndex/issuesIndex.js @@ -0,0 +1,5 @@ +Template.issuesIndex.helpers({ + example: function() { + return 'https://github.com/' + this.user + '/' + this.project + '/issues'; + } +}); diff --git a/client/components/pullsIndex/pullsIndex.html b/client/components/pullsIndex/pullsIndex.html new file mode 100644 index 0000000..442af0a --- /dev/null +++ b/client/components/pullsIndex/pullsIndex.html @@ -0,0 +1,9 @@ + diff --git a/client/components/pullsIndex/pullsIndex.js b/client/components/pullsIndex/pullsIndex.js new file mode 100644 index 0000000..13cddf7 --- /dev/null +++ b/client/components/pullsIndex/pullsIndex.js @@ -0,0 +1,5 @@ +Template.pullsIndex.helpers({ + example: function() { + return 'https://github.com/' + this.user + '/' + this.project + '/issues'; + } +}); diff --git a/routes/routes.js b/routes/routes.js index 1cdbfb1..f9ceab7 100644 --- a/routes/routes.js +++ b/routes/routes.js @@ -5,3 +5,25 @@ Router.configure({ Router.route('/', function() { this.render('home'); }); + +Router.route('/:user/:project/issues', function() { + this.render('issuesIndex', { + data: function() { + return { + user: this.params.user, + project: this.params.project + } + } + }); +}); + +Router.route('/:user/:project/pulls', function() { + this.render('pullsIndex', { + data: function() { + return { + user: this.params.user, + project: this.params.project + } + } + }); +});