Several things for 2.2.1
git-svn-id: https://svn.libreccm.org/ccm/trunk@2759 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
9358238257
commit
4819a40a65
|
|
@ -43,6 +43,7 @@ import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
|
|||
import com.arsdigita.util.UncheckedWrapperException;
|
||||
import java.util.TooManyListenersException;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import com.arsdigita.kernel.Kernel;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -80,7 +81,7 @@ public class GenericOrgaUnitTextAssetEdit extends BasicItemForm implements FormS
|
|||
|
||||
final RelationAttributeCollection names = new RelationAttributeCollection(
|
||||
"GenericOrgaUnitTextAssetName");
|
||||
//names.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale().getLanguage());
|
||||
names.addLanguageFilter(Kernel.getConfig().getDefaultLanguage());
|
||||
while (names.next()) {
|
||||
//target.addOption(new Option(names.getKey(), names.getName()));
|
||||
target.addOption(new Option(
|
||||
|
|
|
|||
|
|
@ -32,12 +32,11 @@ import com.arsdigita.bebop.table.TableModel;
|
|||
import com.arsdigita.bebop.table.TableModelBuilder;
|
||||
import com.arsdigita.cms.CMS;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.RelationAttribute;
|
||||
import com.arsdigita.cms.RelationAttributeCollection;
|
||||
import com.arsdigita.cms.RelationAttributeResourceBundleControl;
|
||||
import com.arsdigita.cms.contentassets.GenericOrgaUnitTextAsset;
|
||||
import com.arsdigita.cms.contentassets.GenericOrgaUnitTextAssetGlobalizationUtil;
|
||||
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit;
|
||||
import com.arsdigita.globalization.GlobalizationHelper;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
|
||||
import com.arsdigita.persistence.DataCollection;
|
||||
import com.arsdigita.persistence.DataObject;
|
||||
|
|
@ -75,16 +74,16 @@ public class GenericOrgaUnitTextAssetTable extends Table {
|
|||
colModel.add(new TableColumn(
|
||||
0,
|
||||
new Label(GenericOrgaUnitTextAssetGlobalizationUtil.globalize(
|
||||
"cms.orgaunit.textasset.name"))));
|
||||
"cms.orgaunit.textasset.name"))));
|
||||
colModel.add(new TableColumn(
|
||||
1,
|
||||
new Label(GenericOrgaUnitTextAssetGlobalizationUtil.globalize(
|
||||
"cms.orgaunit.textasset.edit")),
|
||||
"cms.orgaunit.textasset.edit")),
|
||||
TABLE_COL_EDIT));
|
||||
colModel.add(new TableColumn(
|
||||
2,
|
||||
new Label(GenericOrgaUnitTextAssetGlobalizationUtil.globalize(
|
||||
"cms.orgaunit.textasset.delete")),
|
||||
"cms.orgaunit.textasset.delete")),
|
||||
TABLE_COL_DEL));
|
||||
|
||||
setModelBuilder(new ModelBuilder(itemModel));
|
||||
|
|
@ -152,18 +151,25 @@ public class GenericOrgaUnitTextAssetTable extends Table {
|
|||
public Object getElementAt(final int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 0:
|
||||
final RelationAttributeCollection names = new RelationAttributeCollection(
|
||||
"GenericOrgaUnitTextAssetName");
|
||||
names.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale().getLanguage());
|
||||
names.addKeyFilter(textAsset.getTextAssetName());
|
||||
final String label;
|
||||
if (names.next()) {
|
||||
label = names.getName();
|
||||
names.close();
|
||||
} else {
|
||||
label = textAsset.getTextAssetName();
|
||||
}
|
||||
return label;
|
||||
final GlobalizedMessage name = new GlobalizedMessage(
|
||||
textAsset.getTextAssetName(),
|
||||
"GenericOrgaUnitTextAssetName",
|
||||
new RelationAttributeResourceBundleControl());
|
||||
|
||||
return new Label(name);
|
||||
// final RelationAttributeCollection names = new RelationAttributeCollection(
|
||||
// "GenericOrgaUnitTextAssetName");
|
||||
// names.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale().getLanguage());
|
||||
// names.addKeyFilter(textAsset.getTextAssetName());
|
||||
// final String label;
|
||||
// if (names.next()) {
|
||||
// label = names.getName();
|
||||
// names.close();
|
||||
// } else {
|
||||
// label = textAsset.getTextAssetName();
|
||||
// }
|
||||
// return label;
|
||||
|
||||
case 1:
|
||||
return new Label(GenericOrgaUnitTextAssetGlobalizationUtil.globalize(
|
||||
"cms.orgaunit.textasset.edit"));
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ import com.arsdigita.cms.contenttypes.GenericPerson;
|
|||
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
||||
import com.arsdigita.cms.ui.ItemSearchWidget;
|
||||
import com.arsdigita.cms.ui.authoring.BasicItemForm;
|
||||
import com.arsdigita.globalization.GlobalizationHelper;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import com.arsdigita.kernel.Kernel;
|
||||
import com.arsdigita.util.UncheckedWrapperException;
|
||||
import java.util.TooManyListenersException;
|
||||
import org.apache.log4j.Logger;
|
||||
|
|
@ -112,9 +112,8 @@ public class GenericOrganizationalUnitPersonAddForm
|
|||
final SingleSelect target = (SingleSelect) event.getTarget();
|
||||
|
||||
final RelationAttributeCollection roles = new RelationAttributeCollection(
|
||||
getRoleAttributeName());
|
||||
// roles.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale().
|
||||
// getLanguage());
|
||||
getRoleAttributeName());
|
||||
roles.addLanguageFilter(Kernel.getConfig().getDefaultLanguage());
|
||||
while (roles.next()) {
|
||||
RelationAttribute role;
|
||||
role = roles.getRelationAttribute();
|
||||
|
|
@ -151,8 +150,7 @@ public class GenericOrganizationalUnitPersonAddForm
|
|||
final SingleSelect target = (SingleSelect) event.getTarget();
|
||||
RelationAttributeCollection statusColl = new RelationAttributeCollection(
|
||||
getStatusAttributeName());
|
||||
// statusColl.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale().
|
||||
// getLanguage());
|
||||
statusColl.addLanguageFilter(Kernel.getConfig().getDefaultLanguage());
|
||||
while (statusColl.next()) {
|
||||
RelationAttribute status;
|
||||
status = statusColl.getRelationAttribute();
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ import com.arsdigita.cms.CMS;
|
|||
import com.arsdigita.cms.ContentSection;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.RelationAttributeCollection;
|
||||
import com.arsdigita.cms.RelationAttributeResourceBundleControl;
|
||||
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit;
|
||||
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitPersonCollection;
|
||||
import com.arsdigita.cms.contenttypes.GenericPerson;
|
||||
|
|
@ -43,6 +44,7 @@ import com.arsdigita.cms.dispatcher.ItemResolver;
|
|||
import com.arsdigita.cms.dispatcher.Utilities;
|
||||
import com.arsdigita.cms.SecurityManager;
|
||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import com.arsdigita.util.LockableImpl;
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.log4j.Logger;
|
||||
|
|
@ -77,28 +79,28 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements
|
|||
tabModel.add(new TableColumn(
|
||||
0,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.genericorgaunit.persons.name"),
|
||||
"cms.contenttypes.ui.genericorgaunit.persons.name"),
|
||||
TABLE_COL_EDIT));
|
||||
tabModel.add(new TableColumn(
|
||||
1,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.genericorgaunit.persons.role")));
|
||||
"cms.contenttypes.ui.genericorgaunit.persons.role")));
|
||||
tabModel.add(
|
||||
new TableColumn(
|
||||
2,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.genericorgaunit.persons.status")));
|
||||
"cms.contenttypes.ui.genericorgaunit.persons.status")));
|
||||
tabModel.add(
|
||||
new TableColumn(
|
||||
3,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.genericorganunit.persons.edit"),
|
||||
"cms.contenttypes.ui.genericorganunit.persons.edit"),
|
||||
TABLE_COL_EDIT_LINK));
|
||||
tabModel.add(
|
||||
new TableColumn(
|
||||
4,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.genericorgaunit.persons.delete"),
|
||||
"cms.contenttypes.ui.genericorgaunit.persons.delete"),
|
||||
TABLE_COL_DEL));
|
||||
|
||||
setModelBuilder(
|
||||
|
|
@ -115,14 +117,14 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements
|
|||
extends LockableImpl
|
||||
implements TableModelBuilder {
|
||||
|
||||
private ItemSelectionModel m_itemModel;
|
||||
private final ItemSelectionModel m_itemModel;
|
||||
|
||||
public GenericOrganizationalUnitTableModelBuilder(
|
||||
ItemSelectionModel itemModel) {
|
||||
m_itemModel = itemModel;
|
||||
}
|
||||
|
||||
public TableModel makeModel(Table table, PageState state) {
|
||||
public TableModel makeModel(final Table table, final PageState state) {
|
||||
table.getRowSelectionModel().clearSelection(state);
|
||||
GenericOrganizationalUnit orgaunit = (GenericOrganizationalUnit) m_itemModel.
|
||||
getSelectedObject(state);
|
||||
|
|
@ -146,7 +148,7 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements
|
|||
m_table = table;
|
||||
m_personsCollection = orgaunit.getPersons();
|
||||
s_log.debug(String.format("m_personsCollection.size() = %d", m_personsCollection.
|
||||
size()));
|
||||
size()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -159,7 +161,7 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements
|
|||
boolean ret;
|
||||
|
||||
if ((m_personsCollection != null)
|
||||
&& m_personsCollection.next()) {
|
||||
&& m_personsCollection.next()) {
|
||||
m_person = m_personsCollection.getPerson();
|
||||
ret = true;
|
||||
} else {
|
||||
|
|
@ -185,21 +187,29 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements
|
|||
return roleName;
|
||||
} else {
|
||||
return new Label(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.ui.unknownRole"));
|
||||
"cms.ui.unknownRole"));
|
||||
}
|
||||
case 2:
|
||||
RelationAttributeCollection status = new RelationAttributeCollection(
|
||||
final GlobalizedMessage statusMsg = new GlobalizedMessage(
|
||||
m_personsCollection.getStatus(),
|
||||
getStatusAttributeName(),
|
||||
m_personsCollection.getStatus());
|
||||
if (status.next()) {
|
||||
String statusName;
|
||||
statusName = status.getName();
|
||||
status.close();
|
||||
return statusName;
|
||||
} else {
|
||||
return new Label(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.ui.unknownStatus"));
|
||||
}
|
||||
new RelationAttributeResourceBundleControl());
|
||||
|
||||
return new Label(statusMsg);
|
||||
|
||||
// RelationAttributeCollection status = new RelationAttributeCollection(
|
||||
// getStatusAttributeName(),
|
||||
// m_personsCollection.getStatus());
|
||||
//
|
||||
//// if (status.next()) {
|
||||
// String statusName;
|
||||
// statusName = status.getName();
|
||||
// status.close();
|
||||
// return statusName;
|
||||
// } else {
|
||||
// return new Label(ContenttypesGlobalizationUtil.globalize(
|
||||
// "cms.ui.unknownStatus"));
|
||||
// }
|
||||
case 3:
|
||||
return new Label(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.ui.edit_assoc"));
|
||||
|
|
@ -283,13 +293,13 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements
|
|||
extends LockableImpl
|
||||
implements TableCellRenderer {
|
||||
|
||||
public Component getComponent(Table table,
|
||||
PageState state,
|
||||
Object value,
|
||||
boolean isSelected,
|
||||
Object key,
|
||||
int row,
|
||||
int column) {
|
||||
public Component getComponent(final Table table,
|
||||
final PageState state,
|
||||
final Object value,
|
||||
final boolean isSelected,
|
||||
final Object key,
|
||||
final int row,
|
||||
final int column) {
|
||||
SecurityManager securityManager = CMS.getSecurityManager(state);
|
||||
GenericOrganizationalUnit orgaUnit = (GenericOrganizationalUnit) m_itemModel.
|
||||
getSelectedObject(state);
|
||||
|
|
@ -299,11 +309,10 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements
|
|||
orgaUnit);
|
||||
|
||||
if (canEdit) {
|
||||
ControlLink link = new ControlLink(value.toString());
|
||||
ControlLink link = new ControlLink((Label) value);
|
||||
return link;
|
||||
} else {
|
||||
Label label = new Label(value.toString());
|
||||
return label;
|
||||
return (Label) value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -330,13 +339,13 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements
|
|||
SecurityManager.DELETE_ITEM,
|
||||
orgaunit);
|
||||
if (canEdit) {
|
||||
ControlLink link = new ControlLink(value.toString());
|
||||
ControlLink link = new ControlLink((Label)value);
|
||||
link.setConfirmation(ContenttypesGlobalizationUtil.
|
||||
globalize(
|
||||
"cms.contenttypes.ui.genericorgaunit.persons.confirm_delete"));
|
||||
"cms.contenttypes.ui.genericorgaunit.persons.confirm_delete"));
|
||||
return link;
|
||||
} else {
|
||||
return new Label(value.toString());
|
||||
return (Label) value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -348,7 +357,7 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements
|
|||
PageState state = event.getPageState();
|
||||
s_log.debug(String.format("RowKey = %s", event.getRowKey().toString()));
|
||||
s_log.debug(String.format("Selected column: %d", event.getColumn().
|
||||
intValue()));
|
||||
intValue()));
|
||||
|
||||
GenericPerson person = new GenericPerson(new BigDecimal(event.getRowKey().
|
||||
toString()));
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ public class ApplicationCreateForm<T extends Application> extends Form implement
|
|||
}
|
||||
applications.close();
|
||||
}
|
||||
|
||||
|
||||
final Application application = Application.createApplication(applicationType,
|
||||
(String) applicationUrl.getValue(state),
|
||||
(String) applicationTitle.getValue(state),
|
||||
|
|
|
|||
|
|
@ -7,45 +7,46 @@
|
|||
/* http://svn.xinha.webfactional.com/trunk/examples/XinhaConfig.js */
|
||||
_editor_skin = "silva";
|
||||
_editor_icons = "Crystal";
|
||||
xinha_init=null;
|
||||
xinha_config=null;
|
||||
xinha_init=xinha_init?xinha_init:function(){
|
||||
xinha_editors=xinha_editors?xinha_editors:["myTextArea","anotherOne"];
|
||||
xinha_plugins=xinha_plugins?xinha_plugins:["CharacterMap","CharCounter",
|
||||
"ContextMenu","DefinitionList","FindReplace","ListType","QuickTag",
|
||||
"SmartReplace","Stylist","TableOperations","UnFormat","Equation","OpenCCM"];
|
||||
if(!Xinha.loadPlugins(xinha_plugins,xinha_init)){
|
||||
return;
|
||||
}
|
||||
xinha_config=xinha_config?xinha_config():new Xinha.Config();
|
||||
//this is the standard toolbar for CCM, feel free to remove buttons as you like
|
||||
xinha_config.toolbar =
|
||||
[
|
||||
["popupeditor"],
|
||||
["separator","formatblock","bold","italic","underline","strikethrough"],
|
||||
["separator","subscript","superscript"],
|
||||
["separator","justifyleft","justifycenter","justifyright","justifyfull"],
|
||||
["separator","insertorderedlist","insertunorderedlist","outdent","indent"],
|
||||
["separator","createlink"],
|
||||
["separator","undo","redo","selectall"],
|
||||
(Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite"]),
|
||||
["separator","killword","clearfonts","removeformat"],
|
||||
["linebreak","separator","htmlmode","showhelp","about"]
|
||||
];
|
||||
xinha_config.formatblock =
|
||||
{
|
||||
"— format —" : "",
|
||||
"Heading 3": "h3",
|
||||
"Heading 4": "h4",
|
||||
"Heading 5": "h5",
|
||||
"Heading 6": "h6",
|
||||
"Normal" : "p"
|
||||
};
|
||||
xinha_init = null;
|
||||
xinha_config = null;
|
||||
xinha_init = xinha_init ? xinha_init : function() {
|
||||
xinha_editors = xinha_editors ? xinha_editors : ["myTextArea", "anotherOne"];
|
||||
xinha_plugins = xinha_plugins ? xinha_plugins : ["CharacterMap", "CharCounter",
|
||||
"ContextMenu", "DefinitionList", "FindReplace", "ListType", "QuickTag",
|
||||
"SmartReplace", "Stylist", "TableOperations", "UnFormat", "Equation", "OpenCCM"];
|
||||
if (!Xinha.loadPlugins(xinha_plugins, xinha_init)) {
|
||||
return;
|
||||
}
|
||||
xinha_config = xinha_config ? xinha_config() : new Xinha.Config();
|
||||
//this is the standard toolbar for CCM, feel free to remove buttons as you like
|
||||
xinha_config.toolbar =
|
||||
[
|
||||
["popupeditor"],
|
||||
["separator", "formatblock", "bold", "italic", "underline", "strikethrough"],
|
||||
["separator", "subscript", "superscript"],
|
||||
["separator", "justifyleft", "justifycenter", "justifyright", "justifyfull"],
|
||||
["separator", "insertorderedlist", "insertunorderedlist", "outdent", "indent"],
|
||||
["separator", "createlink"],
|
||||
["separator", "undo", "redo", "selectall"],
|
||||
(Xinha.is_gecko ? [] : ["cut", "copy", "paste", "overwrite"]),
|
||||
["separator", "killword", "clearfonts", "removeformat"],
|
||||
["linebreak", "separator", "htmlmode", "showhelp", "about"]
|
||||
];
|
||||
xinha_config.formatblock =
|
||||
{
|
||||
"— format —": "",
|
||||
"Heading 3": "h3",
|
||||
"Heading 4": "h4",
|
||||
"Heading 5": "h5",
|
||||
"Heading 6": "h6",
|
||||
"Normal": "p"
|
||||
};
|
||||
|
||||
xinha_config.pageStyleSheets=[_editor_url+"examples/full_example.css"];
|
||||
xinha_config.width="90%";
|
||||
xinha_editors=Xinha.makeEditors(xinha_editors,xinha_config,xinha_plugins);
|
||||
Xinha.startEditors(xinha_editors);
|
||||
//xinha_config.pageStyleSheets = [_editor_url + "examples/full_example.css"];
|
||||
xinha_config.pageStyleSheets = [_editor_url + "ccm-xinha.css"];
|
||||
xinha_config.width = "90%";
|
||||
xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
|
||||
Xinha.startEditors(xinha_editors);
|
||||
};
|
||||
Xinha.addOnloadHandler(xinha_init);
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
div.image.left {
|
||||
float: left !important;
|
||||
}
|
||||
|
||||
div.image.center {
|
||||
float: none !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.image.right {
|
||||
float: right !important;
|
||||
}
|
||||
|
|
@ -49,6 +49,6 @@ public class ForumApplicationManager extends AbstractApplicationManager<Forum> {
|
|||
}
|
||||
|
||||
public boolean allowRoot() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
|||
import com.arsdigita.cms.ui.ItemSearchWidget;
|
||||
import com.arsdigita.cms.ui.authoring.BasicItemForm;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import com.arsdigita.kernel.Kernel;
|
||||
import com.arsdigita.toolbox.GlobalisationUtil;
|
||||
import com.arsdigita.util.UncheckedWrapperException;
|
||||
import java.util.TooManyListenersException;
|
||||
|
|
@ -95,12 +96,10 @@ public class SciPublicationsPersonsPersonForm extends BasicItemForm {
|
|||
final SingleSelect target = (SingleSelect) event.getTarget();
|
||||
final RelationAttributeCollection relations = new RelationAttributeCollection(
|
||||
SciPublicationsPersonsService.RELATION_ATTRIBUTE);
|
||||
// relations.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale()
|
||||
// .getLanguage());
|
||||
relations.addLanguageFilter(Kernel.getConfig().getDefaultLanguage());
|
||||
while (relations.next()) {
|
||||
RelationAttribute relation;
|
||||
relation = relations.getRelationAttribute();
|
||||
//target.addOption(new Option(relation.getKey(), relation.getName()));
|
||||
target.addOption(new Option(
|
||||
relation.getKey(),
|
||||
new Label(new GlobalizedMessage(
|
||||
|
|
|
|||
|
|
@ -34,14 +34,13 @@ 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.RelationAttributeCollection;
|
||||
import com.arsdigita.cms.RelationAttributeResourceBundleControl;
|
||||
import com.arsdigita.cms.contentassets.SciPublicationsPersonsPersonCollection;
|
||||
import com.arsdigita.cms.contentassets.SciPublicationsPersonsService;
|
||||
import com.arsdigita.cms.contenttypes.GenericPerson;
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
import com.arsdigita.cms.dispatcher.ItemResolver;
|
||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||
import com.arsdigita.globalization.GlobalizationHelper;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import com.arsdigita.util.LockableImpl;
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -231,20 +230,26 @@ public class SciPublicationsPersonsPersonTable extends Table implements TableAct
|
|||
final int row,
|
||||
final int column) {
|
||||
|
||||
final String relation = (String) value;
|
||||
|
||||
final RelationAttributeCollection relations = new RelationAttributeCollection(
|
||||
SciPublicationsPersonsService.RELATION_ATTRIBUTE,
|
||||
relation);
|
||||
relations.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale().getLanguage());
|
||||
if (relations.isEmpty()) {
|
||||
return new Label(relation);
|
||||
} else {
|
||||
relations.next();
|
||||
final String label = relations.getName();
|
||||
relations.close();
|
||||
return new Label(label);
|
||||
}
|
||||
final GlobalizedMessage relation = new GlobalizedMessage((String) value,
|
||||
SciPublicationsPersonsService.RELATION_ATTRIBUTE,
|
||||
new RelationAttributeResourceBundleControl());
|
||||
|
||||
return new Label(relation);
|
||||
|
||||
// final String relation = (String) value;
|
||||
//
|
||||
// final RelationAttributeCollection relations = new RelationAttributeCollection(
|
||||
// SciPublicationsPersonsService.RELATION_ATTRIBUTE,
|
||||
// relation);
|
||||
// relations.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale().getLanguage());
|
||||
// if (relations.isEmpty()) {
|
||||
// return new Label(relation);
|
||||
// } else {
|
||||
// relations.next();
|
||||
// final String label = relations.getName();
|
||||
// relations.close();
|
||||
// return new Label(label);
|
||||
// }
|
||||
|
||||
//return new Label(value.toString());
|
||||
}
|
||||
|
|
@ -275,7 +280,7 @@ public class SciPublicationsPersonsPersonTable extends Table implements TableAct
|
|||
"com.arsdigita.cms.contentassets.publications_persons.person.remove.confirm"));
|
||||
return link;
|
||||
} else {
|
||||
return new Label(value.toString());
|
||||
return new Label((GlobalizedMessage) value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue