- Die Liste der Publikationen einer Person im Content-Center (AuthoringStep Publikationen bei Personen) zeigt jetzt auch
Publikationen eines eventuell vorhandenen Aliases (Frührer Name) an - Für die Assoziation zwischen GenericOrganizationalUnit und Kontakt wurde bisher die gleichen Werte für den Kontakttyp verwendet wie für die Assoization zwischen GenericPerson und Kontakt. Jetzt werden unterschiedliche Werte für den Kontakttyp bei den beiden Assoziatonen verwendet. - Verschiedene Formatierungen usw. git-svn-id: https://svn.libreccm.org/ccm/trunk@2254 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
f86f3a8f79
commit
9601efd7dc
|
|
@ -18,4 +18,4 @@
|
|||
-- $Id: upd_acs_objects.sql $
|
||||
|
||||
|
||||
alter table cms_item_image_attachement add column sort_key integer set default 1;
|
||||
alter table cms_item_image_attachment add column sort_key integer;
|
||||
|
|
@ -1015,7 +1015,6 @@ cms.contenttyes.link.ui.table_cell_delete_link=entfernen
|
|||
cms.contenttyes.link.ui.table_cell_move_up=nach oben
|
||||
cms.contenttyes.link.ui.table_cell_move_down=nach unten
|
||||
cms.contenttyes.link.ui.link_type_subtitle=Bitte entweder einen externen Link oder ein Dokument (interner Link) w\u00e4hlen
|
||||
itte entweder einen externen Link oder ein Dokument (interner Link) w\u00e4hlen
|
||||
cms.contenttyes.link.ui.option_group.link_type.external=URL
|
||||
cms.contenttyes.link.ui.option_group.link_type.internal=Dokument
|
||||
cms.contenttyes.link.ui.option.new_window=URL in einem neuen Fenster \u00f6ffnen
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ cms.contenttypes.ui.contact.edit_address=Edit Address
|
|||
cms.contenttypes.ui.contact.reattach_address=Reattach Address
|
||||
cms.contenttypes.ui.contact.delete_address=Delete Address
|
||||
cms.contenttypes.ui.contact.emptyAddress=There is no Address attached
|
||||
cms.contenttypes.ui.contact.select_address=Please select a BaseAddres type entry
|
||||
cms.contenttypes.ui.contact.select_address=Please select an address content item
|
||||
cms.contenttypes.ui.contact.select_address.add=Add
|
||||
cms.contenttypes.ui.contact.select_address.change=Change
|
||||
cms.contenttypes.ui.contact.select_address.wrong_type=BaseAddress selection is required
|
||||
cms.contenttypes.ui.contact.select_address.wrong_type=Address selection is required
|
||||
cms.contenttypes.ui.contact.select_address.cancelled=cancelled
|
||||
cms.contenttypes.ui.contact.delete_address.label=Do you want to delete the link to the contact content type?
|
||||
cms.contenttypes.ui.contact.delete_address.button_label=Delete
|
||||
|
|
@ -52,7 +52,7 @@ cms.contenttypes.ui.contact.edit_person=Edit Person
|
|||
cms.contenttypes.ui.contact.reattach_person=Reattach Person
|
||||
cms.contenttypes.ui.genericcontact.delete_person=Delete Person
|
||||
cms.contenttypes.ui.genericcontact.emptyPerson=There is no Person attached
|
||||
cms.contenttypes.ui.contact.select_person=Please select a Person content type
|
||||
cms.contenttypes.ui.contact.select_person=Please select person content item
|
||||
cms.contenttypes.ui.contact.select_person.add=Add
|
||||
cms.contenttypes.ui.contact.select_person.change=Change
|
||||
cms.contenttypes.ui.contact.select_person.wrong_type=Person selection is required
|
||||
|
|
@ -164,3 +164,9 @@ cms.contenttypes.ui.genericperson.alias.select.wrong_type=No person selected.
|
|||
cms.contenttypes.ui.person_specification=Person Specification:
|
||||
cms.contenttypes.ui.genericperson.alias.select.add_contact=Add contact
|
||||
cms.contenttypes.ui.genericperson.alias.select.change_contact=Change contact
|
||||
cms.contenttypes.ui.contact.contactEntry.key=Entry
|
||||
cms.contenttypes.ui.contact.contactEntry.value=Value
|
||||
cms.contenttypes.ui.contact.contactEntry.description=Descriptions
|
||||
cms.ui.select_one=Please choose
|
||||
cms.contenttypes.ui.genericorgaunit.persons.status=Status
|
||||
cms.ui.edit_assoc=Edit
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ cms.contenttypes.ui.contact.edit_address=Adresse bearbeiten
|
|||
cms.contenttypes.ui.contact.reattach_address=Adresse neu verkn\u00fcpfen
|
||||
cms.contenttypes.ui.contact.delete_address=Adresse l\u00f6schen
|
||||
cms.contenttypes.ui.contact.emptyAddress=Zur Zeit ist keine Adresse verkn\u00fcpft
|
||||
cms.contenttypes.ui.contact.select_address=Bitte w\u00e4hlen Sie eine Eintrag vom Typ BaseAddress
|
||||
cms.contenttypes.ui.contact.select_address=Bitte w\u00e4hlen Sie eine Content-Item vom Typ Addresse aus
|
||||
cms.contenttypes.ui.contact.select_address.add=Verkn\u00fcpfen
|
||||
cms.contenttypes.ui.contact.select_address.change=Ver\u00e4ndern
|
||||
cms.contenttypes.ui.contact.select_address.wrong_type=Der gew\u00e4hlte Eintrag ist nicht vom Typ BaseAddress
|
||||
cms.contenttypes.ui.contact.select_address.wrong_type=Der gew\u00e4hlte Eintrag ist nicht vom Typ Addresse
|
||||
cms.contenttypes.ui.contact.select_address.cancelled=Abbruch
|
||||
cms.contenttypes.ui.contact.delete_address.label=Wollen Sie die Verkn\u00fcpfung zur Adresse entfernen?
|
||||
cms.contenttypes.ui.contact.delete_address.button_label=L\u00f6schen
|
||||
|
|
@ -52,7 +52,7 @@ cms.contenttypes.ui.contact.edit_person=Person bearbeiten
|
|||
cms.contenttypes.ui.contact.reattach_person=Person neu verkn\u00fcpfen
|
||||
cms.contenttypes.ui.genericcontact.delete_person=Person l\u00f6schen
|
||||
cms.contenttypes.ui.genericcontact.emptyPerson=Zur Zeit ist keine Person verkn\u00fcft
|
||||
cms.contenttypes.ui.contact.select_person=Bitte w\u00e4hlen Sie einen Eintrag vom Typ Person
|
||||
cms.contenttypes.ui.contact.select_person=Bitte w\u00e4hlen Sie einen Content-Item vom Typ Person
|
||||
cms.contenttypes.ui.contact.select_person.add=Verkn\u00fcpfen
|
||||
cms.contenttypes.ui.contact.select_person.change=Ver\u00e4ndern
|
||||
cms.contenttypes.ui.contact.select_person.wrong_type=Der gew\u00e4hlte Eintrag ist nicht vom Typ Person
|
||||
|
|
@ -174,3 +174,9 @@ cms.contenttypes.ui.genericperson.alias.select.wrong_type=Kein Personendatensatz
|
|||
cms.contenttypes.ui.person_specification=Person Specification:
|
||||
cms.contenttypes.ui.genericperson.alias.select.add_contact=Kontakt hinzuf\u00fcgen
|
||||
cms.contenttypes.ui.genericperson.alias.select.change_contact=Kontakt anpassen
|
||||
cms.contenttypes.ui.contact.contactEntry.key=Eintrag
|
||||
cms.contenttypes.ui.contact.contactEntry.value=Wert
|
||||
cms.contenttypes.ui.contact.contactEntry.description=Beschreibung
|
||||
cms.ui.select_one=Bitte ausw\u00e4hlen
|
||||
cms.contenttypes.ui.genericorgaunit.persons.status=Status
|
||||
cms.ui.edit_assoc=Bearbeiten
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter
|
||||
*
|
||||
* 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.cms.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.RelationAttributeCollection;
|
||||
import com.arsdigita.persistence.DataCollection;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jens Pelzetter <jens@jp-digital.de>
|
||||
* @version $Id$
|
||||
*/
|
||||
public class GenericOrganizationContactTypeCollection extends RelationAttributeCollection {
|
||||
|
||||
public static final String ATTRIBUTE_NAME = "GenericOrganizationContactTypes";
|
||||
|
||||
public GenericOrganizationContactTypeCollection() {
|
||||
super(ATTRIBUTE_NAME);
|
||||
}
|
||||
|
||||
public GenericOrganizationContactTypeCollection(final String key) {
|
||||
super(ATTRIBUTE_NAME, key);
|
||||
}
|
||||
|
||||
public GenericOrganizationContactTypeCollection(final DataCollection dataCollection) {
|
||||
super(dataCollection);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -70,26 +70,18 @@ public class GenericContactEntriesTable extends Table implements TableActionList
|
|||
// define columns
|
||||
tab_model.add(new TableColumn(
|
||||
0,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.contact.contactEntry.key")
|
||||
,
|
||||
new Label(ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.contact.contactEntry.key")),
|
||||
TABLE_COL_EDIT));
|
||||
tab_model.add(new TableColumn(
|
||||
1,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.contact.contactEntry.value")
|
||||
|
||||
));
|
||||
new Label(ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.contact.contactEntry.value"))));
|
||||
tab_model.add(new TableColumn(
|
||||
2,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.contact.contactEntry.description")
|
||||
));
|
||||
new Label(ContenttypesGlobalizationUtil.
|
||||
globalize("cms.contenttypes.ui.contact.contactEntry.description"))));
|
||||
tab_model.add(new TableColumn(
|
||||
3,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.contact.contactEntry.action")
|
||||
,
|
||||
new Label(ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.contact.contactEntry.action")),
|
||||
TABLE_COL_DEL));
|
||||
|
||||
setModelBuilder(new ContactTableModelBuilder(itemModel));
|
||||
|
|
@ -118,10 +110,10 @@ public class GenericContactEntriesTable extends Table implements TableActionList
|
|||
|
||||
table.getRowSelectionModel().clearSelection(state);
|
||||
|
||||
GenericContact contact = (GenericContact)
|
||||
m_itemModel.getSelectedObject(state);
|
||||
GenericContact contact = (GenericContact) m_itemModel.getSelectedObject(state);
|
||||
return new ContactTableModel(table, state, contact);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -170,8 +162,7 @@ public class GenericContactEntriesTable extends Table implements TableActionList
|
|||
public Object getElementAt(int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 0:
|
||||
GenericContactEntryKeys keys = new
|
||||
GenericContactEntryKeys(m_contactEntry.getKey());
|
||||
GenericContactEntryKeys keys = new GenericContactEntryKeys(m_contactEntry.getKey());
|
||||
keys.addLanguageFilter(
|
||||
GlobalizationHelper.getNegotiatedLocale()
|
||||
.getLanguage());
|
||||
|
|
@ -188,13 +179,12 @@ public class GenericContactEntriesTable extends Table implements TableActionList
|
|||
return m_contactEntry.getValue();
|
||||
case 2:
|
||||
return (m_contactEntry.getDescription() != null
|
||||
&& m_contactEntry.getDescription().length() >
|
||||
MAX_DESC_LENGTH)
|
||||
&& m_contactEntry.getDescription().length() > MAX_DESC_LENGTH)
|
||||
? m_contactEntry.getDescription().substring(
|
||||
0, MAX_DESC_LENGTH)
|
||||
: m_contactEntry.getDescription();
|
||||
case 3:
|
||||
return GlobalizationUtil.globalize("cms.ui.delete");
|
||||
return GlobalizationUtil.globalize("cms.ui.delete").localize();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
@ -207,6 +197,7 @@ public class GenericContactEntriesTable extends Table implements TableActionList
|
|||
public Object getKeyAt(int columnIndex) {
|
||||
return m_contactEntry.getID();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -232,6 +223,7 @@ public class GenericContactEntriesTable extends Table implements TableActionList
|
|||
return new Label(value.toString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -246,8 +238,7 @@ public class GenericContactEntriesTable extends Table implements TableActionList
|
|||
int row, int column) {
|
||||
|
||||
SecurityManager sm = Utilities.getSecurityManager(state);
|
||||
GenericContact contact = (GenericContact)
|
||||
m_itemModel.getSelectedObject(state);
|
||||
GenericContact contact = (GenericContact) m_itemModel.getSelectedObject(state);
|
||||
|
||||
boolean canDelete = sm.canAccess(state.getRequest(),
|
||||
SecurityManager.DELETE_ITEM,
|
||||
|
|
@ -255,13 +246,13 @@ public class GenericContactEntriesTable extends Table implements TableActionList
|
|||
if (canDelete) {
|
||||
ControlLink link = new ControlLink(value.toString());
|
||||
link.setConfirmation(
|
||||
ContenttypesGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.contact.confirm_delete"));
|
||||
ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.contact.confirm_delete"));
|
||||
return link;
|
||||
} else {
|
||||
return new Label(value.toString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -301,4 +292,5 @@ public class GenericContactEntriesTable extends Table implements TableActionList
|
|||
public void headSelected(TableActionEvent e) {
|
||||
throw new UnsupportedOperationException("Not Implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,16 +72,14 @@ public class GenericContactPersonSheet
|
|||
TableColumnModel colModel = getColumnModel();
|
||||
colModel.add(new TableColumn(
|
||||
0,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
new Label(ContenttypesGlobalizationUtil.globalize(
|
||||
// "cms.contenttypes.ui.contact.person").localize(),
|
||||
"cms.contenttypes.ui.genericcontact.person"),
|
||||
"cms.contenttypes.ui.genericcontact.person")),
|
||||
TABLE_COL_EDIT));
|
||||
colModel.add(new TableColumn(
|
||||
1,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.genericcontact.delete_person")
|
||||
// .localize()
|
||||
,
|
||||
new Label(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.genericcontact.delete_person")),
|
||||
TABLE_COL_DEL));
|
||||
|
||||
setModelBuilder(new GenericContactPersonSheetModelBuilder(itemModel));
|
||||
|
|
@ -109,12 +107,12 @@ public class GenericContactPersonSheet
|
|||
@Override
|
||||
public TableModel makeModel(Table table, PageState state) {
|
||||
table.getRowSelectionModel().clearSelection(state);
|
||||
GenericContact contact = (GenericContact)
|
||||
m_itemModel.getSelectedObject(state);
|
||||
GenericContact contact = (GenericContact) m_itemModel.getSelectedObject(state);
|
||||
return new GenericContactPersonSheetModel(table,
|
||||
state,
|
||||
contact);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class GenericContactPersonSheetModel implements TableModel {
|
||||
|
|
@ -158,9 +156,7 @@ public class GenericContactPersonSheet
|
|||
return m_person.getFullName();
|
||||
case 1:
|
||||
return ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.genericcontact.delete_person")
|
||||
// .localize();
|
||||
;
|
||||
"cms.contenttypes.ui.genericcontact.delete_person").localize();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
@ -169,6 +165,7 @@ public class GenericContactPersonSheet
|
|||
public Object getKeyAt(int columnIndex) {
|
||||
return m_person.getID();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class EditCellRenderer
|
||||
|
|
@ -186,8 +183,7 @@ public class GenericContactPersonSheet
|
|||
|
||||
com.arsdigita.cms.SecurityManager securityManager =
|
||||
CMS.getSecurityManager(state);
|
||||
GenericContact contact = (GenericContact)
|
||||
m_itemModel.getSelectedObject(state);
|
||||
GenericContact contact = (GenericContact) m_itemModel.getSelectedObject(state);
|
||||
|
||||
boolean canEdit = securityManager.canAccess(
|
||||
state.getRequest(),
|
||||
|
|
@ -218,6 +214,7 @@ public class GenericContactPersonSheet
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class DeleteCellRenderer
|
||||
|
|
@ -245,14 +242,14 @@ public class GenericContactPersonSheet
|
|||
ControlLink link = new ControlLink(value.toString());
|
||||
link.setConfirmation(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.contact.person"
|
||||
+ ".confirm_remove")
|
||||
);
|
||||
+ ".confirm_remove"));
|
||||
return link;
|
||||
} else {
|
||||
Label label = new Label(value.toString());
|
||||
return label;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -274,4 +271,5 @@ public class GenericContactPersonSheet
|
|||
public void headSelected(TableActionEvent event) {
|
||||
//Nothing to do
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ import com.arsdigita.cms.ItemSelectionModel;
|
|||
import com.arsdigita.cms.RelationAttribute;
|
||||
import com.arsdigita.cms.contenttypes.GenericContact;
|
||||
import com.arsdigita.cms.contenttypes.GenericContactTypeCollection;
|
||||
import com.arsdigita.cms.contenttypes.GenericOrganizationContactTypeCollection;
|
||||
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit;
|
||||
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitContactCollection;
|
||||
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
||||
|
|
@ -93,8 +94,8 @@ public class GenericOrganizationalUnitContactAddForm
|
|||
new Label(ContenttypesGlobalizationUtil.
|
||||
globalize("cms.ui.select_one"))));
|
||||
|
||||
GenericContactTypeCollection contacttypes =
|
||||
new GenericContactTypeCollection();
|
||||
GenericOrganizationContactTypeCollection contacttypes =
|
||||
new GenericOrganizationContactTypeCollection();
|
||||
contacttypes.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale().
|
||||
getLanguage());
|
||||
|
||||
|
|
|
|||
|
|
@ -31,12 +31,12 @@ import com.arsdigita.bebop.table.TableColumn;
|
|||
import com.arsdigita.bebop.table.TableColumnModel;
|
||||
import com.arsdigita.bebop.table.TableModel;
|
||||
import com.arsdigita.bebop.table.TableModelBuilder;
|
||||
import com.arsdigita.cms.CMS;
|
||||
import com.arsdigita.cms.ContentSection;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.SecurityManager;
|
||||
import com.arsdigita.cms.contenttypes.GenericContact;
|
||||
import com.arsdigita.cms.contenttypes.GenericContactTypeCollection;
|
||||
import com.arsdigita.cms.contenttypes.GenericOrganizationContactTypeCollection;
|
||||
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit;
|
||||
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitContactCollection;
|
||||
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
||||
|
|
@ -148,8 +148,8 @@ public class GenericOrganizationalUnitContactTable extends Table implements
|
|||
private Table m_table;
|
||||
private GenericOrganizationalUnitContactCollection m_contactCollection;
|
||||
private GenericContact m_contact;
|
||||
private GenericContactTypeCollection m_contacttypes =
|
||||
new GenericContactTypeCollection();
|
||||
private GenericOrganizationContactTypeCollection m_contacttypes =
|
||||
new GenericOrganizationContactTypeCollection();
|
||||
|
||||
private GenericOrganizationalUnitTableModel(
|
||||
Table table,
|
||||
|
|
|
|||
|
|
@ -86,18 +86,18 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements
|
|||
new TableColumn(
|
||||
2,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.genericorgaunit.persons.status").localize()));
|
||||
"cms.contenttypes.ui.genericorgaunit.persons.status")));
|
||||
tabModel.add(
|
||||
new TableColumn(
|
||||
3,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.genericorganunit.persons.edit").localize(),
|
||||
"cms.contenttypes.ui.genericorganunit.persons.edit"),
|
||||
TABLE_COL_EDIT_LINK));
|
||||
tabModel.add(
|
||||
new TableColumn(
|
||||
4,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.genericorgaunit.persons.delete").localize(),
|
||||
"cms.contenttypes.ui.genericorgaunit.persons.delete"),
|
||||
TABLE_COL_DEL));
|
||||
|
||||
setModelBuilder(
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
package com.arsdigita.bebop.page;
|
||||
|
||||
import com.arsdigita.bebop.Bebop;
|
||||
|
|
@ -87,53 +86,52 @@ public class PageTransformer implements PresentationManager {
|
|||
|
||||
registerXSLParameterGenerator("contextPath",
|
||||
new XSLParameterGenerator() {
|
||||
|
||||
@Override
|
||||
public String generateValue(HttpServletRequest request) {
|
||||
return request.getContextPath();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
registerXSLParameterGenerator("root-context-prefix",
|
||||
new XSLParameterGenerator() {
|
||||
|
||||
@Override
|
||||
public String generateValue(HttpServletRequest request) {
|
||||
return Web.getConfig().getDispatcherContextPath();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
registerXSLParameterGenerator("context-prefix",
|
||||
new XSLParameterGenerator() {
|
||||
|
||||
@Override
|
||||
public String generateValue(HttpServletRequest request) {
|
||||
return Web.getContext().getRequestURL().getContextPath();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
registerXSLParameterGenerator("internal-theme",
|
||||
new XSLParameterGenerator() {
|
||||
|
||||
@Override
|
||||
public String generateValue(HttpServletRequest request) {
|
||||
return Web.getContext().getRequestURL().getContextPath()
|
||||
+ com.arsdigita.web.URL.INTERNAL_THEME_DIR;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
registerXSLParameterGenerator("dispatcher-prefix",
|
||||
new XSLParameterGenerator() {
|
||||
|
||||
@Override
|
||||
public String generateValue(HttpServletRequest request) {
|
||||
return com.arsdigita.web.URL.getDispatcherPath();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
registerXSLParameterGenerator("dcp-on-buttons",
|
||||
new XSLParameterGenerator() {
|
||||
|
||||
@Override
|
||||
public String generateValue(HttpServletRequest request) {
|
||||
if (Bebop.getConfig().doubleClickProtectionOnButtons()) {
|
||||
|
|
@ -143,11 +141,11 @@ public class PageTransformer implements PresentationManager {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
registerXSLParameterGenerator("dcp-on-links",
|
||||
new XSLParameterGenerator() {
|
||||
|
||||
@Override
|
||||
public String generateValue(HttpServletRequest request) {
|
||||
if (Bebop.getConfig().doubleClickProtectionOnLinks()) {
|
||||
|
|
@ -158,38 +156,84 @@ public class PageTransformer implements PresentationManager {
|
|||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
registerXSLParameterGenerator("user-agent",
|
||||
new XSLParameterGenerator() {
|
||||
|
||||
@Override
|
||||
public String generateValue(HttpServletRequest request) {
|
||||
return request.getHeader("User-Agent");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
registerXSLParameterGenerator("negotiated-language",
|
||||
new XSLParameterGenerator() {
|
||||
|
||||
@Override
|
||||
public String generateValue(HttpServletRequest request) {
|
||||
return GlobalizationHelper.getNegotiatedLocale().getLanguage();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
registerXSLParameterGenerator("selected-language",
|
||||
new XSLParameterGenerator() {
|
||||
|
||||
@Override
|
||||
public String generateValue(HttpServletRequest request) {
|
||||
Locale selectedLocale = com.arsdigita.globalization.GlobalizationHelper.getSelectedLocale(request);
|
||||
return (selectedLocale != null) ? selectedLocale.toString() : "";
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
registerXSLParameterGenerator("request-scheme",
|
||||
new XSLParameterGenerator() {
|
||||
@Override
|
||||
public String generateValue(HttpServletRequest request) {
|
||||
return request.getScheme();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
registerXSLParameterGenerator("server-name",
|
||||
new XSLParameterGenerator() {
|
||||
@Override
|
||||
public String generateValue(HttpServletRequest request) {
|
||||
return request.getServerName();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
registerXSLParameterGenerator("server-port",
|
||||
new XSLParameterGenerator() {
|
||||
@Override
|
||||
public String generateValue(HttpServletRequest request) {
|
||||
return Integer.toString(request.getServerPort());
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
registerXSLParameterGenerator("host",
|
||||
new XSLParameterGenerator() {
|
||||
@Override
|
||||
public String generateValue(HttpServletRequest request) {
|
||||
if (request.getServerPort() == 80) {
|
||||
return String.format("%s://%s", request.getScheme(), request.getServerName());
|
||||
} else {
|
||||
return String.format("%s://%s:%d",
|
||||
request.getScheme(),
|
||||
request.getServerName(),
|
||||
request.getServerPort());
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
s_log.debug("Static initalizer finished.");
|
||||
}
|
||||
// XXX These need to move somewhere else.
|
||||
|
||||
/**
|
||||
* This is used to indicate that all xsl templates used should
|
||||
* be pulled from the disk and not from the cache. If this
|
||||
|
|
@ -321,8 +365,7 @@ public class PageTransformer implements PresentationManager {
|
|||
final XSLTemplate template = Templating.getTemplate(
|
||||
req,
|
||||
fancyErrors,
|
||||
!Boolean.TRUE.equals(req.getAttribute(CACHE_XSL_NONE))
|
||||
);
|
||||
!Boolean.TRUE.equals(req.getAttribute(CACHE_XSL_NONE)));
|
||||
|
||||
DeveloperSupport.endStage("PresMgr get stylesheet");
|
||||
|
||||
|
|
@ -523,4 +566,5 @@ public class PageTransformer implements PresentationManager {
|
|||
transformer.setParameter((String) entry.getKey(), value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ import org.apache.log4j.Logger;
|
|||
public final class DispatcherHelper implements DispatcherConstants {
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(DispatcherHelper.class);
|
||||
|
||||
private static String s_webappCtx;
|
||||
private static String s_staticURL;
|
||||
private static boolean s_cachingActive;
|
||||
|
|
@ -843,7 +842,6 @@ public final class DispatcherHelper implements DispatcherConstants {
|
|||
* Gets the current HttpServletRequest for this thread.
|
||||
* @return the current HttpServletRequest for this thread.
|
||||
*/
|
||||
|
||||
public static HttpServletRequest getRequest() {
|
||||
init();
|
||||
return (HttpServletRequest) s_request.get();
|
||||
|
|
@ -1115,14 +1113,13 @@ public final class DispatcherHelper implements DispatcherConstants {
|
|||
}
|
||||
|
||||
} catch (NullPointerException ex) {
|
||||
|
||||
// Don't have to do anything because I want to fall back to default language anyway
|
||||
// This case should only appear during setup
|
||||
|
||||
} finally {
|
||||
|
||||
return preferedLocale;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
\echo Red Hat Enterprise ccm-ldn-search 6.6.1 -> 6.6.2 Upgrade Script (PostgreSQL)
|
||||
|
||||
begin;
|
||||
begin
|
||||
|
||||
\i default/6.6.1-6.6.2/set_singleton.sql
|
||||
|
||||
commit;
|
||||
|
|
|
|||
|
|
@ -170,4 +170,12 @@
|
|||
<value>Mitglied</value>
|
||||
</entry>
|
||||
</ddenum>
|
||||
<ddenum name="GenericOrganizationContactType">
|
||||
<entry key="contact" lang="de">
|
||||
<value>Kontakt</value>
|
||||
</entry>
|
||||
<entry key="contact" lang="en">
|
||||
<value>Contact</value>
|
||||
</entry>
|
||||
</ddenum>
|
||||
</ddenums>
|
||||
|
|
@ -170,4 +170,12 @@
|
|||
<value>Mitglied</value>
|
||||
</entry>
|
||||
</ddenum>
|
||||
<ddenum name="GenericOrganizationContactType">
|
||||
<entry key="contact" lang="de">
|
||||
<value>Kontakt</value>
|
||||
</entry>
|
||||
<entry key="contact" lang="en">
|
||||
<value>Contact</value>
|
||||
</entry>
|
||||
</ddenum>
|
||||
</ddenums>
|
||||
|
|
@ -170,4 +170,12 @@
|
|||
<value>Mitglied</value>
|
||||
</entry>
|
||||
</ddenum>
|
||||
<ddenum name="GenericOrganizationContactType">
|
||||
<entry key="contact" lang="de">
|
||||
<value>Kontakt</value>
|
||||
</entry>
|
||||
<entry key="contact" lang="en">
|
||||
<value>Contact</value>
|
||||
</entry>
|
||||
</ddenum>
|
||||
</ddenums>
|
||||
|
|
@ -170,4 +170,12 @@
|
|||
<value>Mitglied</value>
|
||||
</entry>
|
||||
</ddenum>
|
||||
<ddenum name="GenericOrganizationContactType">
|
||||
<entry key="contact" lang="de">
|
||||
<value>Kontakt</value>
|
||||
</entry>
|
||||
<entry key="contact" lang="en">
|
||||
<value>Contact</value>
|
||||
</entry>
|
||||
</ddenum>
|
||||
</ddenums>
|
||||
|
|
@ -18,7 +18,14 @@
|
|||
*/
|
||||
package com.arsdigita.cms.contenttypes.ui;
|
||||
|
||||
import com.arsdigita.bebop.Label;
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.SegmentedPanel;
|
||||
import com.arsdigita.bebop.SimpleContainer;
|
||||
import com.arsdigita.bebop.event.PrintEvent;
|
||||
import com.arsdigita.bebop.event.PrintListener;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.GenericPerson;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||
|
||||
|
|
@ -40,8 +47,72 @@ public class PersonPublicationsStep extends SimpleEditStep {
|
|||
final String prefix) {
|
||||
super(itemModel, parent, prefix);
|
||||
|
||||
final SegmentedPanel panel = new SegmentedPanel();
|
||||
final Label personPubsHeader = new Label(new PrintListener() {
|
||||
|
||||
@Override
|
||||
public void prepare(final PrintEvent event) {
|
||||
final PageState state = event.getPageState();
|
||||
final Label target = (Label) event.getTarget();
|
||||
|
||||
final GenericPerson person = (GenericPerson) itemModel.getSelectedItem(state);
|
||||
|
||||
target.setLabel(PublicationGlobalizationUtil.globalize("person.ui.publications.header",
|
||||
new String[]{person.getFullName()}));
|
||||
}
|
||||
});
|
||||
final PersonPublicationsTable publicationsTable = new PersonPublicationsTable(itemModel);
|
||||
setDisplayComponent(publicationsTable);
|
||||
panel.addSegment(personPubsHeader, publicationsTable);
|
||||
|
||||
final SimpleContainer aliasHeader = new SimpleContainer();
|
||||
final Label personAliasPubsHeader = new Label(new PrintListener() {
|
||||
|
||||
@Override
|
||||
public void prepare(final PrintEvent event) {
|
||||
final PageState state = event.getPageState();
|
||||
final Label target = (Label) event.getTarget();
|
||||
|
||||
final GenericPerson person = (GenericPerson) itemModel.getSelectedItem(state);
|
||||
final GenericPerson alias = person.getAlias();
|
||||
|
||||
if (alias == null) {
|
||||
target.setLabel("");
|
||||
} else {
|
||||
target.setLabel(PublicationGlobalizationUtil.globalize("person.ui.publications.header",
|
||||
new String[]{alias.getFullName()}));
|
||||
}
|
||||
}
|
||||
});
|
||||
final Label personAliasOfHeader = new Label(new PrintListener() {
|
||||
|
||||
@Override
|
||||
public void prepare(final PrintEvent event) {
|
||||
final PageState state = event.getPageState();
|
||||
final Label target = (Label) event.getTarget();
|
||||
|
||||
final GenericPerson person = (GenericPerson) itemModel.getSelectedItem(state);
|
||||
final GenericPerson alias = person.getAlias();
|
||||
|
||||
if (alias == null) {
|
||||
target.setLabel("");
|
||||
} else {
|
||||
target.setLabel(PublicationGlobalizationUtil.globalize("person.ui.publications.header.alias_of",
|
||||
new String[]{person.getFullName()}));
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
aliasHeader.add(personAliasPubsHeader);
|
||||
aliasHeader.add(personAliasOfHeader);
|
||||
|
||||
final PersonPublicationsTable aliasPublicationsTable = new PersonPublicationsTable(itemModel, true);
|
||||
|
||||
panel.addSegment(aliasHeader, aliasPublicationsTable);
|
||||
|
||||
//setDisplayComponent(publicationsTable);
|
||||
setDisplayComponent(panel);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ import com.arsdigita.bebop.Label;
|
|||
import com.arsdigita.bebop.Link;
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.Table;
|
||||
import com.arsdigita.bebop.event.PrintEvent;
|
||||
import com.arsdigita.bebop.event.PrintListener;
|
||||
import com.arsdigita.bebop.table.TableCellRenderer;
|
||||
import com.arsdigita.bebop.table.TableColumn;
|
||||
import com.arsdigita.bebop.table.TableColumnModel;
|
||||
|
|
@ -51,14 +53,40 @@ public class PersonPublicationsTable extends Table {
|
|||
private final static String TABLE_COL_YEAR = "table_col_year";
|
||||
private final static String TABLE_COL_TYPE = "table_col_type";
|
||||
//private final String TABLE_COL_DEL = "table_col_del";
|
||||
private ItemSelectionModel itemModel;
|
||||
//private ItemSelectionModel itemModel;
|
||||
|
||||
public PersonPublicationsTable(final ItemSelectionModel itemModel) {
|
||||
this(itemModel, false);
|
||||
}
|
||||
|
||||
public PersonPublicationsTable(final ItemSelectionModel itemModel, final boolean useAlias) {
|
||||
super();
|
||||
|
||||
this.itemModel = itemModel;
|
||||
//this.itemModel = itemModel;
|
||||
|
||||
setEmptyView(new Label(PublicationGlobalizationUtil.globalize("person.ui.publications.none")));
|
||||
//setEmptyView(new Label(PublicationGlobalizationUtil.globalize("person.ui.publications.none")));
|
||||
setEmptyView(new Label(new PrintListener() {
|
||||
@Override
|
||||
public void prepare(final PrintEvent event) {
|
||||
final PageState state = event.getPageState();
|
||||
final Label target = (Label) event.getTarget();
|
||||
|
||||
if (useAlias) {
|
||||
final GenericPerson person = (GenericPerson) itemModel.getSelectedItem(state);
|
||||
final GenericPerson alias = person.getAlias();
|
||||
|
||||
if (alias == null) {
|
||||
target.setLabel("");
|
||||
} else {
|
||||
target.setLabel(PublicationGlobalizationUtil.globalize("person.ui.publications.none"));
|
||||
}
|
||||
|
||||
} else {
|
||||
target.setLabel(PublicationGlobalizationUtil.globalize("person.ui.publications.none"));
|
||||
}
|
||||
}
|
||||
|
||||
}));
|
||||
|
||||
final TableColumnModel columnModel = getColumnModel();
|
||||
columnModel.add(new TableColumn(
|
||||
|
|
@ -74,7 +102,7 @@ public class PersonPublicationsTable extends Table {
|
|||
PublicationGlobalizationUtil.globalize("person.ui.publications.columns.type").localize(),
|
||||
TABLE_COL_TYPE));
|
||||
|
||||
setModelBuilder(new ModelBuilder(itemModel));
|
||||
setModelBuilder(new ModelBuilder(itemModel, useAlias));
|
||||
|
||||
columnModel.get(0).setCellRenderer(new EditCellRenderer());
|
||||
|
||||
|
|
@ -83,15 +111,29 @@ public class PersonPublicationsTable extends Table {
|
|||
private class ModelBuilder extends LockableImpl implements TableModelBuilder {
|
||||
|
||||
private final ItemSelectionModel itemModel;
|
||||
private final boolean useAlias;
|
||||
|
||||
public ModelBuilder(final ItemSelectionModel itemModel) {
|
||||
this.itemModel = itemModel;
|
||||
this(itemModel, false);
|
||||
}
|
||||
|
||||
public ModelBuilder(final ItemSelectionModel itemModel, final boolean useAlias) {
|
||||
this.itemModel = itemModel;
|
||||
this.useAlias = useAlias;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableModel makeModel(final Table table, final PageState state) {
|
||||
table.getRowSelectionModel().clearSelection(state);
|
||||
|
||||
final GenericPerson person = (GenericPerson) itemModel.getSelectedItem(state);
|
||||
final GenericPerson person;
|
||||
if (useAlias && ((GenericPerson) itemModel.getSelectedItem(state)).getAlias() == null) {
|
||||
person = null;
|
||||
} else if (useAlias && ((GenericPerson) itemModel.getSelectedItem(state)).getAlias() != null) {
|
||||
person = ((GenericPerson) itemModel.getSelectedItem(state)).getAlias();
|
||||
} else {
|
||||
person = (GenericPerson) itemModel.getSelectedItem(state);
|
||||
}
|
||||
|
||||
return new Model(table, state, person);
|
||||
}
|
||||
|
|
@ -105,8 +147,12 @@ public class PersonPublicationsTable extends Table {
|
|||
|
||||
public Model(final Table table, final PageState state, final GenericPerson person) {
|
||||
this.table = table;
|
||||
if (person == null) {
|
||||
publications = null;
|
||||
} else {
|
||||
publications = Publication.getPublications(person);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColumnCount() {
|
||||
|
|
@ -149,6 +195,7 @@ public class PersonPublicationsTable extends Table {
|
|||
|
||||
private class EditCellRenderer extends LockableImpl implements TableCellRenderer {
|
||||
|
||||
@Override
|
||||
public Component getComponent(final Table table,
|
||||
final PageState state,
|
||||
final Object value,
|
||||
|
|
|
|||
|
|
@ -415,3 +415,5 @@ publications.ui.journal.symbol=Symbol of the journal
|
|||
publications.ui.publication.first_published=First published
|
||||
publications.ui.publication.language=Language of publication
|
||||
publications.ui.series.number=Volume of series
|
||||
person.ui.publications.header=Publications with {0} as author
|
||||
person.ui.publications.header.alias_of=(Alias of {0})
|
||||
|
|
|
|||
|
|
@ -414,3 +414,5 @@ publications.ui.journal.symbol=K\u00fcrzel der Zeitschrift
|
|||
publications.ui.publication.first_published=Erste Ver\u00f6ffentlichung
|
||||
publications.ui.publication.language=Sprache der Publikation
|
||||
publications.ui.series.number=Band der Reihe
|
||||
person.ui.publications.header=Publikationen mit {0} als Autorin/Autor
|
||||
person.ui.publications.header.alias_of=\ (Alias von {0})
|
||||
|
|
|
|||
|
|
@ -1,3 +1,21 @@
|
|||
/*
|
||||
* Copyright (c) 2011, 2012, 2013 Jens Pelzetter
|
||||
*
|
||||
* 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.cms.contenttypes.ui;
|
||||
|
||||
import com.arsdigita.bebop.PageState;
|
||||
|
|
@ -39,9 +57,7 @@ public class SciInstituteMembersTab implements GenericOrgaUnitTab {
|
|||
false,
|
||||
false,
|
||||
false);
|
||||
private final TextFilter surnameFilter =
|
||||
new TextFilter(SURNAME_PARAM,
|
||||
GenericPerson.SURNAME);
|
||||
private final TextFilter surnameFilter = new TextFilter(SURNAME_PARAM, GenericPerson.SURNAME);
|
||||
|
||||
static {
|
||||
config.load();
|
||||
|
|
@ -58,8 +74,7 @@ public class SciInstituteMembersTab implements GenericOrgaUnitTab {
|
|||
|
||||
public boolean hasData(final GenericOrganizationalUnit orgaunit,
|
||||
final PageState state) {
|
||||
if ((orgaunit.getPersons() != null)
|
||||
&& orgaunit.getPersons().size() > 0) {
|
||||
if ((orgaunit.getPersons() != null) && orgaunit.getPersons().size() > 0) {
|
||||
return true;
|
||||
} else if (config.isMergingMembers()) {
|
||||
final DataCollection persons = getData(orgaunit, state);
|
||||
|
|
@ -86,7 +101,7 @@ public class SciInstituteMembersTab implements GenericOrgaUnitTab {
|
|||
|
||||
statusFilter.generateXml(filtersElem);
|
||||
|
||||
if (persons.isEmpty()) {
|
||||
if ((persons == null) || persons.isEmpty()) {
|
||||
if ((surnameFilter != null)
|
||||
&& (surnameFilter.getFilter() != null)
|
||||
&& (!surnameFilter.getFilter().trim().isEmpty())) {
|
||||
|
|
@ -182,6 +197,7 @@ public class SciInstituteMembersTab implements GenericOrgaUnitTab {
|
|||
orgaunit.getName(),
|
||||
System.currentTimeMillis() - start,
|
||||
config.isMergingMembers()));
|
||||
|
||||
return membersQuery;
|
||||
}
|
||||
|
||||
|
|
@ -249,5 +265,6 @@ public class SciInstituteMembersTab implements GenericOrgaUnitTab {
|
|||
protected ContentItem getContentItem(final PageState state) {
|
||||
return item;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue