Beispiel #1
0
		action: function(params, queryParams) {
			BlazeLayout.render("mainLayout", {
				main: "kitbagView",
				nav: "navigation",
				footer: "globalFooter"
			});
		}
 action: function() {
   BlazeLayout.render("layout", {
     header: "header",
     main: "documentEdit",
     footer: "footer"
   })
 },
Beispiel #3
0
	function addRoute(newRoute, router) {
		if (router == null) {
			router = FlowRouter;
		}
		const routeConfig = {
			center: 'pageContainer',
			pageTemplate: newRoute.pageTemplate,
		};
		if (newRoute.i18nPageTitle != null) {
			routeConfig.i18nPageTitle = newRoute.i18nPageTitle;
		}
		if (newRoute.pageTitle != null) {
			routeConfig.pageTitle = newRoute.pageTitle;
		}
		return router.route(newRoute.path, {
			name: newRoute.name,
			action() {
				Session.set('openedRoom');
				return BlazeLayout.render('main', routeConfig);
			},
			triggersEnter: [
				function() {
					if (newRoute.sideNav != null) {
						SideNav.setFlex(newRoute.sideNav);
						return SideNav.openFlex();
					}
				},
			],
		});
	}
Beispiel #4
0
 customPageWithBlogTags = (obj) => {
   if (Meteor.isClient) {
     const templateName = RouteUtils.getTemplate(obj.routeName);
     const tmpl = Template[templateName];
     const blogpostIndex = require('../app/blog/client/lib/collections').blogpostIndex;
     if (tmpl) {
       tmpl.helpers({
         post: () => blogpostIndex.find({}, {limit: 5})
       });
     }
   }
   FlowRouter.route(obj.path, {
     name: obj.routeName,
     triggersEnter: [() => Meteor.call("checkTumblr")],
     action() {
       BlazeLayout.render("main", {
         header: "header",
         footer: "footer",
         body: RouteUtils.getTemplate(obj.routeName)
       });
     },
     subscriptions() {
       this.register("posts",
         Meteor.subscribe("blogpostIndex", 1, obj.tags[0]));
     }
   });
 };
Beispiel #5
0
		action: function(params, queryParams) {
			/*console.log("Route: Users > Create User (Create New Org User)", params, queryParams);*/
			BlazeLayout.render("mainLayout", {
			main: "userAdd",
			nav: "navigation",
			footer: "globalFooter"
			});
		}
Beispiel #6
0
		action: function(params, queryParams) {
			/*console.log("Route: Admin (dashboard)", params, queryParams);*/
			BlazeLayout.render("mainLayout", {
				main: "dashboard",
				nav: "navigation",
				footer: "globalFooter"
			});
		}
Beispiel #7
0
		action: function(params, queryParams) {
			/*console.log("Route: Profile > Settings (My Settings)", params, queryParams);*/
			BlazeLayout.render("mainLayout",{
				main: "settings",
				nav: "navigation",
				footer: "globalFooter"
			});
		}
Beispiel #8
0
		action: function(params, queryParams) {
			/*console.log("Route: Profile > about (About KitbagPro", params, queryParams);*/
			BlazeLayout.render("mainLayout",{
				main: "about",
				nav: "navigation",
				footer: "globalFooter"
			});
		}
Beispiel #9
0
			action: function(params, queryParams) {
				//console.log("Route: Orgs > View (Org Profile View)", params, queryParams);
				BlazeLayout.render("mainLayout", {
					main: "orgView",
					nav: "navigation",
					footer: "globalFooter"
				});
			}
Beispiel #10
0
			action: function(params, queryParams) {
				//console.log("Route: Organisations > Org List (Org List)", params, queryParams);
				BlazeLayout.render("mainLayout", {
					main: "orgList",
					nav: "navigation",
					footer: "globalFooter"
				});
			}
Beispiel #11
0
		action: function(params, queryParams) {
			/*console.log("Route: Users > N/A (User Profile Edit)", params, queryParams);*/
			BlazeLayout.render("mainLayout", {
			main: "userEdit",
			nav: "navigation",
			footer: "globalFooter"
			});
		}
Beispiel #12
0
		action: function(params, queryParams) {
			// console.log("Route: Page not known / not found!", params, queryParams);
			BlazeLayout.render("mainLayout", {
				main: "routeNotFound",
				nav: "navigation",
				footer: "globalFooter"
			});
		}
