- Change password link: Added URL and title to CMSGlobalNavigation and
UserBanner (like logout link) and added support to Mandalay - Some formatting git-svn-id: https://svn.libreccm.org/ccm/trunk@2629 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
71f625a792
commit
6382af5c68
|
|
@ -1,6 +1,6 @@
|
|||
model com.arsdigita.cms.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.GenricOrganization;
|
||||
import com.arsdigita.cms.contenttypes.GenricOrganizationalUnit;
|
||||
import com.arsdigita.cms.contenttypes.GenericAddress;
|
||||
import com.arsdigita.cms.contenttypes.GenericContact;
|
||||
|
||||
|
|
@ -8,29 +8,10 @@ import com.arsdigita.kernel.ACSObject;
|
|||
import com.arsdigita.cms.*;
|
||||
|
||||
// HealthCareFacility Object
|
||||
object type HealthCareFacility extends GenericOrganization {
|
||||
|
||||
GenericAddress[0..1] address = join ct_healthCareFacilities.address_id
|
||||
to cms_addresses.address_id;
|
||||
object type HealthCareFacility extends GenericOrganizationalUnit {
|
||||
|
||||
|
||||
reference key ( ct_healthCareFacilities.hcf_id );
|
||||
}
|
||||
|
||||
association {
|
||||
|
||||
GenericContact[0..n] contacts = join ct_healthCareFacilities.hcf_id
|
||||
to ct_healthCareFacility_contact_map.hcf_id,
|
||||
join ct_healthCareFacility_contact_map.contact_id
|
||||
to cms_contacts.contact_id;
|
||||
|
||||
HealthCareFacility[0..n] healthCareFacilities = join cms_contacts.contact_id
|
||||
to ct_healthCareFacility_contact_map.contact_id,
|
||||
join ct_healthCareFacility_contact_map.hcf_id
|
||||
to ct_healthCareFacilities.hcf_id;
|
||||
|
||||
// Link Attribute
|
||||
String contact_type = ct_healthCareFacility_contact_map.contact_type VARCHAR(100);
|
||||
BigDecimal contact_order = ct_healthCareFacility_contact_map.contact_order INTEGER;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ import org.apache.log4j.Logger;
|
|||
*
|
||||
* @author Sören Bernstein <quasi@quasiweb.de>
|
||||
*/
|
||||
public class HealthCareFacility extends GenericOrganization {
|
||||
public class HealthCareFacility extends GenericOrganizationalUnit {
|
||||
|
||||
//private static final HealthCareFacilityConfig s_config = new HealthCareFacilityConfig();
|
||||
private static final Logger s_log = Logger.getLogger(HealthCareFacility.class);
|
||||
|
|
@ -122,48 +122,48 @@ public class HealthCareFacility extends GenericOrganization {
|
|||
}
|
||||
|
||||
|
||||
/* accessors *************************************************/
|
||||
|
||||
// Get the address for this contact
|
||||
public com.arsdigita.cms.contenttypes.GenericAddress getAddress() {
|
||||
return (com.arsdigita.cms.contenttypes.GenericAddress)DomainObjectFactory.newInstance((DataObject)get(ADDRESS));
|
||||
}
|
||||
|
||||
// Set the address for this contact
|
||||
public void setAddress(com.arsdigita.cms.contenttypes.GenericAddress address) {
|
||||
set(ADDRESS, address);
|
||||
}
|
||||
|
||||
// Unset the address for this contact
|
||||
public void unsetAddress() {
|
||||
set(ADDRESS, null);
|
||||
}
|
||||
|
||||
// Get all contacts for this health care facility
|
||||
public HealthCareFacilityContactCollection getContacts() {
|
||||
return new HealthCareFacilityContactCollection((DataCollection) get(CONTACTS));
|
||||
}
|
||||
|
||||
// Add a contact for this health care facility
|
||||
public void addContact(com.arsdigita.cms.contenttypes.GenericContact contact, String contactType) {
|
||||
Assert.exists(contact, com.arsdigita.cms.contenttypes.GenericContact.class);
|
||||
|
||||
DataObject link = add(CONTACTS, contact);
|
||||
|
||||
link.set(CONTACT_TYPE, contactType);
|
||||
link.set(CONTACT_ORDER, BigDecimal.valueOf(getContacts().size()));
|
||||
// this.save();
|
||||
|
||||
// add(CONTACTS, contact);
|
||||
}
|
||||
|
||||
// Remove a contect for this health care facility
|
||||
public void removeContactEntry(com.arsdigita.cms.contenttypes.GenericContact contact) {
|
||||
Assert.exists(contact, com.arsdigita.cms.contenttypes.GenericContact.class);
|
||||
remove(CONTACTS, contact);
|
||||
}
|
||||
|
||||
public boolean hasContacts() {
|
||||
return !this.getContacts().isEmpty();
|
||||
}
|
||||
// /* accessors *************************************************/
|
||||
//
|
||||
// // Get the address for this contact
|
||||
// public com.arsdigita.cms.contenttypes.GenericAddress getAddress() {
|
||||
// return (com.arsdigita.cms.contenttypes.GenericAddress)DomainObjectFactory.newInstance((DataObject)get(ADDRESS));
|
||||
// }
|
||||
//
|
||||
// // Set the address for this contact
|
||||
// public void setAddress(com.arsdigita.cms.contenttypes.GenericAddress address) {
|
||||
// set(ADDRESS, address);
|
||||
// }
|
||||
//
|
||||
// // Unset the address for this contact
|
||||
// public void unsetAddress() {
|
||||
// set(ADDRESS, null);
|
||||
// }
|
||||
//
|
||||
// // Get all contacts for this health care facility
|
||||
// public HealthCareFacilityContactCollection getContacts() {
|
||||
// return new HealthCareFacilityContactCollection((DataCollection) get(CONTACTS));
|
||||
// }
|
||||
//
|
||||
// // Add a contact for this health care facility
|
||||
// public void addContact(com.arsdigita.cms.contenttypes.GenericContact contact, String contactType) {
|
||||
// Assert.exists(contact, com.arsdigita.cms.contenttypes.GenericContact.class);
|
||||
//
|
||||
// DataObject link = add(CONTACTS, contact);
|
||||
//
|
||||
// link.set(CONTACT_TYPE, contactType);
|
||||
// link.set(CONTACT_ORDER, BigDecimal.valueOf(getContacts().size()));
|
||||
//// this.save();
|
||||
//
|
||||
//// add(CONTACTS, contact);
|
||||
// }
|
||||
//
|
||||
// // Remove a contect for this health care facility
|
||||
// public void removeContactEntry(com.arsdigita.cms.contenttypes.GenericContact contact) {
|
||||
// Assert.exists(contact, com.arsdigita.cms.contenttypes.GenericContact.class);
|
||||
// remove(CONTACTS, contact);
|
||||
// }
|
||||
//
|
||||
// public boolean hasContacts() {
|
||||
// return !this.getContacts().isEmpty();
|
||||
// }
|
||||
}
|
||||
|
|
@ -1070,3 +1070,4 @@ cms.ui.category.cantmoved=This category can't be moved
|
|||
cms.ui.authoring.error_conflicts_with_this_url=There are conflicts with this URL. Specifically, there is at least one item in the same category as this item with the name (url) of
|
||||
cms.ui.search.help=To search for content items, please enter at least 3 letters into the search field. You can narrow the result by using additional parameters.
|
||||
cms.ui.search.no_results=Sorry. Not content items found which match your search.
|
||||
cms.ui.change_password=Change password
|
||||
|
|
|
|||
|
|
@ -1064,3 +1064,4 @@ cms.ui.category.cantmoved=Diese Kategorie kann nicht verschoben werden
|
|||
cms.ui.authoring.error_conflicts_with_this_url=Es gibt Konflikte mit dieser URL. Insbesondere gibt es mindestens ein Dokument in der gleichen Kategorie wie dieser mit dem Namen (URL)
|
||||
cms.ui.search.help=Geben sie mindestens drei Buchstaben ein, um nach Content Items zu suchen. Sie k\u00f6nnen das Ergebnis mit weiteren Parametern einschr\u00e4nken.
|
||||
cms.ui.search.no_results=Es wurden keine Content Items gefunden, die Ihren Suchparametern entsprechen
|
||||
cms.ui.change_password=Passwort \u00e4ndern
|
||||
|
|
|
|||
|
|
@ -118,3 +118,4 @@ cms.ui.category.cantmoved=This category can't be moved
|
|||
cms.ui.authoring.error_conflicts_with_this_url=There are conflicts with this URL. Specifically, there is at least one item in the same category as this item with the name (url) of
|
||||
cms.ui.search.help=
|
||||
cms.ui.search.no_results=
|
||||
cms.ui.change_password=
|
||||
|
|
|
|||
|
|
@ -592,3 +592,4 @@ cms.ui.category.cantmoved=This category can't be moved
|
|||
cms.ui.authoring.error_conflicts_with_this_url=There are conflicts with this URL. Specifically, there is atleast one item in the same category as this item with the name (url) of
|
||||
cms.ui.search.help=
|
||||
cms.ui.search.no_results=
|
||||
cms.ui.change_password=
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@ import org.apache.log4j.Logger;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* <p>Global navigation elements for the CMS admin UIs.</p>
|
||||
* <p>
|
||||
* Global navigation elements for the CMS admin UIs.</p>
|
||||
*
|
||||
* @author Justin Ross <jross@redhat.com>
|
||||
* @version $Id: GlobalNavigation.java 1942 2009-05-29 07:53:23Z terry $
|
||||
|
|
@ -44,85 +45,92 @@ import javax.servlet.http.HttpServletRequest;
|
|||
// Made public (instead of unspecified, resulting in protected) in 6.6.8
|
||||
public class GlobalNavigation extends SimpleComponent {
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(GlobalNavigation.class);
|
||||
private final String m_centerPath;
|
||||
private final String m_adminPath;
|
||||
private final String m_wspcPath;
|
||||
private final String m_signOutPath;
|
||||
private final String m_helpPath;
|
||||
private static final Logger s_log = Logger.getLogger(GlobalNavigation.class);
|
||||
private final String m_adminPath;
|
||||
private final String m_centerPath;
|
||||
private final String m_changePasswordPath;
|
||||
private final String m_helpPath;
|
||||
private final String m_signOutPath;
|
||||
private final String m_wspcPath;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public GlobalNavigation() {
|
||||
m_centerPath = ContentCenter.getURL();
|
||||
m_adminPath = Admin.getInstance().getServletPath();
|
||||
m_wspcPath = UI.getWorkspaceURL();
|
||||
m_signOutPath = LoginServlet.getLogoutPageURL();
|
||||
m_helpPath = "/nowhere"; // We don't have this yet XXX.
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public GlobalNavigation() {
|
||||
m_adminPath = Admin.getInstance().getServletPath();
|
||||
m_centerPath = ContentCenter.getURL();
|
||||
m_changePasswordPath = LoginServlet.getChangePasswordPageURL();
|
||||
m_helpPath = "/nowhere"; // We don't have this yet XXX.
|
||||
m_signOutPath = LoginServlet.getLogoutPageURL();
|
||||
m_wspcPath = UI.getWorkspaceURL();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param state
|
||||
* @param parent
|
||||
*/
|
||||
@Override
|
||||
public void generateXML(final PageState state, final Element parent) {
|
||||
if (isVisible(state)) {
|
||||
final HttpServletRequest sreq = state.getRequest();
|
||||
/**
|
||||
*
|
||||
* @param state
|
||||
* @param parent
|
||||
*/
|
||||
@Override
|
||||
public void generateXML(final PageState state, final Element parent) {
|
||||
if (isVisible(state)) {
|
||||
final HttpServletRequest sreq = state.getRequest();
|
||||
|
||||
final Element nav = parent.newChildElement("cms:globalNavigation", CMS.CMS_XML_NS);
|
||||
final String centerTitle = lz("cms.ui.content_center");
|
||||
final String adminTitle = lz("cms.ui.admin_center");
|
||||
final String wspcTitle = lz("cms.ui.my_workspace");
|
||||
final String signOutTitle = lz("cms.ui.sign_out");
|
||||
final String helpTitle = lz("cms.ui.help");
|
||||
final Element nav = parent.newChildElement("cms:globalNavigation", CMS.CMS_XML_NS);
|
||||
final String centerTitle = lz("cms.ui.content_center");
|
||||
final String adminTitle = lz("cms.ui.admin_center");
|
||||
final String wspcTitle = lz("cms.ui.my_workspace");
|
||||
final String signOutTitle = lz("cms.ui.sign_out");
|
||||
final String helpTitle = lz("cms.ui.help");
|
||||
final String changePasswordTitle = lz("cms.ui.change_password");
|
||||
|
||||
link(sreq, nav, "cms:contentCenter", m_centerPath, centerTitle);
|
||||
link(sreq, nav, "cms:contentCenter", m_centerPath, centerTitle);
|
||||
|
||||
/* If the current user has admin permissions, insert a link to the admin center */
|
||||
if (PermissionService.checkPermission(new PermissionDescriptor(
|
||||
PrivilegeDescriptor.ADMIN,
|
||||
Admin.getInstance(),
|
||||
Kernel.getContext().getParty()))) {
|
||||
link(sreq, nav, "cms:adminCenter", m_adminPath, adminTitle);
|
||||
}
|
||||
/* If the current user has admin permissions, insert a link to the admin center */
|
||||
if (PermissionService.checkPermission(new PermissionDescriptor(
|
||||
PrivilegeDescriptor.ADMIN,
|
||||
Admin.getInstance(),
|
||||
Kernel.getContext().getParty()))) {
|
||||
link(sreq, nav, "cms:adminCenter", m_adminPath, adminTitle);
|
||||
}
|
||||
|
||||
link(sreq, nav, "cms:workspace", m_wspcPath, wspcTitle);
|
||||
link(sreq, nav, "cms:signOut", m_signOutPath, signOutTitle);
|
||||
link(sreq, nav, "cms:help", m_helpPath, helpTitle);
|
||||
}
|
||||
}
|
||||
link(sreq, nav, "cms:workspace", m_wspcPath, wspcTitle);
|
||||
link(sreq, nav, "cms:changePassword", m_changePasswordPath, changePasswordTitle);
|
||||
link(sreq, nav, "cms:signOut", m_signOutPath, signOutTitle);
|
||||
link(sreq, nav, "cms:help", m_helpPath, helpTitle);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sreq
|
||||
* @param parent
|
||||
* @param name
|
||||
* @param path
|
||||
* @param title
|
||||
* @return
|
||||
*/
|
||||
private static Element link(final HttpServletRequest sreq,
|
||||
final Element parent,
|
||||
final String name,
|
||||
final String path,
|
||||
final String title) {
|
||||
final Element link = parent.newChildElement(name, CMS.CMS_XML_NS);
|
||||
/**
|
||||
*
|
||||
* @param sreq
|
||||
* @param parent
|
||||
* @param name
|
||||
* @param path
|
||||
* @param title
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private static Element link(final HttpServletRequest sreq,
|
||||
final Element parent,
|
||||
final String name,
|
||||
final String path,
|
||||
final String title) {
|
||||
final Element link = parent.newChildElement(name, CMS.CMS_XML_NS);
|
||||
|
||||
link.addAttribute("href", URL.there(sreq, path).toString());
|
||||
link.addAttribute("title", title);
|
||||
link.addAttribute("href", URL.there(sreq, path).toString());
|
||||
link.addAttribute("title", title);
|
||||
|
||||
return link;
|
||||
}
|
||||
return link;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param key
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private static String lz(final String key) {
|
||||
return (String) ContentSectionPage.globalize(key).localize();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
private static String lz(final String key) {
|
||||
return (String) ContentSectionPage.globalize(key).localize();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,3 +28,4 @@ com.arsdigita.ui.admin.applications.desc.valiation.minmaxlength=The maximum leng
|
|||
com.arsdigita.ui.admin.applications.url.label=URL
|
||||
com.arsdigita.ui.admin.applications.title.label=Title
|
||||
com.arsdigita.ui.admin.applications.desc.label=Description
|
||||
ui.change_password=Change password
|
||||
|
|
|
|||
|
|
@ -28,3 +28,4 @@ com.arsdigita.ui.admin.applications.desc.valiation.minmaxlength=Die Beschreibung
|
|||
com.arsdigita.ui.admin.applications.url.label=URL
|
||||
com.arsdigita.ui.admin.applications.title.label=Bezeichnung
|
||||
com.arsdigita.ui.admin.applications.desc.label=Beschreibung
|
||||
ui.change_password=Passwort \u00e4ndern
|
||||
|
|
|
|||
|
|
@ -28,3 +28,4 @@ com.arsdigita.ui.admin.applications.desc.valiation.minmaxlength=
|
|||
com.arsdigita.ui.admin.applications.url.label=
|
||||
com.arsdigita.ui.admin.applications.title.label=
|
||||
com.arsdigita.ui.admin.applications.desc.label=
|
||||
ui.change_password=
|
||||
|
|
|
|||
|
|
@ -24,3 +24,4 @@ com.arsdigita.ui.admin.applications.desc.valiation.minmaxlength=
|
|||
com.arsdigita.ui.admin.applications.url.label=
|
||||
com.arsdigita.ui.admin.applications.title.label=
|
||||
com.arsdigita.ui.admin.applications.desc.label=
|
||||
ui.change_password=
|
||||
|
|
|
|||
|
|
@ -27,10 +27,12 @@ import com.arsdigita.web.URL;
|
|||
import com.arsdigita.xml.Element;
|
||||
import com.arsdigita.ui.util.GlobalizationUtil;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import com.arsdigita.ui.login.Login;
|
||||
import com.arsdigita.ui.login.LoginServlet;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class UserBanner extends SimpleComponent {
|
||||
|
||||
|
|
@ -38,27 +40,29 @@ public class UserBanner extends SimpleComponent {
|
|||
private static GlobalizedMessage s_signout;
|
||||
private static GlobalizedMessage s_portal;
|
||||
private static GlobalizedMessage s_greet;
|
||||
private static GlobalizedMessage s_changePassword;
|
||||
|
||||
private static boolean initialized = false;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static void init() {
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
s_help = GlobalizationUtil.globalize("ui.admin.help");
|
||||
s_signout = GlobalizationUtil.globalize("ui.admin.signout");
|
||||
s_portal = GlobalizationUtil.globalize("ui.admin.portal");
|
||||
s_greet = GlobalizationUtil.globalize("ui.admin.greeting");
|
||||
s_changePassword = GlobalizationUtil.globalize("ui.change_password");
|
||||
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param state
|
||||
* @param parent
|
||||
*/
|
||||
|
|
@ -73,32 +77,34 @@ public class UserBanner extends SimpleComponent {
|
|||
exportAttributes(content);
|
||||
|
||||
if (party != null && party instanceof User) {
|
||||
User user = (User)party;
|
||||
User user = (User) party;
|
||||
|
||||
content.addAttribute("givenName",
|
||||
content.addAttribute("givenName",
|
||||
user.getPersonName().getGivenName());
|
||||
content.addAttribute("familyName",
|
||||
content.addAttribute("familyName",
|
||||
user.getPersonName().getFamilyName());
|
||||
content.addAttribute("screenName",
|
||||
content.addAttribute("screenName",
|
||||
user.getScreenName());
|
||||
content.addAttribute("primaryEmail",
|
||||
content.addAttribute("primaryEmail",
|
||||
user.getPrimaryEmail().toString());
|
||||
content.addAttribute("userID",
|
||||
content.addAttribute("userID",
|
||||
user.getOID().toString());
|
||||
}
|
||||
|
||||
content.addAttribute("changePasswordLabel",
|
||||
(String) s_changePassword.localize(state.getRequest()));
|
||||
|
||||
content.addAttribute("helpLabel",
|
||||
(String)s_help.localize(state.getRequest()));
|
||||
|
||||
(String) s_help.localize(state.getRequest()));
|
||||
|
||||
content.addAttribute("portalLabel",
|
||||
(String)s_portal.localize(state.getRequest()));
|
||||
|
||||
(String) s_portal.localize(state.getRequest()));
|
||||
|
||||
content.addAttribute("signoutLabel",
|
||||
(String)s_signout.localize(state.getRequest()));
|
||||
|
||||
(String) s_signout.localize(state.getRequest()));
|
||||
|
||||
content.addAttribute("greeting",
|
||||
(String)s_greet.localize(state.getRequest()));
|
||||
|
||||
(String) s_greet.localize(state.getRequest()));
|
||||
|
||||
content.addAttribute(
|
||||
"workspaceURL",
|
||||
|
|
@ -110,20 +116,25 @@ public class UserBanner extends SimpleComponent {
|
|||
content.addAttribute(
|
||||
"loginURL",
|
||||
URL.there(state.getRequest(),
|
||||
UI.getLoginPageURL()).toString());
|
||||
// LegacyInitializer.getFullURL(LegacyInitializer.LOGIN_PAGE_KEY,
|
||||
// state.getRequest())).toString());
|
||||
Login.getLoginPageURL()).toString());
|
||||
// LegacyInitializer.getFullURL(LegacyInitializer.LOGIN_PAGE_KEY,
|
||||
// state.getRequest())).toString());
|
||||
|
||||
content.addAttribute(
|
||||
"loginExcursionURL",
|
||||
URL.excursion(state.getRequest(),
|
||||
UI.getLoginPageURL()).toString());
|
||||
// LegacyInitializer.getFullURL(LegacyInitializer.LOGIN_PAGE_KEY,
|
||||
// state.getRequest())).toString());
|
||||
Login.getLoginPageURL()).toString());
|
||||
// LegacyInitializer.getFullURL(LegacyInitializer.LOGIN_PAGE_KEY,
|
||||
// state.getRequest())).toString());
|
||||
|
||||
content.addAttribute(
|
||||
"logoutURL",
|
||||
URL.there(state.getRequest(),UI.getLogoutPageURL()).toString());
|
||||
URL.there(state.getRequest(), LoginServlet.getLogoutPageURL()).toString());
|
||||
|
||||
content.addAttribute("changePasswordURL",
|
||||
URL.there(state.getRequest(),
|
||||
LoginServlet.getChangePasswordPageURL()).toString());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
package com.arsdigita.ui.login;
|
||||
|
||||
import com.arsdigita.bebop.Component;
|
||||
|
|
@ -41,70 +40,75 @@ import javax.servlet.http.HttpServletRequest;
|
|||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Login Application Servlet class, central entry point to create and process
|
||||
* the Login application UI.
|
||||
*
|
||||
* It manages user registration page, new user page, user workspace, logout,
|
||||
* and permissions admin pages.
|
||||
*
|
||||
* It just defines a mapping URL <-> various pages and uses the super class
|
||||
* to actually server the pages. Additionally is provides service methods
|
||||
* to expose various properties, especially the URL's of public subpages
|
||||
* (e.g. logout) and initializes the creation of the UI.
|
||||
*
|
||||
* Login Application Servlet class, central entry point to create and process the Login application
|
||||
* UI.
|
||||
*
|
||||
* It manages user registration page, new user page, user workspace, logout, and permissions admin
|
||||
* pages.
|
||||
*
|
||||
* It just defines a mapping URL <-> various pages and uses the super class to actually server the
|
||||
* pages. Additionally is provides service methods to expose various properties, especially the
|
||||
* URL's of public subpages (e.g. logout) and initializes the creation of the UI.
|
||||
*
|
||||
* @author Peter Boy <pboy@barkhof.uni-bremen.de>
|
||||
* @version $Id: LoginServlet.java 2161 2012-03-15 00:16:13Z pboy $
|
||||
*/
|
||||
public class LoginServlet extends BebopApplicationServlet {
|
||||
|
||||
/** Logger instance for debugging */
|
||||
/**
|
||||
* Logger instance for debugging
|
||||
*/
|
||||
private static final Logger s_log = Logger.getLogger(LoginServlet.class);
|
||||
|
||||
|
||||
// ////////////////////////////////////////////////////////////////////////
|
||||
// Define various URLs to subpages of Login to manage administrative tasks.
|
||||
// ////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/** PathInfo into the Login application to access the (optional) newUser *
|
||||
* page. Ends with "/" because it is a servlet/directory */
|
||||
/**
|
||||
* PathInfo into the Login application to access the (optional) newUser * page. Ends with "/"
|
||||
* because it is a servlet/directory
|
||||
*/
|
||||
public static final String EDIT_USER_PROFILE_PATH_INFO = "/edit-profile/";
|
||||
|
||||
/** PathInfo into the Login application to access the (optional) newUser *
|
||||
* page. Ends with "/" because it is a servlet/directory */
|
||||
/**
|
||||
* PathInfo into the Login application to access the (optional) newUser * page. Ends with "/"
|
||||
* because it is a servlet/directory
|
||||
*/
|
||||
public static final String NEW_USER_PATH_INFO = "/new-user/";
|
||||
|
||||
/** PathInfo into the Login application to access the (optional) newUser *
|
||||
* page. Ends with "/" because it is a servlet/directory */
|
||||
/**
|
||||
* PathInfo into the Login application to access the (optional) newUser * page. Ends with "/"
|
||||
* because it is a servlet/directory
|
||||
*/
|
||||
public static final String CHANGE_USER_PASSWORD_PATH_INFO = "/change-password/";
|
||||
|
||||
/** PathInfo into the Login application to access the (optional) newUser
|
||||
* page. Ends with "/" because it is a servlet/directory
|
||||
/**
|
||||
* PathInfo into the Login application to access the (optional) newUser page. Ends with "/"
|
||||
* because it is a servlet/directory
|
||||
*/
|
||||
public static final String RECOVER_USER_PASSWORD_PATH_INFO = "/recover-password/";
|
||||
|
||||
/** PathInfo into the Login application to access the (optional) newUser
|
||||
* page. Ends with "/" because it is a servlet/directory
|
||||
/**
|
||||
* PathInfo into the Login application to access the (optional) newUser page. Ends with "/"
|
||||
* because it is a servlet/directory
|
||||
*/
|
||||
public static final String EXPLAIN_PERSISTENT_COOKIES_PATH_INFO =
|
||||
"/explain-persistent-cookies/";
|
||||
public static final String EXPLAIN_PERSISTENT_COOKIES_PATH_INFO = "/explain-persistent-cookies/";
|
||||
|
||||
/** PathInfo into the Login application to access the (optional) newUser
|
||||
* page. Ends with "/" because it is a servlet/directory
|
||||
/**
|
||||
* PathInfo into the Login application to access the (optional) newUser page. Ends with "/"
|
||||
* because it is a servlet/directory
|
||||
*/
|
||||
public static final String LOGIN_EXPIRED_PATH_INFO = "/login-expired/";
|
||||
|
||||
/** PathInfo into the Login application to access the (optional) newUser
|
||||
* page. Ends with "/" because it is a servlet/directory
|
||||
/**
|
||||
* PathInfo into the Login application to access the (optional) newUser page. Ends with "/"
|
||||
* because it is a servlet/directory
|
||||
*/
|
||||
public static final String LOGOUT_PATH_INFO = "/logout/";
|
||||
|
||||
|
||||
|
||||
/** Base URL of the Login application for internal use, fetched from
|
||||
* Login domain class. */
|
||||
/**
|
||||
* Base URL of the Login application for internal use, fetched from Login domain class.
|
||||
*/
|
||||
private final static String s_loginURL = Login.LOGIN_PAGE_URL;
|
||||
|
||||
// define namespace URI
|
||||
|
|
@ -113,10 +117,9 @@ public class LoginServlet extends BebopApplicationServlet {
|
|||
public static final String APPLICATION_NAME = "login";
|
||||
|
||||
/**
|
||||
* User extension point used to create the pages to server and setup a
|
||||
* URL - page mapping.
|
||||
*
|
||||
* @throws ServletException
|
||||
* User extension point used to create the pages to server and setup a URL - page mapping.
|
||||
*
|
||||
* @throws ServletException
|
||||
*/
|
||||
@Override
|
||||
public void doInit() throws ServletException {
|
||||
|
|
@ -130,23 +133,23 @@ public class LoginServlet extends BebopApplicationServlet {
|
|||
/* Create and add login page (index page of Login application) to the
|
||||
* page map. KernelSecurityConfig determines whether to create a link
|
||||
* to a NewUserRegistrationForm or to skip. */
|
||||
put("/" ,
|
||||
put("/",
|
||||
buildSimplePage("login.userRegistrationForm.title",
|
||||
new UserLoginForm( Kernel.getSecurityConfig()
|
||||
.isAutoRegistrationOn() ),
|
||||
new UserLoginForm(Kernel.getSecurityConfig()
|
||||
.isAutoRegistrationOn()),
|
||||
"login"));
|
||||
disableClientCaching("/");
|
||||
|
||||
/* Create and add userEditPage to the page map. */
|
||||
put(EDIT_USER_PROFILE_PATH_INFO,
|
||||
buildSimplePage("login.userEditPage.title",
|
||||
new UserEditForm(), "edit") );
|
||||
new UserEditForm(), "edit"));
|
||||
disableClientCaching(EDIT_USER_PROFILE_PATH_INFO);
|
||||
|
||||
/* Determines if a NewUserRegistrationForm has to be created by quering
|
||||
* Kernel.getSecurityConfig() and acts appropriately */
|
||||
if (Kernel.getSecurityConfig().isAutoRegistrationOn()) {
|
||||
put(NEW_USER_PATH_INFO,
|
||||
put(NEW_USER_PATH_INFO,
|
||||
buildSimplePage("login.userNewForm.title",
|
||||
new UserNewForm(),
|
||||
"register"));
|
||||
|
|
@ -154,21 +157,21 @@ public class LoginServlet extends BebopApplicationServlet {
|
|||
}
|
||||
|
||||
/* Create ExplainPersistentCookiesPage and add to the page map */
|
||||
put(EXPLAIN_PERSISTENT_COOKIES_PATH_INFO,
|
||||
buildSimplePage("login.explainCookiesPage.title",
|
||||
put(EXPLAIN_PERSISTENT_COOKIES_PATH_INFO,
|
||||
buildSimplePage("login.explainCookiesPage.title",
|
||||
new ElementComponent("subsite:explainPersistentCookies",
|
||||
SUBSITE_NS_URI),
|
||||
SUBSITE_NS_URI),
|
||||
"cookies"));
|
||||
|
||||
/* Create ChangeUserPasswordPage and add to the page map */
|
||||
put(CHANGE_USER_PASSWORD_PATH_INFO,
|
||||
put(CHANGE_USER_PASSWORD_PATH_INFO,
|
||||
buildSimplePage("login.changePasswordPage.title",
|
||||
new ChangePasswordForm(),
|
||||
"changepassword"));
|
||||
disableClientCaching(CHANGE_USER_PASSWORD_PATH_INFO);
|
||||
|
||||
/* Build the password recover page, retrieve its URL and store in map */
|
||||
put(RECOVER_USER_PASSWORD_PATH_INFO,
|
||||
put(RECOVER_USER_PASSWORD_PATH_INFO,
|
||||
buildSimplePage("login.recoverPasswordPage.title",
|
||||
new RecoverPasswordPanel(),
|
||||
"recoverpassword"));
|
||||
|
|
@ -180,7 +183,6 @@ public class LoginServlet extends BebopApplicationServlet {
|
|||
put(LOGOUT_PATH_INFO, buildLogOutPage());
|
||||
disableClientCaching(LOGOUT_PATH_INFO);
|
||||
|
||||
|
||||
Page workspace = checkForPageSubClass();
|
||||
if (workspace == null) {
|
||||
workspace = buildSimplePage("login.workspacePage.title",
|
||||
|
|
@ -202,37 +204,37 @@ public class LoginServlet extends BebopApplicationServlet {
|
|||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check wether a custom base Page class (top-level container for all Bebop
|
||||
* components and containersPages) is configured and return the appropriate
|
||||
* Page. Here used (only) for UserInfo() workspace.
|
||||
*
|
||||
* @return Page to use for top-level container for all Bebop components and
|
||||
* containersPage, null to use default class
|
||||
* Check wether a custom base Page class (top-level container for all Bebop components and
|
||||
* containersPages) is configured and return the appropriate Page. Here used (only) for
|
||||
* UserInfo() workspace.
|
||||
*
|
||||
* @return Page to use for top-level container for all Bebop components and containersPage, null
|
||||
* to use default class
|
||||
*/
|
||||
private static Page checkForPageSubClass() {
|
||||
//check to see if there is subclass of Page defined in Config
|
||||
DispatcherConfig dc = DispatcherHelper.getConfig();
|
||||
String pageClass = dc.getDefaultPageClass();
|
||||
Page p = null;
|
||||
if (!pageClass.equals("com.arsdigita.bebop.Page")) {
|
||||
try {
|
||||
// afraid that we're assuming a no-arg constructor
|
||||
Class c = Class.forName(pageClass);
|
||||
p = (Page)c.newInstance();
|
||||
} catch (Exception e) {
|
||||
s_log.error("Unable to instantiate waf.dispatcher.default_page_class",e);
|
||||
}
|
||||
}
|
||||
return p;
|
||||
}
|
||||
//check to see if there is subclass of Page defined in Config
|
||||
DispatcherConfig dc = DispatcherHelper.getConfig();
|
||||
String pageClass = dc.getDefaultPageClass();
|
||||
Page p = null;
|
||||
if (!pageClass.equals("com.arsdigita.bebop.Page")) {
|
||||
try {
|
||||
// afraid that we're assuming a no-arg constructor
|
||||
Class c = Class.forName(pageClass);
|
||||
p = (Page) c.newInstance();
|
||||
} catch (Exception e) {
|
||||
s_log.error("Unable to instantiate waf.dispatcher.default_page_class", e);
|
||||
}
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Page with the given title and body component.
|
||||
*
|
||||
* @return the new Page
|
||||
**/
|
||||
*
|
||||
*/
|
||||
private static Page buildSimplePage(String title, Component body, String id) {
|
||||
|
||||
Page page = PageFactory.buildPage(APPLICATION_NAME,
|
||||
|
|
@ -244,160 +246,150 @@ public class LoginServlet extends BebopApplicationServlet {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a page informing the user the login has expired. Provides links
|
||||
* to login again, etc.
|
||||
*
|
||||
* Creates a page informing the user the login has expired. Provides links to login again, etc.
|
||||
*
|
||||
* @return Page (login expired info)
|
||||
*/
|
||||
private static Page buildExpiredPage() {
|
||||
Page page = PageFactory.buildPage(
|
||||
APPLICATION_NAME,
|
||||
new Label(LoginHelper.getMessage("login.loginExpiredPage.title"))
|
||||
);
|
||||
);
|
||||
page.add(new SimpleContainer() {
|
||||
{ // constructor
|
||||
add(new Label(LoginHelper.getMessage
|
||||
("login.loginExpiredPage.before")));
|
||||
add(new DynamicLink("login.loginExpiredPage.link",
|
||||
Login.getLoginPageURL() ));
|
||||
add(new Label(LoginHelper.getMessage
|
||||
("login.loginExpiredPage.after")));
|
||||
add(new ElementComponent("subsite:explainLoginExpired",
|
||||
SUBSITE_NS_URI));
|
||||
}
|
||||
});
|
||||
{ // constructor
|
||||
add(new Label(LoginHelper.getMessage("login.loginExpiredPage.before")));
|
||||
add(new DynamicLink("login.loginExpiredPage.link",
|
||||
Login.getLoginPageURL()));
|
||||
add(new Label(LoginHelper.getMessage("login.loginExpiredPage.after")));
|
||||
add(new ElementComponent("subsite:explainLoginExpired",
|
||||
SUBSITE_NS_URI));
|
||||
}
|
||||
|
||||
});
|
||||
page.lock();
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private static Page buildLogOutPage() {
|
||||
Page page = PageFactory.buildPage(
|
||||
APPLICATION_NAME,
|
||||
new Label(LoginHelper.getMessage("Logout"))
|
||||
);
|
||||
);
|
||||
page.addActionListener(new UserLogoutListener());
|
||||
page.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
final PageState state = event.getPageState();
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
final PageState state = event.getPageState();
|
||||
|
||||
final HttpServletRequest req = state.getRequest();
|
||||
final HttpServletRequest req = state.getRequest();
|
||||
|
||||
final String path = UI.getRootPageURL(req);
|
||||
final String path = UI.getRootPageURL(req);
|
||||
|
||||
throw new ReturnSignal(req, URL.there(req, path));
|
||||
}
|
||||
});
|
||||
throw new ReturnSignal(req, URL.there(req, path));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
page.lock();
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Provides an (absolute) URL to a user profile editig page.
|
||||
* It is relative to document root without any constant prefix if there is
|
||||
* one configured.
|
||||
* Provides an (absolute) URL to a user profile editig page. It is relative to document root
|
||||
* without any constant prefix if there is one configured.
|
||||
*
|
||||
* XXX This implementation starts with a leading slash and ends with a slash.
|
||||
* In previous configurations String urls began without a slash in order
|
||||
* to be able to provide a full URL which also contains the context part.
|
||||
* Since version 5.2 the context part is handled by (new) dispatcher.
|
||||
* The leading slash it API change! It's impacts have to be checked. (2011-02)
|
||||
* XXX This implementation starts with a leading slash and ends with a slash. In previous
|
||||
* configurations String urls began without a slash in order to be able to provide a full URL
|
||||
* which also contains the context part. Since version 5.2 the context part is handled by (new)
|
||||
* dispatcher. The leading slash it API change! It's impacts have to be checked. (2011-02)
|
||||
*
|
||||
* @return url to EditUserProfile page as String
|
||||
*/
|
||||
public static String getEditUserProfilePageURL() {
|
||||
return s_loginURL + EDIT_USER_PROFILE_PATH_INFO;
|
||||
return s_loginURL + EDIT_USER_PROFILE_PATH_INFO;
|
||||
}
|
||||
|
||||
public static String getChangePasswordPageURL() {
|
||||
return s_loginURL + CHANGE_USER_PASSWORD_PATH_INFO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides an (absolute URL) to an optional new user registration page
|
||||
* (accessible only if activated). It is relative to document root
|
||||
* without any constant prefix if there is one configured.
|
||||
* Provides an (absolute URL) to an optional new user registration page (accessible only if
|
||||
* activated). It is relative to document root without any constant prefix if there is one
|
||||
* configured.
|
||||
*
|
||||
* XXX This implementation starts with a leading slash and ends with a slash.
|
||||
* In previous configurations String urls began without a slash in order
|
||||
* to be able to provide a full URL which also contains the context part.
|
||||
* Since version 5.2 the context part is handled by (new) dispatcher.
|
||||
* The leading slash it API change! It's impacts have to be checked. (2011-02)
|
||||
* XXX This implementation starts with a leading slash and ends with a slash. In previous
|
||||
* configurations String urls began without a slash in order to be able to provide a full URL
|
||||
* which also contains the context part. Since version 5.2 the context part is handled by (new)
|
||||
* dispatcher. The leading slash it API change! It's impacts have to be checked. (2011-02)
|
||||
*
|
||||
* @return url to new user registration page as String
|
||||
*/
|
||||
public static String getNewUserPageURL() {
|
||||
return s_loginURL + NEW_USER_PATH_INFO;
|
||||
return s_loginURL + NEW_USER_PATH_INFO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides an absolute URL (leading slash) for a password recovery page.
|
||||
* It is relative to document root without any constant prefix if there is
|
||||
* one configured.
|
||||
* Provides an absolute URL (leading slash) for a password recovery page. It is relative to
|
||||
* document root without any constant prefix if there is one configured.
|
||||
*
|
||||
* XXX This implementation starts with a leading slash and ends with a slash.
|
||||
* In previous configurations String urls began without a slash in order
|
||||
* to be able to provide a full URL which also contains the context part.
|
||||
* Since version 5.2 the context part is handled by (new) dispatcher.
|
||||
* The leading slash it API change! It's impacts have tp be checked. (2011-02)
|
||||
* XXX This implementation starts with a leading slash and ends with a slash. In previous
|
||||
* configurations String urls began without a slash in order to be able to provide a full URL
|
||||
* which also contains the context part. Since version 5.2 the context part is handled by (new)
|
||||
* dispatcher. The leading slash it API change! It's impacts have tp be checked. (2011-02)
|
||||
*
|
||||
* @return url String for new user registration page as String
|
||||
*/
|
||||
public static String getRecoverPasswordPageURL() {
|
||||
return s_loginURL + RECOVER_USER_PASSWORD_PATH_INFO;
|
||||
return s_loginURL + RECOVER_USER_PASSWORD_PATH_INFO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides an absolute URL (leading slash) for a cookie explanation page.
|
||||
* It is relative to document root without any constant prefix if there is
|
||||
* one configured.
|
||||
* Provides an absolute URL (leading slash) for a cookie explanation page. It is relative to
|
||||
* document root without any constant prefix if there is one configured.
|
||||
*
|
||||
* XXX This implementation starts with a leading slash and ends with a slash.
|
||||
* In previous configurations String urls began without a slash in order
|
||||
* to be able to provide a full URL which also contains the context part.
|
||||
* Since version 5.2 the context part is handled by (new) dispatcher.
|
||||
* The leading slash it API change! It's impacts have tp be checked. (2011-02)
|
||||
* XXX This implementation starts with a leading slash and ends with a slash. In previous
|
||||
* configurations String urls began without a slash in order to be able to provide a full URL
|
||||
* which also contains the context part. Since version 5.2 the context part is handled by (new)
|
||||
* dispatcher. The leading slash it API change! It's impacts have tp be checked. (2011-02)
|
||||
*
|
||||
* @return url String for new user registration page as String
|
||||
*/
|
||||
public static String getCookiesExplainPageURL() {
|
||||
return s_loginURL + EXPLAIN_PERSISTENT_COOKIES_PATH_INFO;
|
||||
return s_loginURL + EXPLAIN_PERSISTENT_COOKIES_PATH_INFO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides an absolute URL (leading slash) for a login expired info page.
|
||||
* It is relative to document root without any constant prefix if there is
|
||||
* one configured.
|
||||
* Provides an absolute URL (leading slash) for a login expired info page. It is relative to
|
||||
* document root without any constant prefix if there is one configured.
|
||||
*
|
||||
* XXX This implementation starts with a leading slash and ends with a slash.
|
||||
* In previous configurations String urls began without a slash in order
|
||||
* to be able to provide a full URL which also contains the context part.
|
||||
* Since version 5.2 the context part is handled by (new) dispatcher.
|
||||
* The leading slash it API change! It's impacts have tp be checked. (2011-02)
|
||||
* XXX This implementation starts with a leading slash and ends with a slash. In previous
|
||||
* configurations String urls began without a slash in order to be able to provide a full URL
|
||||
* which also contains the context part. Since version 5.2 the context part is handled by (new)
|
||||
* dispatcher. The leading slash it API change! It's impacts have tp be checked. (2011-02)
|
||||
*
|
||||
* @return url String for new user registration page as String
|
||||
*/
|
||||
public static String getLoginExpiredPageURL() {
|
||||
return s_loginURL + LOGIN_EXPIRED_PATH_INFO;
|
||||
return s_loginURL + LOGIN_EXPIRED_PATH_INFO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides an absolute URL (leading slash) for the system logout page. It
|
||||
* is relative to document root without any constant prefix if there is one
|
||||
* configured.
|
||||
* Provides an absolute URL (leading slash) for the system logout page. It is relative to
|
||||
* document root without any constant prefix if there is one configured.
|
||||
*
|
||||
* XXX This implementation starts with a leading slash and ends with a slash.
|
||||
* In previous configurations String urls began without a slash in order
|
||||
* to be able to provide a full URL which also contains the context part.
|
||||
* Since version 5.2 the context part is handled by (new) dispatcher.
|
||||
* The leading slash it API change! It's impacts have tp be checked. (2011-02)
|
||||
* XXX This implementation starts with a leading slash and ends with a slash. In previous
|
||||
* configurations String urls began without a slash in order to be able to provide a full URL
|
||||
* which also contains the context part. Since version 5.2 the context part is handled by (new)
|
||||
* dispatcher. The leading slash it API change! It's impacts have tp be checked. (2011-02)
|
||||
*
|
||||
* @return URL for logout page as String
|
||||
*/
|
||||
public static String getLogoutPageURL() {
|
||||
return s_loginURL + LOGOUT_PATH_INFO;
|
||||
return s_loginURL + LOGOUT_PATH_INFO;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
com.arsdigita.cms.contentassets.about.discusses.label=Discusses
|
||||
com.arsdigita.cms.contentassets.about.discussing.label=Discussed by
|
||||
com.arsdigita.cms.contentassets.about.discusses.label=Discussed publications
|
||||
com.arsdigita.cms.contentassets.about.discussing.label=Discussing publications
|
||||
com.arsdigita.cms.contentassets.about.discusses.add=Add a discussed publication
|
||||
com.arsdigita.cms.contentassets.about.discusses.none=No publications found
|
||||
com.arsdigita.cms.contentassets.about.discusses.publication=Publication
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
com.arsdigita.cms.contentassets.about.discusses.label=Behandelt
|
||||
com.arsdigita.cms.contentassets.about.discusses.label=Behandelte Publikationen
|
||||
com.arsdigita.cms.contentassets.about.discussing.label=Wird behandelt in
|
||||
com.arsdigita.cms.contentassets.about.discusses.add=Behandelte Publikation hinzuf\u00fcgen
|
||||
com.arsdigita.cms.contentassets.about.discusses.none=Keine Publikationen gefunden
|
||||
|
|
|
|||
|
|
@ -31,92 +31,98 @@
|
|||
<!-- Autor: Sören Bernstein -->
|
||||
|
||||
<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:nav="http://ccm.redhat.com/navigation"
|
||||
xmlns:mandalay="http://mandalay.quasiweb.de"
|
||||
exclude-result-prefixes="xsl bebop cms nav mandalay"
|
||||
version="1.0">
|
||||
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:nav="http://ccm.redhat.com/navigation"
|
||||
xmlns:mandalay="http://mandalay.quasiweb.de"
|
||||
exclude-result-prefixes="xsl bebop cms nav mandalay"
|
||||
version="1.0">
|
||||
|
||||
<!-- DE Das Menü -->
|
||||
<!-- EN The menu -->
|
||||
<xsl:template match="cms:globalNavigation">
|
||||
<xsl:param name="layoutTree" select="."/>
|
||||
<!-- DE Das Menü -->
|
||||
<!-- EN The menu -->
|
||||
<xsl:template match="cms:globalNavigation">
|
||||
<xsl:param name="layoutTree" select="."/>
|
||||
|
||||
<xsl:variable name="setLayout">
|
||||
<xsl:call-template name="mandalay:getSetting">
|
||||
<xsl:with-param name="node" select="$layoutTree/setLayout"/>
|
||||
<xsl:with-param name="module" select="'cms'"/>
|
||||
<xsl:with-param name="setting" select="'globalNavigation/setLayout'"/>
|
||||
<xsl:with-param name="default" select="'horizontal'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="setLayout">
|
||||
<xsl:call-template name="mandalay:getSetting">
|
||||
<xsl:with-param name="node" select="$layoutTree/setLayout"/>
|
||||
<xsl:with-param name="module" select="'cms'"/>
|
||||
<xsl:with-param name="setting" select="'globalNavigation/setLayout'"/>
|
||||
<xsl:with-param name="default" select="'horizontal'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<div class="cmsGlobalNavigation">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$setLayout = 'horizontal'">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<ul>
|
||||
<xsl:for-each select="*">
|
||||
<li>
|
||||
<xsl:apply-templates/>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
</xsl:template>
|
||||
<div class="cmsGlobalNavigation">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$setLayout = 'horizontal'">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<ul>
|
||||
<xsl:for-each select="*">
|
||||
<li>
|
||||
<xsl:apply-templates/>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<!-- DE -->
|
||||
<!-- EN -->
|
||||
<xsl:template match="cms:contentCenter">
|
||||
<span class="cmsGlobalNavigationContentCenter">
|
||||
<xsl:call-template name="cms:globalNavigationEntry"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
<!-- DE -->
|
||||
<!-- EN -->
|
||||
<xsl:template match="cms:contentCenter">
|
||||
<span class="cmsGlobalNavigationContentCenter">
|
||||
<xsl:call-template name="cms:globalNavigationEntry"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<!-- DE -->
|
||||
<!-- EN -->
|
||||
<xsl:template match="cms:adminCenter">
|
||||
<span class="cmsGlobalNavigationAdminCenter">
|
||||
<xsl:call-template name="cms:globalNavigationEntry"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
<!-- DE -->
|
||||
<!-- EN -->
|
||||
<xsl:template match="cms:adminCenter">
|
||||
<span class="cmsGlobalNavigationAdminCenter">
|
||||
<xsl:call-template name="cms:globalNavigationEntry"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<!-- DE -->
|
||||
<!-- EN -->
|
||||
<xsl:template match="cms:workspace">
|
||||
<span class="cmsGlobalNavigationWorkspace">
|
||||
<xsl:call-template name="cms:globalNavigationEntry"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
<!-- DE -->
|
||||
<!-- EN -->
|
||||
<xsl:template match="cms:workspace">
|
||||
<span class="cmsGlobalNavigationWorkspace">
|
||||
<xsl:call-template name="cms:globalNavigationEntry"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<!-- DE -->
|
||||
<!-- EN -->
|
||||
<xsl:template match="cms:signOut">
|
||||
<span class="cmsGlobalNavigationSignOut">
|
||||
<xsl:call-template name="cms:globalNavigationEntry"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
<xsl:template match="cms:changePassword">
|
||||
<span class="cmsGlobalNavigationChangePassword">
|
||||
<xsl:call-template name="cms:globalNavigationEntry"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<!-- DE -->
|
||||
<!-- EN -->
|
||||
<xsl:template match="cms:help">
|
||||
<span class="cmsGlobalNavigationHelp">
|
||||
<xsl:call-template name="cms:globalNavigationEntry"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
<!-- DE -->
|
||||
<!-- EN -->
|
||||
<xsl:template match="cms:signOut">
|
||||
<span class="cmsGlobalNavigationSignOut">
|
||||
<xsl:call-template name="cms:globalNavigationEntry"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<!-- DE Erzeuge den Link -->
|
||||
<!-- EN Create the link -->
|
||||
<xsl:template name="cms:globalNavigationEntry">
|
||||
<a href="{@href}">
|
||||
<xsl:value-of select="@title"/>
|
||||
</a>
|
||||
</xsl:template>
|
||||
<!-- DE -->
|
||||
<!-- EN -->
|
||||
<xsl:template match="cms:help">
|
||||
<span class="cmsGlobalNavigationHelp">
|
||||
<xsl:call-template name="cms:globalNavigationEntry"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<!-- DE Erzeuge den Link -->
|
||||
<!-- EN Create the link -->
|
||||
<xsl:template name="cms:globalNavigationEntry">
|
||||
<a href="{@href}">
|
||||
<xsl:value-of select="@title"/>
|
||||
</a>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
|
|||
|
|
@ -52,7 +52,12 @@
|
|||
<script type="text/javascript" src="/assets/fancybox/jquery.mousewheel.pack.js"/>
|
||||
<link rel="stylesheet" href="/assets/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen"/>
|
||||
|
||||
<script type="text/javascript">$(document).ready(function() {$("a.imageZoom").fancybox({'type':'image'}); $("a.imageGallery").fancybox({'type':'image'});});</script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("a.imageZoom").fancybox({'type':'image'});
|
||||
$("a.imageGallery").fancybox({'type':'image'});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
</xsl:if>
|
||||
-->
|
||||
|
|
|
|||
|
|
@ -804,6 +804,21 @@
|
|||
<xsl:template match="useWorkspaceLink">
|
||||
<xsl:apply-templates select="$resultTree/cms:globalNavigation/cms:workspace"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="useChangePasswordLink">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$resultTree/cms:globalNavigation">
|
||||
<xsl:apply-templates select="$resultTree/cms:globalNavigation/cms:changePassword"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$resultTree/ui:userBanner">
|
||||
<span class="cmsGlobalNavigationChangePassword">
|
||||
<a href="{$resultTree/ui:userBanner/@changePasswordURL}">
|
||||
<xsl:apply-templates select="$resultTree/ui:userBanner/@changePasswordLabel"/>
|
||||
</a>
|
||||
</span>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="useLogoutLink">
|
||||
<xsl:choose>
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
<div id="userwidget" class="cmsHeaderMenu">
|
||||
<showCMSGreeting/>
|
||||
<showCMSGlobalNavigation>
|
||||
<useChangePasswordLink/>
|
||||
<useLogoutLink/>
|
||||
</showCMSGlobalNavigation>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@
|
|||
version="1.0">
|
||||
<!-- DE Leadtext -->
|
||||
<!-- EN lead text view -->
|
||||
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.SciOrganization']" mode="lead">
|
||||
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.SimpleOrganization']" mode="lead">
|
||||
<xsl:variable name="setLeadText">
|
||||
<xsl:call-template name="mandalay:getSetting">
|
||||
<xsl:with-param name="module" select="'SciOrganization'"/>
|
||||
<xsl:with-param name="module" select="'SimpleOrganization'"/>
|
||||
<xsl:with-param name="setting" select="'setLeadText'"/>
|
||||
<xsl:with-param name="default" select="'true'"/>
|
||||
</xsl:call-template>
|
||||
|
|
@ -47,34 +47,34 @@
|
|||
|
||||
<!-- DE Bild -->
|
||||
<!-- EN image -->
|
||||
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.SciOrganization']" mode="image">
|
||||
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.SimpleOrganization']" mode="image">
|
||||
|
||||
<!-- DE Hole alle benötigten Einstellungen-->
|
||||
<!-- EN Getting all needed setting-->
|
||||
<xsl:variable name="setImage">
|
||||
<xsl:call-template name="mandalay:getSetting">
|
||||
<xsl:with-param name="module" select="'SciOrganization'"/>
|
||||
<xsl:with-param name="module" select="'SimpleOrganization'"/>
|
||||
<xsl:with-param name="setting" select="'setImage'"/>
|
||||
<xsl:with-param name="default" select="'true'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="setImageMaxHeight">
|
||||
<xsl:call-template name="mandalay:getSetting">
|
||||
<xsl:with-param name="module" select="'SciOrganization'"/>
|
||||
<xsl:with-param name="module" select="'SimpleOrganization'"/>
|
||||
<xsl:with-param name="setting" select="'setImageMaxHeight'"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="setImageMaxWidth">
|
||||
<xsl:call-template name="mandalay:getSetting">
|
||||
<xsl:with-param name="module" select="'SciOrganization'"/>
|
||||
<xsl:with-param name="module" select="'SimpleOrganization'"/>
|
||||
<xsl:with-param name="setting" select="'setImageMaxWidth'"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="setImageCaption">
|
||||
<xsl:call-template name="mandalay:getSetting">
|
||||
<xsl:with-param name="module" select="'SciOrganization'"/>
|
||||
<xsl:with-param name="module" select="'SimpleOrganization'"/>
|
||||
<xsl:with-param name="setting" select="'setImageCaption'"/>
|
||||
<xsl:with-param name="default" select="'true'"/>
|
||||
</xsl:call-template>
|
||||
|
|
|
|||
Loading…
Reference in New Issue