mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-04 15:24:23 +01:00
139 lines
3.5 KiB
JavaScript
139 lines
3.5 KiB
JavaScript
/* eslint-disable
|
|
no-undef,
|
|
*/
|
|
// TODO: This file was created by bulk-decaffeinate.
|
|
// Fix any style issues and re-enable lint.
|
|
/*
|
|
* decaffeinate suggestions:
|
|
* DS102: Remove unnecessary code created because of implicit returns
|
|
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
|
*/
|
|
'use strict';
|
|
|
|
/**
|
|
* Navigation controller. List the links availables in the left navigation pane and their icon.
|
|
*/
|
|
Application.Controllers.controller('MainNavController', ['$scope', function ($scope) {
|
|
// Common links (public application)
|
|
$scope.navLinks = [
|
|
{
|
|
state: 'app.public.home',
|
|
linkText: 'app.public.common.home',
|
|
linkIcon: 'home'
|
|
},
|
|
|
|
{
|
|
state: 'app.public.machines_list',
|
|
linkText: 'app.public.common.reserve_a_machine',
|
|
linkIcon: 'cogs'
|
|
},
|
|
{
|
|
state: 'app.public.trainings_list',
|
|
linkText: 'app.public.common.trainings_registrations',
|
|
linkIcon: 'graduation-cap'
|
|
},
|
|
{
|
|
state: 'app.public.events_list',
|
|
linkText: 'app.public.common.events_registrations',
|
|
linkIcon: 'tags'
|
|
},
|
|
{
|
|
state: 'app.public.calendar',
|
|
linkText: 'app.public.common.public_calendar',
|
|
linkIcon: 'calendar'
|
|
},
|
|
{
|
|
state: 'app.public.projects_list',
|
|
linkText: 'app.public.common.projects_gallery',
|
|
linkIcon: 'th'
|
|
}
|
|
|
|
];
|
|
|
|
if (!Fablab.withoutPlans) {
|
|
$scope.navLinks.push({
|
|
state: 'app.public.plans',
|
|
linkText: 'app.public.common.subscriptions',
|
|
linkIcon: 'credit-card'
|
|
});
|
|
}
|
|
|
|
if (!Fablab.withoutSpaces) {
|
|
$scope.navLinks.splice(3, 0, {
|
|
state: 'app.public.spaces_list',
|
|
linkText: 'app.public.common.reserve_a_space',
|
|
linkIcon: 'rocket'
|
|
});
|
|
}
|
|
|
|
Fablab.adminNavLinks = Fablab.adminNavLinks || [];
|
|
const adminNavLinks = [
|
|
{
|
|
state: 'app.admin.trainings',
|
|
linkText: 'app.public.common.trainings_monitoring',
|
|
linkIcon: 'graduation-cap'
|
|
},
|
|
{
|
|
state: 'app.admin.calendar',
|
|
linkText: 'app.public.common.manage_the_calendar',
|
|
linkIcon: 'calendar'
|
|
},
|
|
{
|
|
state: 'app.admin.members',
|
|
linkText: 'app.public.common.manage_the_users',
|
|
linkIcon: 'users'
|
|
},
|
|
{
|
|
state: 'app.admin.invoices',
|
|
linkText: 'app.public.common.manage_the_invoices',
|
|
linkIcon: 'file-pdf-o'
|
|
},
|
|
{
|
|
state: 'app.admin.pricing',
|
|
linkText: 'app.public.common.subscriptions_and_prices',
|
|
linkIcon: 'money'
|
|
},
|
|
{
|
|
state: 'app.admin.events',
|
|
linkText: 'app.public.common.manage_the_events',
|
|
linkIcon: 'tags'
|
|
},
|
|
{
|
|
state: 'app.public.machines_list',
|
|
linkText: 'app.public.common.manage_the_machines',
|
|
linkIcon: 'cogs'
|
|
},
|
|
{
|
|
state: 'app.admin.project_elements',
|
|
linkText: 'app.public.common.manage_the_projects_elements',
|
|
linkIcon: 'tasks'
|
|
},
|
|
{
|
|
state: 'app.admin.statistics',
|
|
linkText: 'app.public.common.statistics',
|
|
linkIcon: 'bar-chart-o'
|
|
},
|
|
{
|
|
state: 'app.admin.settings',
|
|
linkText: 'app.public.common.customization',
|
|
linkIcon: 'gear'
|
|
},
|
|
{
|
|
state: 'app.admin.open_api_clients',
|
|
linkText: 'app.public.common.open_api_clients',
|
|
linkIcon: 'cloud'
|
|
}
|
|
].concat(Fablab.adminNavLinks);
|
|
|
|
$scope.adminNavLinks = adminNavLinks;
|
|
|
|
if (!Fablab.withoutSpaces) {
|
|
return $scope.adminNavLinks.splice(7, 0, {
|
|
state: 'app.public.spaces_list',
|
|
linkText: 'app.public.common.manage_the_spaces',
|
|
linkIcon: 'rocket'
|
|
});
|
|
}
|
|
}
|
|
]);
|