This repository was archived by the owner on Jul 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import marked from 'marked' ;
2- import Telescope from 'meteor/nova:lib' ;
32import Posts from "meteor/nova:posts" ;
43import Comments from '../collection.js' ;
54import Users from 'meteor/nova:users' ;
Original file line number Diff line number Diff line change 11import { SimpleSchema } from 'meteor/aldeed:simple-schema' ;
22
33/**
4- * @summary Kick off the global namespace for Telescope.
4+ * @summary Kick off the namespace for Telescope.
55 * @namespace Telescope
66 */
77
@@ -26,30 +26,4 @@ SimpleSchema.extendOptions({
2626 preload : Match . Optional ( Boolean ) ,
2727} ) ;
2828
29- // ------------------------------------- Statuses -------------------------------- //
30-
31- Telescope . statuses = [
32- {
33- value : 1 ,
34- label : 'pending'
35- } ,
36- {
37- value : 2 ,
38- label : 'approved'
39- } ,
40- {
41- value : 3 ,
42- label : 'rejected'
43- } ,
44- {
45- value : 4 ,
46- label : 'spam'
47- } ,
48- {
49- value : 5 ,
50- label : 'deleted'
51- }
52- ] ;
53-
54-
5529export default Telescope ;
Original file line number Diff line number Diff line change 1- import Telescope from 'meteor/nova:lib' ;
21import moment from 'moment' ;
32import Posts from './collection.js' ;
43import Users from 'meteor/nova:users' ;
@@ -78,7 +77,7 @@ Posts.getDefaultStatus = function (user) {
7877 * @param {Object } user
7978 */
8079Posts . getStatusName = function ( post ) {
81- return _ . findWhere ( Telescope . statuses , { value : post . status } ) . label ;
80+ return Utils . findWhere ( Posts . statuses , { value : post . status } ) . label ;
8281} ;
8382
8483/**
Original file line number Diff line number Diff line change 1- import Telescope from 'meteor/nova:lib' ; // TODO move Telescope.statuses elswhere
21import Users from 'meteor/nova:users' ;
32import Posts from './collection.js' ;
43
4+ /**
5+ * @summary Posts statuses
6+ * @type {Object }
7+ */
8+ Posts . statuses = [
9+ {
10+ value : 1 ,
11+ label : 'pending'
12+ } ,
13+ {
14+ value : 2 ,
15+ label : 'approved'
16+ } ,
17+ {
18+ value : 3 ,
19+ label : 'rejected'
20+ } ,
21+ {
22+ value : 4 ,
23+ label : 'spam'
24+ } ,
25+ {
26+ value : 5 ,
27+ label : 'deleted'
28+ }
29+ ] ;
30+
531/**
632 * @summary Posts config namespace
733 * @type {Object }
@@ -157,7 +183,7 @@ const schema = {
157183 } ,
158184 form : {
159185 noselect : true ,
160- options : Telescope . statuses ,
186+ options : Posts . statuses ,
161187 group : 'admin'
162188 } ,
163189 group : formGroups . admin
You can’t perform that action at this time.
0 commit comments