- Localisation for navigation quick links form
- Foundry support for navigation quick links git-svn-id: https://svn.libreccm.org/ccm/trunk@3098 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
b5af28c3ad
commit
93b9a83882
|
|
@ -18,6 +18,24 @@
|
||||||
</h1>
|
</h1>
|
||||||
<content-item mode="detail"/>
|
<content-item mode="detail"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<nav-quicklinks>
|
||||||
|
<h2>
|
||||||
|
<show-text>page/layout/nav-quicklinks</show-text>
|
||||||
|
</h2>
|
||||||
|
<dl>
|
||||||
|
<nav-quicklink>
|
||||||
|
<dt>
|
||||||
|
<a>
|
||||||
|
<nav-quicklink-title/>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<nav-quicklink-description/>
|
||||||
|
</dd>
|
||||||
|
</nav-quicklink>
|
||||||
|
</dl>
|
||||||
|
</nav-quicklinks>
|
||||||
</main>
|
</main>
|
||||||
<include file="fragments/footer.xml"/>
|
<include file="fragments/footer.xml"/>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,24 @@
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</object-list>
|
</object-list>
|
||||||
|
|
||||||
|
<nav-quicklinks>
|
||||||
|
<h2>
|
||||||
|
<show-text>page/layout/nav-quicklinks</show-text>
|
||||||
|
</h2>
|
||||||
|
<dl>
|
||||||
|
<nav-quicklink>
|
||||||
|
<dt>
|
||||||
|
<a>
|
||||||
|
<nav-quicklink-title/>
|
||||||
|
</a>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<nav-quicklink-description/>
|
||||||
|
</dd>
|
||||||
|
</nav-quicklink>
|
||||||
|
</dl>
|
||||||
|
</nav-quicklinks>
|
||||||
</main>
|
</main>
|
||||||
<include file="fragments/footer.xml"/>
|
<include file="fragments/footer.xml"/>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<foundry:static-texts xmlns:foundry="http://foundry.libreccm.org">
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/head">
|
||||||
|
<translation lang="de">Quick Links</translation>
|
||||||
|
<translation lang="en">Quick Links</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/title">
|
||||||
|
<translation lang="de">Titel</translation>
|
||||||
|
<translation lang="en">Title</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/url">
|
||||||
|
<translation lang="de">URL</translation>
|
||||||
|
<translation lang="en">URL</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/cascade">
|
||||||
|
<translation lang="de">Vererben?</translation>
|
||||||
|
<translation lang="en">Cascade?</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/description">
|
||||||
|
<translation lang="de">Beschreibung</translation>
|
||||||
|
<translation lang="en">Description</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/actions">
|
||||||
|
<translation lang="de">Aktionen</translation>
|
||||||
|
<translation lang="en">Actions</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/cascade/true">
|
||||||
|
<translation lang="de">Ja</translation>
|
||||||
|
<translation lang="en">Yes</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/cascade/false">
|
||||||
|
<translation lang="de">Nein</translation>
|
||||||
|
<translation lang="en">No</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/edit">
|
||||||
|
<translation lang="de">Bearbeiten</translation>
|
||||||
|
<translation lang="en">Edit</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/delete">
|
||||||
|
<translation lang="de">Löschen</translation>
|
||||||
|
<translation lang="en">Delete</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
</foundry:static-texts>
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
<xsl:import href="lib/bebop.xsl"/>
|
<xsl:import href="lib/bebop.xsl"/>
|
||||||
<xsl:import href="lib/cms.xsl"/>
|
<xsl:import href="lib/cms.xsl"/>
|
||||||
|
<xsl:import href="lib/navigation.xsl"/>
|
||||||
<!--<xsl:import href="lib/portlets.xsl"/>-->
|
<!--<xsl:import href="lib/portlets.xsl"/>-->
|
||||||
<xsl:import href="lib/global-vars.xsl"/>
|
<xsl:import href="lib/global-vars.xsl"/>
|
||||||
<xsl:import href="lib/search.xsl"/>
|
<xsl:import href="lib/search.xsl"/>
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
</div>
|
</div>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<span class="option-group">
|
<span id="{./@id}" class="option-group">
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
</span>
|
</span>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE stylesheet>
|
||||||
|
<!--
|
||||||
|
Copyright 2015 Jens Pelzetter for the LibreCCM Foundation
|
||||||
|
|
||||||
|
This file is part of the Foundry Theme Engine for LibreCCM
|
||||||
|
|
||||||
|
Foundry is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Foundry 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 General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with Foundry If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
-->
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
exclude-result-prefixes="xsl"
|
||||||
|
version="2.0">
|
||||||
|
|
||||||
|
<xsl:import href="navigation/quick-links.xsl"/>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
@ -0,0 +1,92 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE stylesheet>
|
||||||
|
<!--
|
||||||
|
Copyright 2015 Jens Pelzetter for the LibreCCM Foundation
|
||||||
|
|
||||||
|
This file is part of the Foundry Theme Engine for LibreCCM
|
||||||
|
|
||||||
|
Foundry is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Foundry 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 General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with Foundry If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
-->
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||||
|
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||||
|
xmlns:foundry="http://foundry.libreccm.org"
|
||||||
|
xmlns:nav="http://ccm.redhat.com/navigation"
|
||||||
|
exclude-result-prefixes="xsl bebop cms foundry nav"
|
||||||
|
version="2.0">
|
||||||
|
|
||||||
|
<xsl:template match="nav:quickLinkListing">
|
||||||
|
<h4>
|
||||||
|
<xsl:value-of select="foundry:get-static-text('navigation', 'quicklinks/listing/head')"/>
|
||||||
|
</h4>
|
||||||
|
<table class="quickLinkListing">
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<xsl:value-of select="foundry:get-static-text('navigation',
|
||||||
|
'quicklinks/listing/title')"/>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<xsl:value-of select="foundry:get-static-text('navigation',
|
||||||
|
'quicklinks/listing/url')"/>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<xsl:value-of select="foundry:get-static-text('navigation',
|
||||||
|
'quicklinks/listing/cascade')"/>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<xsl:value-of select="foundry:get-static-text('navigation',
|
||||||
|
'quicklinks/listing/description')"/>
|
||||||
|
</th>
|
||||||
|
<th colspan="2">
|
||||||
|
<xsl:value-of select="foundry:get-static-text('navigation',
|
||||||
|
'quicklinks/listing/actions')"/>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<xsl:for-each select="./nav:object">
|
||||||
|
<tr class="{if (position() mod 2 = 0) then 'even' else 'odd'}">
|
||||||
|
<td>
|
||||||
|
<xsl:value-of select="./nav:title"/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<xsl:value-of select="./nav:url"/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<xsl:value-of select="if (./nav:cascade = 'true')
|
||||||
|
then foundry:get-static-text('navigation',
|
||||||
|
'quicklinks/listing/cascade/true')
|
||||||
|
else foundry:get-static-text('navigation',
|
||||||
|
'quicklinks/listing/cascade/false')" />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<xsl:value-of select="./nav:description"/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="{./nav:action[@name='edit']/@url}">
|
||||||
|
<xsl:value-of select="foundry:get-static-text('navigation',
|
||||||
|
'quicklinks/listing/edit')"/>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="{./nav:action[@name='delete']/@url}">
|
||||||
|
<xsl:value-of select="foundry:get-static-text('navigation',
|
||||||
|
'quicklinks/listing/delete')"/>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</xsl:for-each>
|
||||||
|
</table>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
@ -451,4 +451,47 @@
|
||||||
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="nav-quicklinks">
|
||||||
|
|
||||||
|
<xsl:if test="count($data-tree/nav:quickLinks/nav:quickLink) > 1">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="nav-quicklinks//nav-quicklink">
|
||||||
|
|
||||||
|
<xsl:variable name="quicklinks"
|
||||||
|
select="$data-tree/nav:quickLinks/nav:quickLink"/>
|
||||||
|
<xsl:variable name="quicklinks-layout"
|
||||||
|
select="current()/*"/>
|
||||||
|
|
||||||
|
<xsl:for-each select="$quicklinks">
|
||||||
|
<xsl:apply-templates select="$quicklinks-layout">
|
||||||
|
<xsl:with-param name="quicklink-title"
|
||||||
|
tunnel="yes"
|
||||||
|
select="./nav:title"/>
|
||||||
|
<xsl:with-param name="href"
|
||||||
|
tunnel="yes"
|
||||||
|
select="./nav:url"/>
|
||||||
|
<xsl:with-param name="quicklink-desc"
|
||||||
|
tunnel="yes"
|
||||||
|
select="./nav:description"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:for-each>
|
||||||
|
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="nav-quicklinks//nav-quicklink//nav-quicklink-title">
|
||||||
|
<xsl:param name="quicklink-title" tunnel="yes" />
|
||||||
|
|
||||||
|
<xsl:value-of select="$quicklink-title"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="nav-quicklinks//nav-quicklink//nav-quicklink-description">
|
||||||
|
<xsl:param name="quicklink-description" tunnel="yes" />
|
||||||
|
|
||||||
|
<xsl:value-of select="$quicklink-description"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|
@ -1750,9 +1750,14 @@ span.errors {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
Span.noErrors {
|
span.noErrors {
|
||||||
color: #008B00;
|
color: #008B00;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
border: 1.5px solid #008B00;
|
border: 1.5px solid #008B00;
|
||||||
padding: 10px
|
padding: 10px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span#quickLinksCascade {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<foundry:static-texts xmlns:foundry="http://foundry.libreccm.org">
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/head">
|
||||||
|
<translation lang="de">Quick Links</translation>
|
||||||
|
<translation lang="en">Quick Links</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/title">
|
||||||
|
<translation lang="de">Titel</translation>
|
||||||
|
<translation lang="en">Title</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/url">
|
||||||
|
<translation lang="de">URL</translation>
|
||||||
|
<translation lang="en">URL</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/cascade">
|
||||||
|
<translation lang="de">Vererben?</translation>
|
||||||
|
<translation lang="en">Cascade?</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/description">
|
||||||
|
<translation lang="de">Beschreibung</translation>
|
||||||
|
<translation lang="en">Description</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/actions">
|
||||||
|
<translation lang="de">Aktionen</translation>
|
||||||
|
<translation lang="en">Actions</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/cascade/true">
|
||||||
|
<translation lang="de">Ja</translation>
|
||||||
|
<translation lang="en">Yes</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/cascade/false">
|
||||||
|
<translation lang="de">Nein</translation>
|
||||||
|
<translation lang="en">No</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/edit">
|
||||||
|
<translation lang="de">Bearbeiten</translation>
|
||||||
|
<translation lang="en">Edit</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/delete">
|
||||||
|
<translation lang="de">Löschen</translation>
|
||||||
|
<translation lang="en">Delete</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
</foundry:static-texts>
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<foundry:static-texts xmlns:foundry="http://foundry.libreccm.org">
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/head">
|
||||||
|
<translation lang="de">Quick Links</translation>
|
||||||
|
<translation lang="en">Quick Links</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/title">
|
||||||
|
<translation lang="de">Titel</translation>
|
||||||
|
<translation lang="en">Title</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/url">
|
||||||
|
<translation lang="de">URL</translation>
|
||||||
|
<translation lang="en">URL</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/cascade">
|
||||||
|
<translation lang="de">Vererben?</translation>
|
||||||
|
<translation lang="en">Cascade?</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/description">
|
||||||
|
<translation lang="de">Beschreibung</translation>
|
||||||
|
<translation lang="en">Description</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/actions">
|
||||||
|
<translation lang="de">Aktionen</translation>
|
||||||
|
<translation lang="en">Actions</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/cascade/true">
|
||||||
|
<translation lang="de">Ja</translation>
|
||||||
|
<translation lang="en">Yes</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/edit">
|
||||||
|
<translation lang="de">Bearbeiten</translation>
|
||||||
|
<translation lang="en">Edit</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text id="quicklinks/listing/cascade/false">
|
||||||
|
<translation lang="de">Nein</translation>
|
||||||
|
<translation lang="en">No</translation>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
</foundry:static-texts>
|
||||||
|
|
@ -6,3 +6,9 @@ ui.create.nav_title=Navigation Title
|
||||||
ui.create.nav_default_domain=Default Terms Domain
|
ui.create.nav_default_domain=Default Terms Domain
|
||||||
ui.create.nave_desc=Description
|
ui.create.nave_desc=Description
|
||||||
ui.admin.instance_not_compatible_yet=The administration for instances of navigation is not yet compatible with the applications tab. Please use the link below.
|
ui.admin.instance_not_compatible_yet=The administration for instances of navigation is not yet compatible with the applications tab. Please use the link below.
|
||||||
|
ui.quick_link.title=Title
|
||||||
|
#Description
|
||||||
|
ui.quick_link.description=Description
|
||||||
|
ui.quick_link.url=URL
|
||||||
|
ui.quick_link.cascade_to_subcats=Cascade to subcategories
|
||||||
|
ui.quick_link.icon=Icon
|
||||||
|
|
|
||||||
|
|
@ -6,3 +6,9 @@ ui.create.nav_title=Navigation Titel
|
||||||
ui.create.nav_default_domain=Standard Terms Domain
|
ui.create.nav_default_domain=Standard Terms Domain
|
||||||
ui.create.nave_desc=Beschreibung
|
ui.create.nave_desc=Beschreibung
|
||||||
ui.admin.instance_not_compatible_yet=Das Formular zum bearbeiten der instanzspezifischen Einstellungen von Navigation ist noch nicht mit dem Applications Tab kompatible. Bitte nutzen Sie den untenstehenden Link.
|
ui.admin.instance_not_compatible_yet=Das Formular zum bearbeiten der instanzspezifischen Einstellungen von Navigation ist noch nicht mit dem Applications Tab kompatible. Bitte nutzen Sie den untenstehenden Link.
|
||||||
|
ui.quick_link.title=Titel
|
||||||
|
#Description
|
||||||
|
ui.quick_link.description=Beschreibung
|
||||||
|
ui.quick_link.url=URL
|
||||||
|
ui.quick_link.cascade_to_subcats=An Subkategorien vererben
|
||||||
|
ui.quick_link.icon=Icon
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.arsdigita.navigation.ui.admin;
|
package com.arsdigita.navigation.ui.admin;
|
||||||
|
|
||||||
import com.arsdigita.bebop.Form;
|
import com.arsdigita.bebop.Form;
|
||||||
|
|
@ -33,14 +32,15 @@ import com.arsdigita.bebop.event.FormProcessListener;
|
||||||
import com.arsdigita.bebop.event.FormInitListener;
|
import com.arsdigita.bebop.event.FormInitListener;
|
||||||
import com.arsdigita.bebop.event.FormSubmissionListener;
|
import com.arsdigita.bebop.event.FormSubmissionListener;
|
||||||
import com.arsdigita.bebop.FormProcessException;
|
import com.arsdigita.bebop.FormProcessException;
|
||||||
|
import com.arsdigita.bebop.Label;
|
||||||
import com.arsdigita.categorization.Category;
|
import com.arsdigita.categorization.Category;
|
||||||
import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
|
import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
|
||||||
import com.arsdigita.navigation.Navigation;
|
import com.arsdigita.navigation.Navigation;
|
||||||
import com.arsdigita.navigation.QuickLink;
|
import com.arsdigita.navigation.QuickLink;
|
||||||
import com.arsdigita.london.util.ui.parameters.URLParameter;
|
import com.arsdigita.london.util.ui.parameters.URLParameter;
|
||||||
import com.arsdigita.navigation.NavigationGlobalizationUtil;
|
import com.arsdigita.navigation.NavigationGlobalizationUtil;
|
||||||
import java.net.URL;
|
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
public class QuickLinkForm extends Form {
|
public class QuickLinkForm extends Form {
|
||||||
|
|
||||||
|
|
@ -59,8 +59,7 @@ public class QuickLinkForm extends Form {
|
||||||
public QuickLinkForm(String name,
|
public QuickLinkForm(String name,
|
||||||
ACSObjectSelectionModel cat,
|
ACSObjectSelectionModel cat,
|
||||||
ACSObjectSelectionModel link) {
|
ACSObjectSelectionModel link) {
|
||||||
super(name, new SimpleContainer(Navigation.NAV_PREFIX +
|
super(name, new SimpleContainer(Navigation.NAV_PREFIX + ":quickLinkForm",
|
||||||
":quickLinkForm",
|
|
||||||
Navigation.NAV_NS));
|
Navigation.NAV_NS));
|
||||||
setRedirecting(true);
|
setRedirecting(true);
|
||||||
|
|
||||||
|
|
@ -99,7 +98,6 @@ public class QuickLinkForm extends Form {
|
||||||
m_url.setSize(50);
|
m_url.setSize(50);
|
||||||
m_url.addValidationListener(new NotNullValidationListener());
|
m_url.addValidationListener(new NotNullValidationListener());
|
||||||
m_url.addValidationListener(new StringInRangeValidationListener(1, 300));
|
m_url.addValidationListener(new StringInRangeValidationListener(1, 300));
|
||||||
m_url.setMetaDataAttribute("label", "URL");
|
|
||||||
m_url.setLabel(NavigationGlobalizationUtil.globalize("ui.quick_link.url"));
|
m_url.setLabel(NavigationGlobalizationUtil.globalize("ui.quick_link.url"));
|
||||||
add(m_url);
|
add(m_url);
|
||||||
|
|
||||||
|
|
@ -107,14 +105,20 @@ public class QuickLinkForm extends Form {
|
||||||
m_icon.setSize(50);
|
m_icon.setSize(50);
|
||||||
m_icon.addValidationListener(new StringInRangeValidationListener(0, 300));
|
m_icon.addValidationListener(new StringInRangeValidationListener(0, 300));
|
||||||
m_icon.setMetaDataAttribute("label", "Icon");
|
m_icon.setMetaDataAttribute("label", "Icon");
|
||||||
|
m_icon.setLabel(NavigationGlobalizationUtil.globalize("ui.quick_link.icon"));
|
||||||
add(m_icon);
|
add(m_icon);
|
||||||
|
|
||||||
m_cascade = new CheckboxGroup("cascade");
|
m_cascade = new CheckboxGroup("cascade");
|
||||||
m_cascade.addOption(new Option(SELECTED, "cascade to subcategories"));
|
m_cascade.setIdAttr("quickLinksCascade");
|
||||||
|
m_cascade.setLabel(NavigationGlobalizationUtil.globalize("ui.quick_link.cascade_to_subcats"));
|
||||||
|
m_cascade.addOption(new Option(SELECTED,
|
||||||
|
new Label(NavigationGlobalizationUtil.globalize(
|
||||||
|
"ui.quick_link.cascade_to_subcats"))));
|
||||||
add(m_cascade);
|
add(m_cascade);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class LinkInitListener implements FormInitListener {
|
private class LinkInitListener implements FormInitListener {
|
||||||
|
|
||||||
public void init(FormSectionEvent ev)
|
public void init(FormSectionEvent ev)
|
||||||
throws FormProcessException {
|
throws FormProcessException {
|
||||||
PageState state = ev.getPageState();
|
PageState state = ev.getPageState();
|
||||||
|
|
@ -139,9 +143,11 @@ public class QuickLinkForm extends Form {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class LinkSubmissionListener implements FormSubmissionListener {
|
private class LinkSubmissionListener implements FormSubmissionListener {
|
||||||
|
|
||||||
public void submitted(FormSectionEvent ev)
|
public void submitted(FormSectionEvent ev)
|
||||||
throws FormProcessException {
|
throws FormProcessException {
|
||||||
PageState state = ev.getPageState();
|
PageState state = ev.getPageState();
|
||||||
|
|
@ -151,9 +157,11 @@ public class QuickLinkForm extends Form {
|
||||||
throw new FormProcessException("cancelled");
|
throw new FormProcessException("cancelled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class LinkProcessListener implements FormProcessListener {
|
private class LinkProcessListener implements FormProcessListener {
|
||||||
|
|
||||||
public void process(FormSectionEvent ev)
|
public void process(FormSectionEvent ev)
|
||||||
throws FormProcessException {
|
throws FormProcessException {
|
||||||
PageState state = ev.getPageState();
|
PageState state = ev.getPageState();
|
||||||
|
|
@ -178,5 +186,7 @@ public class QuickLinkForm extends Form {
|
||||||
|
|
||||||
fireCompletionEvent(state);
|
fireCompletionEvent(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,9 @@
|
||||||
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "imageAttachments.image.id");
|
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "imageAttachments.image.id");
|
||||||
</jsp:scriptlet>
|
</jsp:scriptlet>
|
||||||
|
|
||||||
|
<define:component name="quickLinks"
|
||||||
|
classname="com.arsdigita.navigation.ui.QuickLinks"/>
|
||||||
|
|
||||||
<define:component name="assignedTerms"
|
<define:component name="assignedTerms"
|
||||||
classname="com.arsdigita.navigation.ui.CategoryIndexAssignedTerms"/>
|
classname="com.arsdigita.navigation.ui.CategoryIndexAssignedTerms"/>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,9 @@
|
||||||
((com.arsdigita.navigation.ui.object.ComplexObjectList) newsList).getRenderer().addAttribute( "imageAttachments.image.id");
|
((com.arsdigita.navigation.ui.object.ComplexObjectList) newsList).getRenderer().addAttribute( "imageAttachments.image.id");
|
||||||
</jsp:scriptlet>
|
</jsp:scriptlet>
|
||||||
|
|
||||||
|
<define:component name="quickLinks"
|
||||||
|
classname="com.arsdigita.navigation.ui.QuickLinks"/>
|
||||||
|
|
||||||
<define:component name="assignedTerms"
|
<define:component name="assignedTerms"
|
||||||
classname="com.arsdigita.navigation.ui.CategoryIndexAssignedTerms"/>
|
classname="com.arsdigita.navigation.ui.CategoryIndexAssignedTerms"/>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue