diff --git a/app/models/article.js b/app/models/article.js index ee3151d..e5da210 100644 --- a/app/models/article.js +++ b/app/models/article.js @@ -7,10 +7,11 @@ module.exports = function(sequelize, DataTypes) { content: DataTypes.TEXT, isPrivate: DataTypes.BOOLEAN, + school: DataTypes.STRING, date: DataTypes.DATE, time: DataTypes.TIME, location: DataTypes.STRING, - catogory: DataTypes.STRING, + category: DataTypes.STRING, rewardCoins: DataTypes.INTEGER diff --git a/public/css/common.css b/public/css/common.css index 582c311..bfa36fb 100644 --- a/public/css/common.css +++ b/public/css/common.css @@ -30,4 +30,22 @@ footer p { width: 10%; border-radius: 50%; +} + + +ul#list{ + padding: 0%; +} + +ul#list li{ + + width: 30%; + margin-top:3%; + margin-left:3%; + display: inline-block; +} + +.article{ + border-style: ridge; + height: 50%; } \ No newline at end of file diff --git a/public/js/app.js b/public/js/app.js index de77637..e81a02e 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1,4 +1,4 @@ -angular.module('mean', ['ngCookies', 'ngResource', 'ngRoute', 'ui.bootstrap', 'ui.route', 'mean.system', 'mean.articles','mean.users']); +angular.module('mean', ['ngCookies', 'ngResource', 'ngRoute', 'ui.bootstrap', 'ui.route', 'mean.system', 'mean.articles', 'mean.users']); angular.module('mean.system', []); angular.module('mean.articles', []); diff --git a/public/js/controllers/articles.js b/public/js/controllers/articles.js index b74bf21..d33f543 100644 --- a/public/js/controllers/articles.js +++ b/public/js/controllers/articles.js @@ -5,8 +5,14 @@ angular.module('mean.articles').controller('ArticlesController', ['$scope', '$ro $scope.create = function() { var article = new Articles({ + school: this.school, title: this.title, content: this.content, + rewardCoins: this.rewardCoins, + category: this.category, + location: this.location, + date: this.date, + time: this.time, isPrivate: $scope.theBoolean }); diff --git a/public/js/controllers/index.js b/public/js/controllers/index.js index 67e92ec..77b2132 100644 --- a/public/js/controllers/index.js +++ b/public/js/controllers/index.js @@ -1,4 +1,3 @@ -//angular.module('mean.articles').controller('IndexController', ['$scope', '$location', 'Global', 'Users',function ($scope, $location, Global, Users) { angular.module('mean.system').controller('IndexController', ['$scope', 'Global', function ($scope, Global) { $scope.global = Global; diff --git a/public/js/controllers/users.js b/public/js/controllers/users.js new file mode 100644 index 0000000..93ae9d7 --- /dev/null +++ b/public/js/controllers/users.js @@ -0,0 +1,4 @@ +angular.module('mean.users').controller('UsersController', ['$scope', 'Global', 'Users',function ($scope, Global, Users) { + + + }]); \ No newline at end of file diff --git a/public/views/articles/create.html b/public/views/articles/create.html index 4d3874f..4cd6622 100644 --- a/public/views/articles/create.html +++ b/public/views/articles/create.html @@ -13,6 +13,43 @@ + +

Hosted by {{article.User.name}}
+
+
200
+
100
+
300
+
500
+
200
-
-
+
150
+
350
+
300