aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-05-07 10:13:01 +0200
committerDennis Eriksen <dennis.se@gmail.com>2013-05-07 10:13:01 +0200
commit27aa0c8aa78e4227bf20d13c5b85f9807e4c6fc0 (patch)
tree00667a43a0af8055b65419d95511185b30b65a11
parentchanged some wrong links (diff)
downloadDivid-27aa0c8aa78e4227bf20d13c5b85f9807e4c6fc0.tar.gz
adding post-page for projects
-rw-r--r--controllers/system.js7
-rw-r--r--routes.js4
-rw-r--r--views/projectPost.ejs55
3 files changed, 66 insertions, 0 deletions
diff --git a/controllers/system.js b/controllers/system.js
index a5e8f46..ed7958d 100644
--- a/controllers/system.js
+++ b/controllers/system.js
@@ -113,6 +113,13 @@ exports.postProjectParticipants = function(req, res) {
}
+exports.projectPost = function(req, res) {
+
+}
+
+exports.postProjectPost = function(req, res) {
+
+}
exports.newProject = function(req, res) {
res.render('newproject', { title: 'Nytt prosjekt', loggedin: true });
diff --git a/routes.js b/routes.js
index d597ae8..50d4cba 100644
--- a/routes.js
+++ b/routes.js
@@ -61,6 +61,10 @@ module.exports = function(app, passport, auth) {
app.get('/project/:short', auth.requiresLogin, system.project);
+ app.get('/project/:short/post', auth.requiresLogin, system.projectPost);
+
+ app.post('/project/:short/post', auth.requiresLogin, system.postProjectPost);
+
app.get('/project/:short/participants', auth.requiresLogin, system.projectParticipants);
app.post('/project/:short/participants', auth.requiresLogin, system.postProjectParticipants);
diff --git a/views/projectPost.ejs b/views/projectPost.ejs
new file mode 100644
index 0000000..3af9c10
--- /dev/null
+++ b/views/projectPost.ejs
@@ -0,0 +1,55 @@
+<% include header %>
+
+</head>
+<body>
+ <% include navbar %>
+
+ <!-- Wrapper
+ ================================================== -->
+ <div class="container" id="wrapper">
+ <div class="row-fluid">
+
+
+ <form class="form-horizontal" method="post">
+ <fieldset>
+
+ <h1><legend><%= title %></legend></h1>
+ <p>Her kan du invitere venner til å delta i prosjektet ditt. Skriv inn eposadressene deres, en på hver linje, i tekstboksen under.</p>
+ <div class="control-group">
+ <label class="control-label">Epostadresser</label>
+ <div class="controls">
+ <textarea id="emails" name="emails" class="span6"></textarea>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label">Beskrivelse</label>
+ <div class="controls">
+ <textarea id="description" name="description" class="span6">Hei! Jeg har oppdaget et nytt og kult program... Bla bla bla. Stian og Erling fixes.</textarea>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label"></label>
+ <div class="controls">
+ <button type="submit" id="button1id" name="button1id" class="btn btn-primary">Inviter</button>
+ <button type="reset" id="button2id" name="button2id" class="btn">Nullstill</button>
+ </div>
+ </div>
+
+ </fieldset>
+ </form>
+
+
+
+
+
+
+
+ </div><!-- /div.row -->
+ </div><!-- /div.#wrapper -->
+
+
+<% include footer %>
+</body>
+</html>