05-27-2015 11:17 AM
05-29-2015 01:54 AM
function generateAppItems() {
//New header tabs are added and linked with respective sites
var appItems = [
{
id: "HEADER_HOME",
name: "alfresco/menus/AlfMenuBarItem",
config: {
id: "HEADER_HOME",
label: "header.menu.home.label",
targetUrl: "site/home/dashboard"
}
},
{
id: "HEADER_HR_DESK",
name: "alfresco/menus/AlfMenuBarItem",
config: {
id: "HEADER_HR_DESK",
label: "header.menu.hrdesk.label",
targetUrl: "site/hr-desk/dashboard"
}
},
{
id: "HEADER_Mobility_Desk",
name: "alfresco/menus/AlfMenuBarItem",
config: {
id: "HEADER_Mobility_Desk",
label: "header.menu.monilityedesk.label",
targetUrl: "site/mobility-desk/dashboard"
}
},
{
id: "HEADER_Finance_Desk",
name: "alfresco/menus/AlfMenuBarItem",
config: {
id: "HEADER_Finance_Desk",
label: "header.menu.financedesk.label",
targetUrl: "site/finance-desk/dashboard"
}
},
{
id: "HEADER_GALLERY",
name: "alfresco/menus/AlfMenuBarItem",
config: {
id: "HEADER_GALLERY",
label: "header.menu.gallery.label",
targetUrl: "site/gallery/dashboard"
}
},
{
id: "HEADER_LEAP",
name: "alfresco/menus/AlfMenuBarItem",
config: {
id: "HEADER_LEAP",
label: "header.menu.leap.label",
targetUrl: "site/leap/dashboard"
}
},
{
id: "HEADER_ISMS",
name: "alfresco/menus/AlfMenuBarItem",
config: {
id: "HEADER_ISMS",
label: "header.menu.isms.label",
targetUrl: "site/isms/dashboard"
}
},
{
id: "HEADER_TASKS",
name: "alfresco/header/AlfMenuBarPopup",
config: {
id: "HEADER_TASKS",
label: "header.menu.tasks.label",
widgets: [
{
name: "alfresco/menus/AlfMenuGroup",
config: {
widgets: [
{
id: "HEADER_MY_TASKS",
name: "alfresco/header/AlfMenuItem",
config:
{
id: "HEADER_MY_TASKS",
label: "header.menu.mytasks.label",
iconClass: "alf-mytasks-icon",
targetUrl: "my-tasks#filter=workflows|active"
}
},
]
}
}
]
}
},
];
appItems.push({
id: "HEADER_SITES_MENU",
name: "alfresco/header/AlfSitesMenu",
config: {
id: "HEADER_SITES_MENU",
label: "header.menu.sites.label",
currentSite: page.url.templateArgs.site,
currentUser: user.name
}
});
//if (user.isAdmin || showRepositoryLink == "true")
//Added if condition so that only admin has permissions over repository
if (user.isAdmin)
{
appItems.push({
id: "HEADER_REPOSITORY",
name: "alfresco/menus/AlfMenuBarItem",
config: {
id: "HEADER_REPOSITORY",
label: "header.menu.repository.label",
targetUrl: "repository"
}
});
}
if (user.isAdmin)
{
appItems.push({
id: "HEADER_ADMIN_CONSOLE",
name: "alfresco/menus/AlfMenuBarItem",
config: {
id: "HEADER_ADMIN_CONSOLE",
label: "header.menu.admin.label",
targetUrl: "console/admin-console/application"
}
});
}
else
{
appItems.push({
id: "HEADER_ADMIN_CONSOLE",
name: "alfresco/menus/AlfMenuBarItem",
config: {
id: "HEADER_SITES_CONSOLE",
label: "header.menu.admin.sites.label",
targetUrl: "console/sites-console/manage-sites",
renderFilter: [
{
property: "user.groups.GROUP_SITE_ADMINISTRATORS",
values: [true]
}
]
}
});
}
//help dropdown to iconnect users and managers
appItems.push( {
id: "HEADER_HELP",
name: "alfresco/header/AlfMenuBarPopup",
config: {
id: "HEADER_HELP",
label: "Help",
widgets: [
{
name: "alfresco/menus/AlfMenuGroup",
config: {
widgets: [
{
id: "HEADER_HELP_USER_MANUAL",
name: "alfresco/header/AlfMenuItem",
config:
{
id: "HEADER_HELP_USER_MANUAL",
label: "User-Manual",
targetUrl: "http://is-0548/iconnect/proxy/alfresco/api/node/content/workspace/SpacesStore/214378ac-4e1d-44fd-ae2...",
targetUrlType: "FULL_PATH",
targetUrlLocation: "NEW"
}
},
{
id: "HEADER_HELP_MANGER_MANUAL",
name: "alfresco/header/AlfMenuItem",
config:
{
id: "HEADER_HELP_MANGER_MANUAL",
label: "Manager-Manual",
targetUrl: "http://is-0548/iconnect/proxy/alfresco/api/node/content/workspace/SpacesStore/91c54ade-90ad-4cfb-b7e...",
targetUrlType: "FULL_PATH",
targetUrlLocation: "NEW"
}
}
]
}
}
]
}
});
return appItems;
}
05-29-2015 07:04 AM
testHeaderMenu.config.widgets.push({
id: "HEADER_REPOSITORY",
name: "alfresco/menus/AlfMenuBarItem",
config: {
id: "HEADER_REPOSITORY",
label: "header.menu.repository.label",
targetUrl: "repository"
}
});
testHeaderMenu.config.widgets.push({
id: "HEADER_SITES_MENU",
name: "alfresco/header/AlfSitesMenu",
config: {
id: "HEADER_SITES_MENU",
label: "header.menu.sites.label",
currentSite: page.url.templateArgs.site,
currentUser: user.name
}
});
and so on..
06-01-2015 05:50 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.