2015-05-05 03:10:25 +02:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
##
|
|
|
|
# Navigation controller. List the links availables in the left navigation pane and their icon.
|
|
|
|
##
|
2016-03-23 18:39:41 +01:00
|
|
|
Application.Controllers.controller "MainNavController", ["$scope", "$location", "$cookies", ($scope, $location, $cookies) ->
|
2015-05-05 03:10:25 +02:00
|
|
|
|
2016-03-23 18:39:41 +01:00
|
|
|
## Common links (public application)
|
2015-05-05 03:10:25 +02:00
|
|
|
$scope.navLinks = [
|
|
|
|
{
|
|
|
|
state: 'app.public.home'
|
2016-03-23 18:39:41 +01:00
|
|
|
linkText: 'home'
|
2015-05-05 03:10:25 +02:00
|
|
|
linkIcon: 'home'
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
state: 'app.public.machines_list'
|
2016-03-23 18:39:41 +01:00
|
|
|
linkText: 'reserve_a_machine'
|
2016-07-18 17:57:50 +02:00
|
|
|
linkIcon: 'cogs'
|
2016-03-23 18:39:41 +01:00
|
|
|
}
|
|
|
|
{
|
2016-07-13 18:15:14 +02:00
|
|
|
state: 'app.public.trainings_list'
|
2016-03-23 18:39:41 +01:00
|
|
|
linkText: 'trainings_registrations'
|
|
|
|
linkIcon: 'graduation-cap'
|
2015-05-05 03:10:25 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
state: 'app.public.events_list'
|
2016-06-28 11:42:20 +02:00
|
|
|
linkText: 'events_registrations'
|
2015-05-05 03:10:25 +02:00
|
|
|
linkIcon: 'tags'
|
|
|
|
}
|
2017-02-13 17:00:27 +01:00
|
|
|
{
|
|
|
|
state: 'app.public.spaces_list'
|
|
|
|
linkText: 'reserve_a_space'
|
|
|
|
linkIcon: 'rocket'
|
|
|
|
}
|
2016-07-13 19:12:16 +02:00
|
|
|
{
|
|
|
|
state: 'app.public.calendar'
|
|
|
|
linkText: 'public_calendar'
|
|
|
|
linkIcon: 'calendar'
|
|
|
|
}
|
2015-05-05 03:10:25 +02:00
|
|
|
{
|
|
|
|
state: 'app.public.projects_list'
|
2016-03-23 18:39:41 +01:00
|
|
|
linkText: 'projects_gallery'
|
2015-05-05 03:10:25 +02:00
|
|
|
linkIcon: 'th'
|
|
|
|
}
|
2016-03-23 18:39:41 +01:00
|
|
|
|
2015-05-05 03:10:25 +02:00
|
|
|
]
|
|
|
|
|
2016-03-23 18:39:41 +01:00
|
|
|
unless Fablab.withoutPlans
|
|
|
|
$scope.navLinks.push({
|
|
|
|
state: 'app.public.plans'
|
|
|
|
linkText: 'subscriptions'
|
|
|
|
linkIcon: 'credit-card'
|
|
|
|
})
|
|
|
|
|
|
|
|
|
2016-05-10 16:50:01 +02:00
|
|
|
Fablab.adminNavLinks = Fablab.adminNavLinks || []
|
2017-01-05 18:03:54 +01:00
|
|
|
adminNavLinks = [
|
2016-03-23 18:39:41 +01:00
|
|
|
{
|
|
|
|
state: 'app.admin.trainings'
|
|
|
|
linkText: 'trainings_monitoring'
|
|
|
|
linkIcon: 'graduation-cap'
|
|
|
|
}
|
|
|
|
{
|
|
|
|
state: 'app.admin.calendar'
|
|
|
|
linkText: 'manage_the_calendar'
|
|
|
|
linkIcon: 'calendar'
|
|
|
|
}
|
2015-05-05 03:10:25 +02:00
|
|
|
{
|
|
|
|
state: 'app.admin.members'
|
2016-03-23 18:39:41 +01:00
|
|
|
linkText: 'manage_the_users'
|
2015-05-05 03:10:25 +02:00
|
|
|
linkIcon: 'users'
|
|
|
|
}
|
2016-03-23 18:39:41 +01:00
|
|
|
{
|
|
|
|
state: 'app.admin.invoices'
|
|
|
|
linkText: 'manage_the_invoices'
|
|
|
|
linkIcon: 'file-pdf-o'
|
|
|
|
}
|
|
|
|
{
|
|
|
|
state: 'app.admin.pricing'
|
|
|
|
linkText: 'subscriptions_and_prices'
|
|
|
|
linkIcon: 'money'
|
|
|
|
}
|
2015-05-05 03:10:25 +02:00
|
|
|
{
|
|
|
|
state: 'app.admin.events'
|
2016-06-28 17:06:33 +02:00
|
|
|
linkText: 'manage_the_events'
|
2015-05-05 03:10:25 +02:00
|
|
|
linkIcon: 'tags'
|
|
|
|
}
|
|
|
|
{
|
|
|
|
state: 'app.public.machines_list'
|
2016-03-23 18:39:41 +01:00
|
|
|
linkText: 'manage_the_machines'
|
2015-05-05 03:10:25 +02:00
|
|
|
linkIcon: 'cogs'
|
|
|
|
}
|
2017-02-13 17:00:27 +01:00
|
|
|
{
|
|
|
|
state: 'app.public.spaces_list'
|
|
|
|
linkText: 'manage_the_spaces'
|
|
|
|
linkIcon: 'rocket'
|
|
|
|
}
|
2015-05-05 03:10:25 +02:00
|
|
|
{
|
|
|
|
state: 'app.admin.project_elements'
|
2016-03-23 18:39:41 +01:00
|
|
|
linkText: 'manage_the_projects_elements'
|
2015-05-05 03:10:25 +02:00
|
|
|
linkIcon: 'tasks'
|
|
|
|
}
|
2016-03-23 18:39:41 +01:00
|
|
|
{
|
|
|
|
state: 'app.admin.statistics'
|
|
|
|
linkText: 'statistics'
|
|
|
|
linkIcon: 'bar-chart-o'
|
|
|
|
}
|
|
|
|
{
|
|
|
|
state: 'app.admin.settings'
|
|
|
|
linkText: 'customization'
|
|
|
|
linkIcon: 'gear'
|
|
|
|
}
|
2016-05-09 18:15:04 +02:00
|
|
|
{
|
|
|
|
state: 'app.admin.open_api_clients'
|
|
|
|
linkText: 'open_api_clients'
|
|
|
|
linkIcon: 'cloud'
|
|
|
|
}
|
2016-05-10 16:50:01 +02:00
|
|
|
].concat(Fablab.adminNavLinks)
|
|
|
|
|
2017-01-05 18:03:54 +01:00
|
|
|
$scope.adminNavLinks = adminNavLinks
|
2015-05-05 03:10:25 +02:00
|
|
|
]
|