TASKPM/libreplan-webapp/src/main/webapp/common/layout/_customMenu.zul
Lorenzo Tilve Álvaro 95a5052463 Bug #1563: Remove links from breadcrumbs component
The links on the breadcrumbs line were problematic as they
were pointing to the first subelement of the current section of the
menu, which could be an element unauthorized for the user.

As these shortcats are not useful enough and redundant with the main menu,
which can be used directly as is showing only the entries to the specific
user has access to, the links in this components are removed.

FEA: ItEr77S04BugFixing
2013-04-23 12:16:19 +02:00

99 lines
4 KiB
Text

<!--
This file is part of LibrePlan
Copyright (C) 2009-2010 Fundación para o Fomento da Calidade Industrial e
Desenvolvemento Tecnolóxico de Galicia
Copyright (C) 2010-2011 Igalia, S.L.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<div id="menuContainer" xmlns:n="http://www.zkoss.org/2005/zk/native"
use="org.libreplan.web.common.CustomMenuController">
<zscript>
<![CDATA[
contextPath = Executions.getCurrent().getContextPath();
]]>
</zscript>
<menubar id="menubar" top="0px" left="0px"
ctrlKeys="^k#f2" onCtrlKey="doCtrlKey()" sclass="mainmenu" autodrop="true">
<menu forEach="${menuContainer.customMenuItems}" label="${i18n:_(each.name)}" class="${each.activeParent?'current-section':''}" >
<menupopup sclass="submenu">
<menuitem forEach="${each.children}" label="${i18n:_(each.name)}"
href='${each.url}' visible="${each.hasNotChildren}" />
<menu forEach="${each.children}" label="${i18n:_(each.name)}" visible="${each.hasChildren}" >
<menupopup>
<menuitem forEach="${forEachStatus.each.children}"
label="${i18n:_(each.name)}" href='${each.url}' />
</menupopup>
</menu>
</menupopup>
</menu>
</menubar>
<n:table width="100%" height="30" border="0" cellpadding="0"
cellspacing="0">
<n:tr>
<n:td class="migas_linea"><n:table border="0" cellspacing="0" cellpadding="0">
<n:tr class="ruta">
<n:td width="10" height="25"></n:td>
<n:td><n:strong>${i18n:_('START')}</n:strong></n:td>
<n:td width="5"></n:td>
<n:td><hbox id="breadcrumbs"></hbox>
<hbox>
<hbox forEach="${menuContainer.breadcrumbsPath}">
<n:div align="center"><n:img src="${contextPath}/common/img/migas_separacion.gif" /></n:div>
<n:span class="ruta">${i18n:_(each.name)}</n:span>
</hbox>
</hbox>
</n:td>
</n:tr>
</n:table></n:td>
<n:td valign="top" align="right" class="help-link">
<div>
<n:a href="${contextPath}/help/${i18n:_('en')}/${menuContainer.helpLink}" target="_blank">
<n:span>${i18n:_('Help')}</n:span>
</n:a>
<div tooltip="help-popup" style="display:inline;">
<n:img src="${contextPath}/common/img/axuda.gif" alt="Axuda" width="23" height="24" border="0" style="margin-top:4px;"/>
</div>
<div tooltip="help-about" style="display:inline;">
<n:img src="${contextPath}/common/img/info.gif" alt="Info" width="23" height="24" border="0" style="margin-top:4px;"/>
</div>
</div>
</n:td>
</n:tr>
</n:table>
<zscript><![CDATA[
i18nHelpLink = "/help/" + org.libreplan.web.I18nHelper._("en") + "/" + menuContainer.getHelpLink();
i18nAboutLink = "/help/" + org.libreplan.web.I18nHelper._("en") + "/20-acerca-de.html";
]]></zscript>
<popup id="help-popup" width="700px"
onOpen="helpIframe.setSrc(i18nHelpLink)">
<iframe id="helpIframe" width="670px" height="450px" style="border: 1px solid gray" />
</popup>
<popup id="help-about" width="700px"
onOpen="aboutIframe.setSrc(i18nAboutLink)">
<iframe id="aboutIframe" width="670px" height="350px" style="border: 1px solid gray" />
</popup>
</div>