Beispiel #13
0
		action: function(params, queryParams) {
			//console.log("Route: Loading... (Test 'Loading' template)", params, queryParams);
			BlazeLayout.render("mainLayout", {
				main: "loading",
				nav: "navigation",
				footer: "globalFooter"
			});
		}
Beispiel #14
0
		action: function(params, queryParams) {
			/*console.log("Route: Equipment > N/A (Item Edit)", params, queryParams);*/
			BlazeLayout.render("mainLayout", {
				main: "userDuplicate",
				nav: "navigation",
				footer: "globalFooter"
			});
		}
Beispiel #15
0
		action: function(params, queryParams) {
			/*console.log("Route: Equipment > N/A (Create New Item)", params, queryParams);*/
			BlazeLayout.render("mainLayout", {
				main: "itemAdd",
				nav: "navigation",
				footer: "globalFooter"
			});
		}
Beispiel #16
0
		action: function(params, queryParams) {
			/*console.log("Route: Equipment > List of Items (Item List)", params, queryParams);*/
			BlazeLayout.render("mainLayout", {
				main: "itemList",
				nav: "navigation",
				footer: "globalFooter"
			});
		}
    doIfLoggedIn(() => {
      let parent = Session.get('parent')

      if (parent !== 'settings') {
        Session.set('parent', 'project.details')
        Session.set('target', null)
      }

      BlazeLayout.render('mainLayout', { content: 'shifts' })
    })
Beispiel #18
0
		action: function(params, queryParams) {
			// console.log("Route: Page not known / not found!", params, queryParams);
			BlazeLayout.render("mainLayout", {
				main: "accessRestricted",
				nav: "navigation",
				footer: "globalFooter"
			},{
				blockedUrl: FlowRouter.current().path,
				referrerUrl: document.referrer
			});
		}
Beispiel #19
0
 Meteor.call("userIsInRole", Meteor.userId(), "admin", (error, isAdmin) => {
   if(error) {
     return FlowRouter.go('login');
   }
   if(isAdmin) {
     BlazeLayout.render('MasterLayout', {yield: "editOrganization"});
   } else {
     FlashMessages.sendError("You are not authorized to view this page.");
     return FlowRouter.go('harvests');
   }
 });
Beispiel #20
0
Meteor.startup(function () {
  BlazeLayout.setRoot('body')

  TimeSync.loggingEnabled = false

  Tracker.autorun((tracker) => {
    try {
      UserStatus.startMonitor({ threshold: 30000 })
      tracker.stop()
    } catch (e) { }
  })
})
Beispiel #21
0
const customPage = (obj) => {
  FlowRouter.route(obj.path, {
    name: obj.routeName,
    action() {
      BlazeLayout.render("main", {
        header: "header",
        footer: "footer",
        body: getTemplate(obj.routeName) || "error404"
      });
    }
  });
}
Beispiel #22
0
async function renderAdmin(uiData) {
  BlazeLayout.render('uiController', {
    default: {
      template: 'app',
      header: 'header',
      main: 'atForm',
      state: 'signIn',
      footer: 'footer'
    },
    loggedIn: {
      main: 'notFound'
    },
    isInRole: [
      {
        roles: ['admin'],
        ...uiData
      }
    ]
  })
}
Beispiel #23
0
this.roomExit = function() {
	// 7370 - Close flex-tab when opening a room on mobile UI
	if (window.matchMedia('(max-width: 500px)').matches) {
		const flex = document.querySelector('.flex-tab');
		if (flex) {
			const templateData = Blaze.getData(flex);
			templateData && templateData.tabBar && templateData.tabBar.close();
		}
	}
	RocketChat.callbacks.run('roomExit');
	BlazeLayout.render('main', {
		center: 'none',
	});

	if (typeof currentTracker !== 'undefined') {
		currentTracker.stop();
	}
	const mainNode = document.querySelector('.main-content');
	if (mainNode == null) {
		return;
	}
	return Array.from(mainNode.children).forEach((child) => {
		if (child == null) {
			return;
		}
		if (child.classList.contains('room-container')) {
			const wrapper = child.querySelector('.messages-box > .wrapper');
			if (wrapper) {
				if (wrapper.scrollTop >= wrapper.scrollHeight - wrapper.clientHeight) {
					child.oldScrollTop = 10e10;
				} else {
					child.oldScrollTop = wrapper.scrollTop;
				}
			}
		}
		mainNode.removeChild(child);
	});
};
Beispiel #24
0
import { Meteor } from 'meteor/meteor';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';
import { t } from 'meteor/rocketchat:utils';

