diff --git a/modules/forums/client/controllers/forums-post.client.controller.js b/modules/forums/client/controllers/forums-post.client.controller.js new file mode 100644 index 00000000..c7669ba8 --- /dev/null +++ b/modules/forums/client/controllers/forums-post.client.controller.js @@ -0,0 +1,36 @@ +(function () { + 'use strict'; + + angular + .module('forums') + .controller('ForumsPostController', ForumsPostController); + + ForumsPostController.$inject = ['$scope', '$state', '$translate', 'Authentication', 'MeanTorrentConfig', 'ForumsService', 'SideOverlay', '$filter', 'NotifycationService', + 'marked', 'ModalConfirmService', '$stateParams', 'TopicsService']; + + function ForumsPostController($scope, $state, $translate, Authentication, MeanTorrentConfig, ForumsService, SideOverlay, $filter, NotifycationService, + marked, ModalConfirmService, $stateParams, TopicsService) { + var vm = this; + vm.forumsConfig = MeanTorrentConfig.meanTorrentConfig.forumsConfig; + vm.user = Authentication.user; + + /** + * init + */ + vm.init = function () { + // get forum info by state params + ForumsService.get({ + forumId: $stateParams.forumId + }, function (item) { + console.log(item); + vm.forum = item; + + vm.forumPath = [ + {name: vm.forum.name, state: 'forums.view', params: {forumId: vm.forum._id}}, + {name: 'Post New Topic', state: undefined} + ]; + }); + + }; + } +}()); diff --git a/modules/forums/client/views/post.client.view.html b/modules/forums/client/views/post.client.view.html new file mode 100644 index 00000000..9875aa8c --- /dev/null +++ b/modules/forums/client/views/post.client.view.html @@ -0,0 +1,36 @@ +
+
+
+
+ +
+
+ +
+
+
+ +
+ + +
+
\ No newline at end of file