2013-04-14 14:51:37 +09:00
|
|
|
// Session variables
|
2012-12-11 10:47:11 +09:00
|
|
|
Session.set('initialLoad', true);
|
2013-10-12 12:24:41 +09:00
|
|
|
Session.set('today', new Date());
|
2013-10-12 13:01:16 +09:00
|
|
|
Session.set('view', 'top');
|
2013-11-16 17:44:33 +09:00
|
|
|
Session.set('postsLimit', getSetting('postsPerPage', 10));
|
2013-11-06 10:11:35 +09:00
|
|
|
Session.set('sessionId', Meteor.default_connection._lastSessionId);
|
2012-12-11 10:47:11 +09:00
|
|
|
|
2014-02-18 14:46:53 +09:00
|
|
|
STATUS_PENDING=1;
|
|
|
|
STATUS_APPROVED=2;
|
|
|
|
STATUS_REJECTED=3;
|
2013-02-18 13:38:15 +09:00
|
|
|
|
2014-05-09 11:05:33 +09:00
|
|
|
adminNav = adminNav.concat([
|
|
|
|
{
|
2014-05-09 15:55:50 +09:00
|
|
|
route: 'posts_pending',
|
2014-05-09 11:05:33 +09:00
|
|
|
label: 'Pending'
|
|
|
|
},
|
|
|
|
{
|
2014-05-09 15:55:50 +09:00
|
|
|
route: 'all-users',
|
2014-05-09 11:05:33 +09:00
|
|
|
label: 'Users'
|
|
|
|
},
|
|
|
|
{
|
2014-05-09 15:55:50 +09:00
|
|
|
route: 'settings',
|
2014-05-09 11:05:33 +09:00
|
|
|
label: 'Settings'
|
|
|
|
},
|
|
|
|
{
|
2014-05-09 15:55:50 +09:00
|
|
|
route: 'toolbox',
|
2014-05-09 11:05:33 +09:00
|
|
|
label: 'Toolbox'
|
|
|
|
}
|
|
|
|
]);
|
2013-11-05 12:44:13 +09:00
|
|
|
|
2014-07-06 14:09:55 +09:00
|
|
|
// Sort postModules array position using modulePositions as index
|
2014-07-14 10:12:02 +09:00
|
|
|
postModules = _.sortBy(postModules, function(module){return _.indexOf(modulePositions, module.position)});
|
|
|
|
|
|
|
|
postHeading = _.sortBy(postHeading, 'order');
|
|
|
|
|
2014-07-15 07:45:37 +09:00
|
|
|
postMeta = _.sortBy(postMeta, 'order');
|
|
|
|
|
|
|
|
Meteor.startup(function () {
|
|
|
|
$('#rss-link').attr('title', i18n.t('New Posts'));
|
|
|
|
});
|