FlowRouter.route('/admin/integrations', {
	name: 'admin-integrations',
	subscriptions() {
		this.register('integrations', Meteor.subscribe('integrations'));
	},
	action() {
		return BlazeLayout.render('main', {
			center: 'integrations',
			pageTitle: t('Integrations'),
		});
	},
});

FlowRouter.route('/admin/integrations/new', {
	name: 'admin-integrations-new',
	subscriptions() {
		this.register('integrations', Meteor.subscribe('integrations'));
	},
	action() {
		return BlazeLayout.render('main', {
			center: 'integrationsNew',
			pageTitle: t('Integration_New'),
		});
	},
});
Beispiel #25
0
import { FlowRouter } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';

import '../../../client/layouts/default.js';
import '../../../client/templates/globals/not-found.js';

FlowRouter.notFound = {
  action() {
    BlazeLayout.render( 'default', { yield: 'notFound' } );
  }
};
Beispiel #26
0
import { FlowRouter } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';

import '../../ui/layout/layout.js';
import '../../ui/home/home.js';
import "../../ui/login/login.js";
import "../../ui/register/register.js";
import "../../ui/playlist/playlist.js";

document.title = "ScratchThat";

FlowRouter.route('/', {
	name: 'home',
	action() {
		BlazeLayout.render('layout', { main: 'home' });
	}
});

FlowRouter.route('/login', {
	name: 'login',
	action() {
		BlazeLayout.render('layout', { main: 'login' });
	}
});

FlowRouter.route('/register', {
	name: 'register',
	action() {
		BlazeLayout.render('layout', { main: 'register' });
	}
});
Beispiel #27
0
import '../../ui/pages/deal/deal.js';
import '../../ui/pages/rental/rental.js';
import '../../ui/pages/around/around.js';
import '../../ui/pages/gallery/gallery.js';
import '../../ui/pages/event/event.js';
import '../../ui/pages/direction/direction.js';
import '../../ui/pages/dashboard/dashboard.js';
import '../../ui/pages/home/home.js';
import '../../ui/pages/book/book.js';
import '../../ui/accounts/accounts-templates.js';

FlowRouter.route('/', {
  name: 'App.home',

  action() {
    BlazeLayout.render('app_content', { wrapper: 'app_home' });
  },
});

FlowRouter.route('/chambres', {
  name: 'App.chambres',
  action() {
    BlazeLayout.render('app_content', { wrapper: 'app_room' });
  },
});

FlowRouter.route('/restaurant/menu', {
  name: 'App.restaurant.menu',
  action() {
    BlazeLayout.render('app_content', { wrapper: 'app_restaurant_menu' });
  },
Beispiel #28
0
import { Meteor } from 'meteor/meteor';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';

FlowRouter.route('/admin/emoji-custom', {
	name: 'emoji-custom',
	subscriptions(/* params, queryParams*/) {
		this.register('EmojiCustom', Meteor.subscribe('EmojiCustom'));
	},
	action(/* params*/) {
		BlazeLayout.render('main', { center: 'adminEmoji' });
	},
});
Beispiel #29
0
/* Copyright 2017 Apinf Oy
This file is covered by the EUPL license.
You may obtain a copy of the licence at
https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11 */

// Meteor packages imports
import { BlazeLayout } from 'meteor/kadira:blaze-layout';
import { FlowRouter } from 'meteor/kadira:flow-router';

FlowRouter.route('/documentation/editor', {
  name: 'apiDocumentationEditor',
  action () {
    BlazeLayout.render('masterLayout', { bar: 'navbar', main: 'apiDocumentationEditor' });
  },
});
Beispiel #30
0
import {FlowRouter} from 'meteor/kadira:flow-router';
import {BlazeLayout} from 'meteor/kadira:blaze-layout';

import '../../../../../ui/layout';

import '../../../../../ui/rea/profile/index';

FlowRouter.route('/profile', {
    name: 'rea.profile.index',
    action() {
        BlazeLayout.render('layout', {page: 'rea.profile'});
    }
});