- Refactored the FolderManipulator, removing potential NPE etc.
- Texts in the select boxes of the subsite admin form are now localised (Ticket #2032). git-svn-id: https://svn.libreccm.org/ccm/trunk@2636 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
0c492b9aaf
commit
18be8f11c6
|
|
@ -49,15 +49,14 @@ import com.arsdigita.cms.ContentType;
|
|||
import com.arsdigita.cms.Folder;
|
||||
import com.arsdigita.cms.SecurityManager;
|
||||
import com.arsdigita.cms.dispatcher.Utilities;
|
||||
import com.arsdigita.cms.ui.folder.FolderManipulator;
|
||||
import com.arsdigita.cms.ui.folder.FolderSelectionModel;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import com.arsdigita.persistence.CompoundFilter;
|
||||
import com.arsdigita.persistence.FilterFactory;
|
||||
import com.arsdigita.toolbox.GlobalisationUtil;
|
||||
import com.arsdigita.util.Assert;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
/**
|
||||
* Browse folders and items. If the user clicks on a folder, the folder
|
||||
|
|
@ -483,7 +482,11 @@ public class ItemSearchFolderBrowser extends Table {
|
|||
* @pre ( key != null )
|
||||
*/
|
||||
private static GlobalizedMessage globalize(String key) {
|
||||
return FolderManipulator.globalize(key);
|
||||
//return FolderManipulator.globalize(key);
|
||||
final GlobalisationUtil util = new GlobalisationUtil(
|
||||
"com.arsdigita.cms."
|
||||
+ "ui.folder.CMSFolderResources");
|
||||
return util.globalise(key);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
COMMENT.00=BUTTONS/LINKS/LABELS
|
||||
cms.ui.folder.edit_selection=Copy or move checked items:
|
||||
cms.ui.folder.edit_selection=What to do with checked items
|
||||
cms.ui.folder.save=Save
|
||||
cms.ui.folder.cancel=Cancel
|
||||
cms.ui.folder.edit=Edit
|
||||
cms.ui.folder.delete=Delete
|
||||
cms.ui.folder.move=Move
|
||||
cms.ui.folder.copy=Copy
|
||||
cms.ui.folder.move=Move {0} items from {1} to {2}.
|
||||
cms.ui.folder.copy=Copy {0} items from {1}
|
||||
cms.ui.folder.go=Go
|
||||
cms.ui.folder.name=Name
|
||||
cms.ui.folder.type=Type
|
||||
|
|
@ -63,9 +63,9 @@ cms.ui.folder.no_source_items_specified=No source items specified.
|
|||
cms.ui.folder.need_select_target_folder=You need to select a folder to which the items should be copied/moved.
|
||||
cms.ui.folder.not_within_same_folder=Cannot move/copy items within the same folder.
|
||||
cms.ui.folder.no_permission=You do not have permission to create, copy, or move items.
|
||||
cms.ui.folder.item_already_exists=There is already an item in the target folder named:
|
||||
cms.ui.folder.item_is_live= is live; you must unpublish it before moving it.
|
||||
cms.ui.folder.no_permission_for_item=You do not have permission to delete or move
|
||||
cms.ui.folder.item_already_exists=There is already an item in the target folder named: {0}
|
||||
cms.ui.folder.item_is_live= {0} is live; you must unpublish it before moving it.
|
||||
cms.ui.folder.no_permission_for_item=You do not have permission to delete or move {0}.
|
||||
cms.ui.folder.no_such_item=Item ID supplied does not match an existing Content Item.
|
||||
cms.ui.folder.filter.all=All
|
||||
cms.ui.folder.filter=Filter for work
|
||||
|
|
@ -73,3 +73,7 @@ cms.ui.folder.filter_do=Filter
|
|||
cms.ui.folder.languages=Languages
|
||||
cms.ui.folder.delete_confirmation=Permanently delete this item?
|
||||
cms.ui.folder.additionalInfo=Info
|
||||
cms.ui.folder.move.action=Move
|
||||
cms.ui.folder.copy.action=Copy
|
||||
cms.ui.folder.publish.action=(Re-)publish
|
||||
cms.ui.folder.unpublish.action=Unpublish
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ cms.ui.folder.save=Speichern
|
|||
cms.ui.folder.cancel=Abbrechen
|
||||
cms.ui.folder.edit=Editieren
|
||||
cms.ui.folder.delete=L\u00f6schen
|
||||
cms.ui.folder.move=Verschieben
|
||||
cms.ui.folder.copy=Kopieren
|
||||
cms.ui.folder.move=Verschiebe {0} Dokumente von {1} nach {2}.
|
||||
cms.ui.folder.copy=Kopiere {0} Dokumente von {1} nach
|
||||
cms.ui.folder.go=Los
|
||||
cms.ui.folder.name=Name
|
||||
cms.ui.folder.type=Typ
|
||||
|
|
@ -57,9 +57,9 @@ cms.ui.folder.no_source_items_specified=Es wurden keine Ursprungseintr\u00e4ge g
|
|||
cms.ui.folder.need_select_target_folder=Es mu\u00df ein Ordner ausgew\u00e4hlt werden, in den die Eintr\u00e4ge verschoben oder kopiert werden sollen.
|
||||
cms.ui.folder.not_within_same_folder=Kopieren/Verschieben im gleichen Ordner nicht m\u00f6glich
|
||||
cms.ui.folder.no_permission=Sie haben nicht die Berechtigung Eintr\u00e4ge zu erzeugen, zu kopieren oder zu verschieben.
|
||||
cms.ui.folder.item_already_exists=Es gibt schon einen Eintrag im Zielordner mit Namen:
|
||||
cms.ui.folder.item_is_live=ist ver\u00f6ffentlicht. Sie m\u00fcssen ihn zum Verschieben zur\u00fcckholen
|
||||
cms.ui.folder.no_permission_for_item=Sie haben nicht die Berechtigung zum L\u00f6schen oder Verschieben.
|
||||
cms.ui.folder.item_already_exists=Es gibt schon einen Eintrag im Zielordner mit Namen: {0}
|
||||
cms.ui.folder.item_is_live={0} ist ver\u00f6ffentlicht. Sie m\u00fcssen ihn zum Verschieben depublizieren.
|
||||
cms.ui.folder.no_permission_for_item=Sie haben nicht die Berechtigung {0} zum L\u00f6schen oder Verschieben.
|
||||
cms.ui.folder.no_such_item=Die verwendete Eintrags-ID pa\u00dft zu keinem Eintrag.
|
||||
|
||||
cms.ui.folder.remove_asset_link=Entfernen
|
||||
|
|
@ -68,8 +68,12 @@ cms.ui.folder.filter=Nach Begriff filtern
|
|||
cms.ui.folder.filter_do=Filtern
|
||||
cms.ui.folder.languages=Sprachen
|
||||
cms.ui.folder.delete_confirmation=Wollen Sie dieses Content-Item l\u00f6schen?
|
||||
cms.ui.folder.edit_selection=Ausgew\u00e4hlte Items kopieren oder verschieben:
|
||||
cms.ui.folder.edit_selection=Ausgew\u00e4hlte Items
|
||||
cms.ui.folder.creation_date=Erstellungsdatum
|
||||
cms.ui.folder.last_modified=Letzte \u00c4nderung
|
||||
cms.ui.folder.index=Index
|
||||
cms.ui.folder.additionalInfo=Info
|
||||
cms.ui.folder.move.action=Verschieben
|
||||
cms.ui.folder.copy.action=Kopieren
|
||||
cms.ui.folder.publish.action=(Re-)Publizieren
|
||||
cms.ui.folder.unpublish.action=Depublizieren
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ cms.ui.folder.save=Sauver
|
|||
cms.ui.folder.cancel=Annuler
|
||||
cms.ui.folder.edit=Modifier
|
||||
cms.ui.folder.delete=Effacer
|
||||
cms.ui.folder.move=D\u00e9placer
|
||||
cms.ui.folder.copy=Copier
|
||||
cms.ui.folder.move=
|
||||
cms.ui.folder.copy=
|
||||
cms.ui.folder.go=Go
|
||||
cms.ui.folder.name=Nom
|
||||
cms.ui.folder.type=Type
|
||||
|
|
@ -60,11 +60,15 @@ cms.ui.folder.no_source_items_specified=Pas d'\u00e9l\u00e9ment source sp\u00e9c
|
|||
cms.ui.folder.need_select_target_folder=Vous devez s\u00e9lectionner un dossier dans lequel les \u00e9l\u00e9ments seront d\u00e9plac\u00e9s ou copi\u00e9s.
|
||||
cms.ui.folder.not_within_same_folder=Impossible de d\u00e9placer ou de copier des \u00e9l\u00e9ments \u00e0 l'int\u00e9rieur d'un m\u00eame dossier.
|
||||
cms.ui.folder.no_permission=Vous n'avez pas l'autorisation de cr\u00e9er, de copier, ou de d\u00e9placer des \u00e9l\u00e9ments.
|
||||
cms.ui.folder.item_already_exists=Il y a d\u00e9j\u00e0 un \u00e9l\u00e9ment dans le dossier destination appel\u00e9:
|
||||
cms.ui.folder.item_is_live=est en ligne ; Vous devez le d\u00e9-publier avant de le d\u00e9placer.
|
||||
cms.ui.folder.no_permission_for_item=Vous n'avez pas l'autorisation de supprimer ou de d\u00e9placer
|
||||
cms.ui.folder.item_already_exists=Il y a d\u00e9j\u00e0 un \u00e9l\u00e9ment dans le dossier destination appel\u00e9: {0}
|
||||
cms.ui.folder.item_is_live={0} est en ligne ; Vous devez le d\u00e9-publier avant de le d\u00e9placer.
|
||||
cms.ui.folder.no_permission_for_item=Vous n'avez pas l'autorisation de supprimer ou de d\u00e9placer {0}.
|
||||
cms.ui.folder.no_such_item=L'identifiant fourni pour l'\u00e9l\u00e9ment ne correspond pas \u00e0 un contenu existant.
|
||||
cms.ui.folder.filter.all=
|
||||
cms.ui.folder.languages=
|
||||
cms.ui.folder.delete_confirmation=
|
||||
cms.ui.folder.additionalInfo=
|
||||
cms.ui.folder.move.action=
|
||||
cms.ui.folder.copy.action=
|
||||
cms.ui.folder.publish.action=
|
||||
cms.ui.folder.unpublish.action=
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ import com.arsdigita.kernel.Kernel;
|
|||
import com.arsdigita.kernel.permissions.PermissionService;
|
||||
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||
import com.arsdigita.persistence.OID;
|
||||
import com.arsdigita.toolbox.GlobalisationUtil;
|
||||
import com.arsdigita.toolbox.ui.FormatStandards;
|
||||
import com.arsdigita.util.Assert;
|
||||
import org.apache.log4j.Logger;
|
||||
|
|
@ -65,9 +66,8 @@ import java.util.Iterator;
|
|||
import javax.servlet.ServletException;
|
||||
|
||||
/**
|
||||
* Browse folders and items. If the user clicks on a folder, the folder
|
||||
* selection model is updated. If the user clicks on any other item, an separate
|
||||
* item selection model is updated.
|
||||
* Browse folders and items. If the user clicks on a folder, the folder selection model is updated.
|
||||
* If the user clicks on any other item, an separate item selection model is updated.
|
||||
*
|
||||
* @author <a href="mailto:lutter@arsdigita.com">David Lutterkort</a>
|
||||
* @author Sören Bernstein <quasi@quasiweb.de>
|
||||
|
|
@ -217,8 +217,8 @@ public class FolderBrowser extends Table {
|
|||
Folder folder = (Folder) m_currentFolder.getSelectedObject(state);
|
||||
Assert.exists(folder);
|
||||
|
||||
boolean canDelete =
|
||||
sm.canAccess(state.getRequest(), SecurityManager.DELETE_ITEM,
|
||||
boolean canDelete
|
||||
= sm.canAccess(state.getRequest(), SecurityManager.DELETE_ITEM,
|
||||
folder);
|
||||
|
||||
m_deleteColumn.setVisible(state, canDelete);
|
||||
|
|
@ -291,8 +291,8 @@ public class FolderBrowser extends Table {
|
|||
} else {
|
||||
t.getRowSelectionModel().clearSelection(s);
|
||||
s_log.debug(String.format("filter = '%s'", s.getValue(m_filter)));
|
||||
Folder.ItemCollection itemColl =
|
||||
(Folder.ItemCollection) m_itemColl.get(s);
|
||||
Folder.ItemCollection itemColl
|
||||
= (Folder.ItemCollection) m_itemColl.get(s);
|
||||
s_log.debug(String.format("itemColl.size = %d", itemColl.size()));
|
||||
|
||||
m_folderSize = itemColl.size();
|
||||
|
|
@ -398,11 +398,11 @@ public class FolderBrowser extends Table {
|
|||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the paginator should be visible, based on the
|
||||
* visibility of the folder browser itself.
|
||||
* Indicates whether the paginator should be visible, based on the visibility of the folder
|
||||
* browser itself.
|
||||
*
|
||||
* @return true if folder browser is visible, or if the associated
|
||||
* folder browser is unknown.
|
||||
* @return true if folder browser is visible, or if the associated folder browser is
|
||||
* unknown.
|
||||
*/
|
||||
public boolean isVisible(PageState state) {
|
||||
return (m_fb != null) ? m_fb.isVisible(state) : true;
|
||||
|
|
@ -474,8 +474,7 @@ public class FolderBrowser extends Table {
|
|||
}
|
||||
|
||||
/**
|
||||
* Produce links to view an item or control links for folders to change into
|
||||
* the folder.
|
||||
* Produce links to view an item or control links for folders to change into the folder.
|
||||
*/
|
||||
private class NameCellRenderer extends DefaultTableCellRenderer {
|
||||
|
||||
|
|
@ -511,8 +510,8 @@ public class FolderBrowser extends Table {
|
|||
/**
|
||||
* Added by: Sören Bernstein <quasi@quasiweb.de>
|
||||
*
|
||||
* Produce links to view an item in a specific language and show all
|
||||
* existing language version and the live status in the folder browser.
|
||||
* Produce links to view an item in a specific language and show all existing language version
|
||||
* and the live status in the folder browser.
|
||||
*/
|
||||
private class LanguagesCellRenderer extends DefaultTableCellRenderer {
|
||||
|
||||
|
|
@ -544,15 +543,12 @@ public class FolderBrowser extends Table {
|
|||
ContentBundle bundle = cp.getContentBundle();
|
||||
ContentSection section = CMS.getContext().getContentSection();
|
||||
|
||||
|
||||
if (bundle != null
|
||||
&& !(cp instanceof LanguageInvariantContentItem
|
||||
&& ((LanguageInvariantContentItem) cp).isLanguageInvariant())) {
|
||||
|
||||
Iterator<String> languages = bundle.getLanguages().iterator();
|
||||
|
||||
|
||||
|
||||
StringBuilder temp = new StringBuilder(20);
|
||||
SimpleContainer container = new SimpleContainer();
|
||||
|
||||
|
|
@ -757,8 +753,8 @@ public class FolderBrowser extends Table {
|
|||
return FormatStandards.formatDate(creationDate);
|
||||
}
|
||||
case LAST_MODIFIED: {
|
||||
java.util.Date lastModified =
|
||||
m_itemColl.getLastModifiedDate();
|
||||
java.util.Date lastModified
|
||||
= m_itemColl.getLastModifiedDate();
|
||||
if (lastModified == null) {
|
||||
return "--";
|
||||
}
|
||||
|
|
@ -820,7 +816,8 @@ public class FolderBrowser extends Table {
|
|||
}
|
||||
|
||||
if (s_log.isDebugEnabled()) {
|
||||
s_log.debug("The item is not a folder and doesn't have a live instance; it may be deleted");
|
||||
s_log.debug(
|
||||
"The item is not a folder and doesn't have a live instance; it may be deleted");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -894,7 +891,11 @@ public class FolderBrowser extends Table {
|
|||
* @param key The resource key @pre ( key != null )
|
||||
*/
|
||||
private static GlobalizedMessage globalize(String key) {
|
||||
return FolderManipulator.globalize(key);
|
||||
//return FolderManipulator.globalize(key);
|
||||
final GlobalisationUtil util = new GlobalisationUtil(
|
||||
"com.arsdigita.cms.ui.folder.CMSFolderResources");
|
||||
return util.globalise(key);
|
||||
|
||||
}
|
||||
|
||||
private static boolean hideIndexColumn() {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -28,15 +28,15 @@ public class PublishLock {
|
|||
private PublishLock() {
|
||||
}
|
||||
|
||||
protected static synchronized PublishLock getInstance() {
|
||||
public static synchronized PublishLock getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
protected synchronized void lock(final ContentItem item) {
|
||||
public synchronized void lock(final ContentItem item) {
|
||||
lock(item, "publish");
|
||||
}
|
||||
|
||||
protected synchronized void lock(final ContentItem item,
|
||||
public synchronized void lock(final ContentItem item,
|
||||
final String action) {
|
||||
SessionManager.getSession().getTransactionContext().beginTxn();
|
||||
final DataObject lock = SessionManager.getSession().create(
|
||||
|
|
@ -49,7 +49,7 @@ public class PublishLock {
|
|||
SessionManager.getSession().getTransactionContext().commitTxn();
|
||||
}
|
||||
|
||||
protected synchronized void unlock(final ContentItem item) {
|
||||
public synchronized void unlock(final ContentItem item) {
|
||||
SessionManager.getSession().getTransactionContext().beginTxn();
|
||||
final DataCollection collection = SessionManager.getSession().retrieve(
|
||||
LOCK_OBJECT_TYPE);
|
||||
|
|
@ -66,7 +66,7 @@ public class PublishLock {
|
|||
SessionManager.getSession().getTransactionContext().commitTxn();
|
||||
}
|
||||
|
||||
protected synchronized boolean isLocked(final ContentItem item) {
|
||||
public synchronized boolean isLocked(final ContentItem item) {
|
||||
final DataCollection collection = SessionManager.getSession().retrieve(
|
||||
LOCK_OBJECT_TYPE);
|
||||
collection.addFilter(String.format("%s = '%s'", LOCKED_OID,
|
||||
|
|
@ -80,7 +80,7 @@ public class PublishLock {
|
|||
}
|
||||
}
|
||||
|
||||
protected synchronized void setError(final ContentItem item, final String stacktrace) {
|
||||
public synchronized void setError(final ContentItem item, final String stacktrace) {
|
||||
SessionManager.getSession().getTransactionContext().beginTxn();
|
||||
final DataCollection collection = SessionManager.getSession().retrieve(
|
||||
LOCK_OBJECT_TYPE);
|
||||
|
|
@ -99,7 +99,7 @@ public class PublishLock {
|
|||
SessionManager.getSession().getTransactionContext().commitTxn();
|
||||
}
|
||||
|
||||
protected synchronized boolean hasError(final ContentItem item) {
|
||||
public synchronized boolean hasError(final ContentItem item) {
|
||||
final DataCollection collection = SessionManager.getSession().retrieve(
|
||||
LOCK_OBJECT_TYPE);
|
||||
collection.addFilter(String.format("%s = '%s'", LOCKED_OID,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* Copyright (C) 2002-2004 Red Hat Inc. All Rights Reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.toolbox;
|
||||
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
|
||||
/**
|
||||
* Utility class for simplify the handling of {@link GlobalizedMessage}. This class is intended as a
|
||||
more object orientated replacement for the numerous GlobalisationUtil classes with static
|
||||
methods.
|
||||
|
||||
This class should not used directly. Instead create a subclass of this class with a parameter
|
||||
less constructor which calls the constructor of this class providing the name of the bundle.
|
||||
*
|
||||
* @see GlobalizedMessage
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class GlobalisationUtil {
|
||||
|
||||
private final transient String bundleName;
|
||||
|
||||
/**
|
||||
* Constructor for a new {@link GlobalisationUtil} instance. For normal use cases don't use this
|
||||
* constructor directly to create an instance of this class. Instead a subclass should be
|
||||
* created which provides a parameterless constructor which class this constructor with the
|
||||
* fully qualified name of the appropriate bundle. For some use cases, for example a resource
|
||||
* bundle which is only used in a single class may be used by simply using this constructor.
|
||||
*
|
||||
* @param bundleName Name of the bundle to be used by this {@code GlobalisationUtil} instance.
|
||||
*/
|
||||
public GlobalisationUtil(final String bundleName) {
|
||||
this.bundleName = bundleName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Lookup the globalised message identified by the provided key in the resource bundle.
|
||||
*
|
||||
* @param key Message key
|
||||
* @return The globalised message.
|
||||
*/
|
||||
public GlobalizedMessage globalise(final String key) {
|
||||
return new GlobalizedMessage(key, bundleName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lookup the globalised message identified by the provided key in the resource bundle and
|
||||
* replace the placeholders in the message with the provided arguments.
|
||||
*
|
||||
* @param key The key of the message to lookup.
|
||||
* @param args Arguments for the placeholders in the message.
|
||||
* @return The globalised message.
|
||||
*/
|
||||
public GlobalizedMessage globalise(final String key,
|
||||
final Object[] args) {
|
||||
return new GlobalizedMessage(key, bundleName, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -26,3 +26,4 @@ terms.domain.ui.url_hint=The unique URL defining the current version of the doma
|
|||
terms.domain.ui.description_hint=The long description of the domain
|
||||
terms.domain.ui.version_hint=The current version number, eg 1.00
|
||||
terms.domain.ui.released_hint=The release date of the current version
|
||||
terms.ui.pick_one=-- pick one --
|
||||
|
|
|
|||
|
|
@ -26,3 +26,4 @@ terms.domain.ui.url_hint=Eine eindeutige URL, die die aktuelle Version definiert
|
|||
terms.domain.ui.description_hint=Eine ausf\u00fchrlichere Beschreibung der Domain
|
||||
terms.domain.ui.version_hint=Die aktuelle Version, z.B. 1.00
|
||||
terms.domain.ui.released_hint=Das Ver\u00f6ffentlichungsdatum der aktuellen Version.
|
||||
terms.ui.pick_one=-- Ausw\u00e4hlen --
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.london.terms.ui;
|
||||
|
||||
import com.arsdigita.bebop.PageState;
|
||||
|
|
@ -24,11 +23,11 @@ import com.arsdigita.bebop.form.SingleSelect;
|
|||
import com.arsdigita.domain.DomainObjectFactory;
|
||||
import com.arsdigita.london.terms.Domain;
|
||||
import com.arsdigita.categorization.ui.AbstractCategoryPicker;
|
||||
import com.arsdigita.london.terms.util.TermsGlobalizationUtil;
|
||||
import com.arsdigita.persistence.DataCollection;
|
||||
import com.arsdigita.persistence.OID;
|
||||
import com.arsdigita.persistence.SessionManager;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
|
|
@ -48,7 +47,7 @@ public class RootCategoryPicker extends AbstractCategoryPicker {
|
|||
* @param state
|
||||
* @param target
|
||||
*/
|
||||
protected void addOptions( PageState state,
|
||||
protected void addOptions(PageState state,
|
||||
SingleSelect target) {
|
||||
|
||||
DataCollection domains = SessionManager
|
||||
|
|
@ -58,15 +57,18 @@ public class RootCategoryPicker extends AbstractCategoryPicker {
|
|||
domains.addPath("model.objectType");
|
||||
domains.addOrder("title");
|
||||
|
||||
target.addOption(new Option(null, "-- pick one --"));
|
||||
target.addOption(new Option(null,
|
||||
(String) TermsGlobalizationUtil.globalize("terms.ui.pick_one")
|
||||
.localize()));
|
||||
while (domains.next()) {
|
||||
Domain domain = (Domain) DomainObjectFactory
|
||||
.newInstance(domains.getDataObject());
|
||||
|
||||
target.addOption(
|
||||
new Option(new OID((String)domains.get("model.objectType"),
|
||||
new Option(new OID((String) domains.get("model.objectType"),
|
||||
domains.get("model.id")).toString(),
|
||||
domain.getTitle()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
xmlns:mandalay="http://mandalay.quasiweb.de"
|
||||
exclude-result-prefixes="xsl bebop cms nav mandalay"
|
||||
version="1.0"
|
||||
>
|
||||
>
|
||||
|
||||
<!--
|
||||
************************************************
|
||||
|
|
@ -129,6 +129,8 @@
|
|||
<xsl:value-of disable-output-escaping="yes" select="./description"/>
|
||||
</div>
|
||||
|
||||
<xsl:if test="(string-length(./funding) > 0) and ($setFunding = 'true')">
|
||||
|
||||
<h3>
|
||||
<xsl:call-template name="mandalay:getStaticText">
|
||||
<xsl:with-param name="module" select="'SciProject'"/>
|
||||
|
|
@ -152,21 +154,8 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<xsl:if test="(string-length(./fundingVolume) > 0) and ($setFundingVolume = 'true')">
|
||||
<div class="projectFundingVolume">
|
||||
<span>
|
||||
<xsl:call-template name="mandalay:getStaticText">
|
||||
<xsl:with-param name="module" select="'SciProject'"/>
|
||||
<xsl:with-param name="id" select="'descTab/fundingVolume'"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<span>
|
||||
<xsl:value-of select="./fundingVolume"/>
|
||||
</span>
|
||||
</div>
|
||||
</xsl:if>
|
||||
|
||||
<div class="endFloat"/>
|
||||
</xsl:if>
|
||||
|
||||
<div class="endFloat"/>
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ public class SciDepartmentProjectsTab implements GenericOrgaUnitTab {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generateXml(final GenericOrganizationalUnit orgaunit,
|
||||
final Element parent,
|
||||
final PageState state) {
|
||||
|
|
|
|||
|
|
@ -65,16 +65,20 @@ import org.apache.log4j.Logger;
|
|||
/**
|
||||
* Class creates the administration input form.
|
||||
*
|
||||
* Used by ControlCenterPanel to construct the 'create new site' and
|
||||
* 'edit existing site' input forms.
|
||||
* Used by ControlCenterPanel to construct the 'create new site' and 'edit existing site' input
|
||||
* forms.
|
||||
*/
|
||||
public class SiteForm extends Form {
|
||||
|
||||
/** A logger instance. */
|
||||
/**
|
||||
* A logger instance.
|
||||
*/
|
||||
private static final Logger s_log = Logger.getLogger(SiteForm.class);
|
||||
private SiteSelectionModel m_site;
|
||||
private BigDecimal siteDefaultRootPageID;
|
||||
/** Input field subsite title */
|
||||
/**
|
||||
* Input field subsite title
|
||||
*/
|
||||
private TextField m_title;
|
||||
private TextField m_hostname;
|
||||
private TextArea m_description;
|
||||
|
|
@ -84,9 +88,9 @@ public class SiteForm extends Form {
|
|||
private SingleSelect m_themes;
|
||||
private SaveCancelSection m_buttons;
|
||||
private final static String DEFAULT_APP = "DEFAULT_APP";
|
||||
private final static String DEFAULT_APP_LABEL = "Site Wide Default ";
|
||||
private final static String DEFAULT_APP_LABEL = "subsite.ui.default_app_label";
|
||||
private final static String DEFAULT_STYLE = "DEFAULT_STYLE";
|
||||
private final static String DEFAULT_STYLE_LABEL = "Site Wide Default ";
|
||||
private final static String DEFAULT_STYLE_LABEL = "subsite.ui.default_style_label";
|
||||
private final static String OTHER_STYLE = "OTHER_STYLE";
|
||||
private final static String OTHER_STYLE_LABEL = "Other (type in box below)";
|
||||
|
||||
|
|
@ -198,7 +202,6 @@ public class SiteForm extends Form {
|
|||
add(new Label(SubsiteGlobalizationUtil.globalize("subsite.ui.root_category.label")));
|
||||
add(m_rootCategory); // adds domain category selection box to form
|
||||
|
||||
|
||||
m_buttons = new SaveCancelSection();
|
||||
m_buttons.getSaveButton().setButtonLabel(SubsiteGlobalizationUtil.globalize(
|
||||
"subsite.ui.save"));
|
||||
|
|
@ -208,7 +211,6 @@ public class SiteForm extends Form {
|
|||
m_buttons.getCancelButton().setHint("Abort changes & reset the form");
|
||||
add(m_buttons);
|
||||
|
||||
|
||||
addSubmissionListener(new SiteSubmissionListener());
|
||||
addProcessListener(new SiteProcessListener());
|
||||
addInitListener(new SiteInitListener());
|
||||
|
|
@ -311,8 +313,7 @@ public class SiteForm extends Form {
|
|||
}
|
||||
|
||||
/**
|
||||
* Initializes the form.
|
||||
* (when a new input form is requested by user either by editing an
|
||||
* Initializes the form. (when a new input form is requested by user either by editing an
|
||||
* existing subsite or by creating a new one).
|
||||
*/
|
||||
private class SiteInitListener implements FormInitListener {
|
||||
|
|
@ -323,7 +324,6 @@ public class SiteForm extends Form {
|
|||
|
||||
Site site = m_site.getSelectedSite(state);
|
||||
|
||||
|
||||
if (site == null) {
|
||||
m_title.setValue(state, null);
|
||||
m_hostname.setValue(state, null);
|
||||
|
|
@ -481,7 +481,9 @@ public class SiteForm extends Form {
|
|||
ApplicationCollection customApps;
|
||||
|
||||
// target.addOption(new Option(SELECT_APP, SELECT_APP_LABEL));
|
||||
target.addOption(new Option(DEFAULT_APP, DEFAULT_APP_LABEL));
|
||||
target.addOption(new Option(DEFAULT_APP,
|
||||
(String) SubsiteGlobalizationUtil
|
||||
.globalize(DEFAULT_APP_LABEL).localize()));
|
||||
|
||||
String[] customAppTypes = (String[]) Subsite.getConfig()
|
||||
.getFrontPageApplicationTypes();
|
||||
|
|
@ -516,7 +518,9 @@ public class SiteForm extends Form {
|
|||
PageState state = e.getPageState();
|
||||
Map themes = Subsite.getConfig().getThemes();
|
||||
Set entrySet = themes.entrySet();
|
||||
target.addOption(new Option(DEFAULT_STYLE, DEFAULT_STYLE_LABEL));
|
||||
target.addOption(new Option(DEFAULT_STYLE,
|
||||
(String) SubsiteGlobalizationUtil.globalize(
|
||||
DEFAULT_STYLE_LABEL).localize()));
|
||||
if (entrySet != null) {
|
||||
Iterator entries = entrySet.iterator();
|
||||
while (entries.hasNext()) {
|
||||
|
|
@ -530,4 +534,5 @@ public class SiteForm extends Form {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,3 +25,5 @@ subsite.ui.edit=Edit
|
|||
subsite.ui.delete=Delete
|
||||
subsite.ui.delete.confirm=Are you sure to delete the subsite {0}?
|
||||
subsite.ui.no_subsites=No subites defined
|
||||
subsite.ui.default_app_label=Site Wide Default
|
||||
subsite.ui.default_style_label=Site Wide Default
|
||||
|
|
|
|||
|
|
@ -25,3 +25,5 @@ subsite.ui.edit=Bearbeiten
|
|||
subsite.ui.delete=L\u00f6schen
|
||||
subsite.ui.delete.confirm=Sind Sie sicher, dass Sie die Subsite {0} l\u00f6schen wollen?
|
||||
subsite.ui.no_subsites=Es sind keine Subsites eingerichtet.
|
||||
subsite.ui.default_app_label=Standard f\u00fcr diese Installation
|
||||
subsite.ui.default_style_label=Standard f\u00fcr diese Installation
|
||||
|
|
|
|||
Loading…
Reference in New Issue