(function () { 'use strict'; var app = angular.module('app'); // Collect the routes app.constant('routes', getRoutes()); // Configure the routes and route resolvers app.config(['$routeProvider', 'routes', routeConfigurator]); function routeConfigurator($routeProvider, routes) { routes.forEach(function (r) { $routeProvider.when(r.url, r.config); }); $routeProvider.otherwise({ redirectTo: '/' }); } // Define the routes function getRoutes() { return [ //sigin route { url: '/', config: { templateUrl: 'app/templates/blank.html', title: 'blank', settings: { nav: null, navEntry: 'blank', content: 'blank', auth: 0 } } }, //sigin route { url: '/overview', config: { templateUrl: 'app/overview/overview.html', title: 'overview', settings: { nav: null, navEntry: 'overview', content: 'overview', auth: 0 } } }, //sigin route { url: '/dashboard', config: { templateUrl: 'app/dashboard/dashboard.html', title: 'dashboard', settings: { nav: null, navEntry: 'dashboard', content: 'dashboard', auth: 0 } } }, //sigin route { url: '/options', config: { templateUrl: 'app/signin/options.html', title: 'options', settings: { nav: null, navEntry: 'options', content: 'options', auth: 0 } } }, //badge backpack route { url: '/backpack', config: { title: 'badgebackpack', templateUrl: 'app/backpack/backpack.html', settings: { nav: 0, navEntry: 'adminreporting', content: 'Badge Backpack', auth: 1 } } }, { url: '/collections', config: { title: 'collections', templateUrl: 'app/collections/collections.html', settings: { nav: 0, navEntry: 'adminreporting', content: 'Badge Collections', auth: 1 } } }, { url: '/customise', config: { title: 'customise', templateUrl: 'app/customise/customise.html', settings: { nav: 0, navEntry: 'adminreporting', content: 'Badge Collections', auth: 1 } } }, { url: '/deleted', config: { title: 'deleted', templateUrl: 'app/deleted/deleted.html', settings: { nav: 0, navEntry: 'deleted', content: 'Deleted badges', auth: 1 } } }, { url: '/badge', config: { title: 'Badge', templateUrl: 'app/viewbadge/viewbadge.html', settings: { nav: null, content: 'Sign Out', auth: 1 } } }, { url: '/rules/manage', config: { title: 'Rules', templateUrl: 'app/rulesadmin/managerule.html', settings: { nav: null, content: 'Rules', auth: 1 } } }, { url: '/signin', config: { templateUrl: 'app/signin/signin.html', title: 'signin', settings: { nav: null, navEntry: 'signin', content: 'SignIn', auth: 0 } } }, { url: '/signin/failed', config: { templateUrl: 'app/signin/signin.html', title: 'signin', settings: { nav: null, navEntry: 'signin', content: 'SignIn', auth: 0 } } }, //register as a new user route { url: '/register', config: { templateUrl: 'app/register/register.html', title: 'register', settings: { nav: null, navEntry: 'register', content: 'Register', auth: 0 } } }, //user settings route { url: '/settings', config: { title: 'settings', templateUrl: 'app/settings/settings.html', settings: { nav: null, navEntry:'settings', content: 'Personal Settings', auth: 1 } } }, { url: '/backpack', config: { title: 'badgebackpack', templateUrl: 'app/backpack/backpack.html', settings: { nav: 0, navEntry: 'adminreporting', content: 'Badge Backpack', auth: 1 } } }, { url: '/collections', config: { title: 'collections', templateUrl: 'app/collections/collections.html', settings: { nav: 0, navEntry: 'adminreporting', content: 'Badge Collections', auth: 1 } } }, { url: '/customise', config: { title: 'customise', templateUrl: 'app/customise/customise.html', settings: { nav: 0, navEntry: 'adminreporting', content: 'Badge Collections', auth: 1 } } }, //membership route { url: '/organisations/:organisationId?', config: { title: 'Organisations', templateUrl: 'app/organisations/organisations.html?version=191217', settings: { nav: 0, navEntry: 'membership', content: 'Membership', auth: 1, role: 'users_organisations_access' } } }, //users route { url: '/users', config: { title: 'users', templateUrl: 'app/users/users.html?version=191217', settings: { nav: 0, navEntry: 'users', content: 'Users', auth: 1, role: 'users_users_access' } } }, { url: '/users/:organisationId', config: { title: 'Organisations/Groups users', templateUrl: 'app/users/users.html?version=191217', settings: { nav: 0, navEntry: ' Organisations/Groupsusers', content: 'Organisations/Groups Users', auth: 1, role: 'users_users_access' } } }, { url: '/users/:organisationId/:userId/profile', config: { title: 'Organisations/Groups users', templateUrl: 'app/users/profile.html?version=191217', settings: { nav: 0, navEntry: ' Organisations/Groupsusers', content: 'Organisations/Groups Users', auth: 1, role: 'users_users_access' } } }, { url: '/users/:organisationId/:userId/edit', config: { title: 'Organisations/Groups users', templateUrl: 'app/users/edit.html?version=191217', settings: { nav: 0, navEntry: ' Organisations/Groups users', content: 'Organisations/Groups Users', auth: 1, role: 'users_users_access' } } }, { url: '/user/:userId/profile', config: { title: 'Profile', templateUrl: 'app/users/profile.html?version=191217', settings: { nav: 0, navEntry: 'users', content: 'Profile', auth: 1 } } }, { url: '/user/:userId/edit', config: { title: 'Edit user', templateUrl: 'app/users/edit.html?version=191217', settings: { nav: 0, navEntry: 'edit', content: 'Edit user', auth: 1 } } }, { url: '/createuser/:organisationId?', config: { title: 'Create user', templateUrl: 'app/users/create.html?version=191217', settings: { nav: 0, navEntry: 'Create', content: 'Create user', auth: 1 } } }, //branding route { url: '/branding', config: { title: 'branding', templateUrl: 'app/branding/branding.html', settings: { nav: 0, navEntry: 'branding', content: 'Branding', auth: 1 }, } }, //landing page route { url: '/landing', config: { title: 'landingpage', templateUrl: 'app/landingpage/landingpage.html', settings: { nav: 0, navEntry: 'landingpage', content: 'Landing page', auth: 1 }, } }, //badge reporting route { url: '/reporting/summary', config: { title: 'badgereporting', templateUrl: 'app/reporting/summary.html', settings: { nav: 0, navEntry: 'adminreporting', content: 'Badge reporting summary', auth: 1 } } }, { url: '/reporting/detail', config: { title: 'badgereporting', templateUrl: 'app/reporting/detail.html', settings: { nav: 0, navEntry: 'adminreporting', content: 'Badge reporting details', auth: 1 } } }, { url: '/reporting/claims', config: { title: 'badgereporting', templateUrl: 'app/reporting/claims.html', settings: { nav: 0, navEntry: 'adminreporting', content: 'Badge reporting claims', auth: 1 } } }, { url: '/reporting/recipients', config: { title: 'badgereporting', templateUrl: 'app/reporting/users.html', settings: { nav: 0, navEntry: 'adminreporting', content: 'Badge reporting users', auth: 1 } } }, { url: '/reporting/social', config: { title: 'badgereporting', templateUrl: 'app/reporting/social.html', settings: { nav: 0, navEntry: 'adminreporting', content: 'Badge reporting social', auth: 1 } } }, { url: '/rules', config: { title: 'rulesadmin', templateUrl: 'app/rulesadmin/rules.html', settings: { nav: null, content: 'Rules', auth: 1 } } }, //developerkey route { url: '/key', config: { title: 'key', templateUrl: 'app/developerkey/developerkey.html', settings: { nav: 0, navEntry: 'developerkey', content: 'Developerkey', auth: 1 }, } }, { url: '/issuers', config: { title: 'issuers', templateUrl: 'app/issuers/issuers.html', settings: { nav: 0, navEntry: 'issuers', content: 'Badge Issuers', auth: 1 } } }, { url: '/discovery', config: { title: 'discovery', templateUrl: 'app/discovery/discovery.html', settings: { nav: 0, navEntry: 'discovery', content: 'Badge Discovery', auth: 1 } } }, { url: '/claims', config: { title: 'claims', templateUrl: 'app/claims/manage.html', settings: { nav: 0, navEntry: 'claims', content: 'Badge Claims', auth: 1 } } }, { url: '/claims/review', config: { title: 'reviewclaims', templateUrl: 'app/claims/review.html', settings: { nav: 0, navEntry: 'claims', content: 'Review Claims', auth: 1 } } }, { url: '/claims/review/:claimId', config: { title: 'reviewclaim', templateUrl: 'app/claims/reviewclaim.html', settings: { nav: 0, navEntry: 'claims', content: 'Review Claim', auth: 1 } } }, { url: '/graphics', config: { title: 'graphics', templateUrl: 'app/badges/graphics.html', settings: { nav: 0, navEntry: 'graphics', content: 'Badge Graphics', auth: 1 } } }, { url: '/badges', config: { title: 'badges', templateUrl: 'app/badges/badges.html', settings: { nav: 0, navEntry: 'badges', content: 'Badges', auth: 1 } } }, { url: '/issue/:issueType', config: { title: 'issue', templateUrl: 'app/badges/issue.html', settings: { nav: 0, navEntry: 'issue', content: 'Issue', auth: 1 } } }, { url: '/issue/:issueType/badge/:templateId', config: { title: 'issue badge', templateUrl: 'app/badges/issuebadge.html', settings: { nav: 0, navEntry: 'issue badge', content: 'Issue badge', auth: 1 } } }, { url: '/templates', config: { title: 'Email templates', templateUrl: 'app/emailtemplates/templates.html', settings: { nav: 0, navEntry: 'Email templates', content: 'Email templates', auth: 1 } } }, { url: '/templates/manage', config: { title: 'Manage template', templateUrl: 'app/emailtemplates/managetemplate.html', settings: { nav: 0, navEntry: 'Manage template', content: 'Manage template', auth: 1 } } }, { url: '/signout', config: { title: 'Sign Out', templateUrl: 'app/account/signout.html', settings: { nav: null, content: 'Sign Out', auth: 1 } } }, { url: '/help', config: { title: 'Help', templateUrl: 'app/help/help.html', settings: { nav: null, content: 'Help' } } }, { url: '/roles', config: { title: 'Custom roles', templateUrl: 'app/roles/roles.html?version=191217', settings: { nav: null, content: 'Custom roles', auth: 1, role: 'manage_roles' } } }, { url: '/roles/manage/:appCode?', config: { title: 'Manage custom role', templateUrl: 'app/roles/managerole.html?version=191217', settings: { nav: null, content: 'Manage custom role', auth: 1, role: 'manage_roles' } } }, { url: '/subscription/details', config: { title: 'Subscriptions', templateUrl: 'app/subscriptions/details.html?version=191217', settings: { nav: null, content: 'Subscriptions', auth: 1, role: 'manage_subscriptions' } } }, { url: '/subscription/upgrade', config: { title: 'Subscriptions', templateUrl: 'app/subscriptions/subscriptions.html?version=191217', settings: { nav: null, content: 'Subscriptions', auth: 1, role: 'manage_subscriptions' } } }, { url: '/subscription/upgrade/:planId?', config: { title: 'Upgrade', templateUrl: 'app/subscriptions/upgrade.html?version=191217', settings: { nav: null, content: 'Subscriptions', auth: 1, role: 'manage_subscriptions' } } }, { url: '/premiumfeature', config: { title: 'premiumfeature', templateUrl: 'app/subscriptions/premium.html', settings: { nav: 0, navEntry: 'premiumfeature', content: 'Premium feature', auth: 1 } } }, { url: '/myclaims/:claim?', config: { title: 'My claims', templateUrl: 'app/myclaims/myclaims.html', settings: { nav: 0, navEntry: 'myclaims', content: 'My claims', auth: 1 } } }, { url: '/claim/id/:claimId?', config: { title: 'claim badge', templateUrl: 'app/claim/claim.html', settings: { nav: 0, navEntry: 'claimbadge', content: 'Claim badge', auth: 1 } } }, { url: '/claim/code/:claimCode?', config: { title: 'claim badge', templateUrl: 'app/claim/claim.html', settings: { nav: 0, navEntry: 'claimbadge', content: 'Claim badge', auth: 1 } } }, { url: '/claim/badge/:badgeId?', config: { title: 'claim badge', templateUrl: 'app/claim/claim.html', settings: { nav: 0, navEntry: 'claimbadge', content: 'Claim badge', auth: 1 } } }, { url: '/discover', config: { title: 'discover', templateUrl: 'app/discover/discover.html', settings: { nav: 0, navEntry: 'discover', content: 'Discover', auth: 1 } } } ]; } })();