- Korrekturen am DaBIn-Importer, unter anderem:
- Statt des Namens eines Verlages wurde die URL als Titel des ContentItems für den Verlag verwendet - Die URLs für die FileStorageItems für die Arbeitspapiere waren nicht korrekt, daher konnten diese nicht geöffnet werden - Bei Sammelbänden wurde der Abstract nicht übernommen - Bei Projekten wurde das Linkfeld aus DaBIn nicht importiert. - Statt der URL wird bei Links für Publikationen und Projekten jetzt ein per Importer-Konfiguration festzulegender Titel verwendet - Weitere kleinere Korrekturen an den SciTypen - Feld für das Volumen der Finanzierung bei SciProjekt hinzugefügt. Das Feld kann über die Registry deaktiviert werden - Aktueller Stand verschiedener JSPs (beim ZeS-Test-Server bereits integriert) - Einige Übersetzungfehler behoben git-svn-id: https://svn.libreccm.org/ccm/trunk@795 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
c3d6ba347d
commit
40af6e4544
|
|
@ -1211,7 +1211,7 @@ public class DaBInImporter extends Program {
|
|||
|
||||
System.out.printf("%3d of %3d:\n", i + 1, projectsIds.size());
|
||||
result = stmt.executeQuery(String.format(
|
||||
"SELECT Name, Beschreibung, Finanzierung, Abteilung_Id, Beginn, Ende "
|
||||
"SELECT Name, Beschreibung, Finanzierung, Abteilung_Id, Beginn, Ende, Link "
|
||||
+ "FROM projekt "
|
||||
+ "WHERE Projekt_Id = %s AND Sprache = 'DE'",
|
||||
projectsIds.get(i)));
|
||||
|
|
@ -1228,10 +1228,11 @@ public class DaBInImporter extends Program {
|
|||
data.setEnd(new GregorianCalendar(result.getInt("Ende"),
|
||||
11, 31, 23, 59));
|
||||
}
|
||||
data.setLink(result.getString("Link"));
|
||||
}
|
||||
|
||||
result = stmt.executeQuery(String.format(
|
||||
"SELECT Name, Beschreibung, Finanzierung, Abteilung_Id, Beginn, Ende "
|
||||
"SELECT Name, Beschreibung, Finanzierung, Abteilung_Id, Beginn, Ende, Link "
|
||||
+ "FROM projekt "
|
||||
+ "WHERE Projekt_Id = %s AND Sprache = 'EN'",
|
||||
projectsIds.get(i)));
|
||||
|
|
@ -1248,6 +1249,7 @@ public class DaBInImporter extends Program {
|
|||
data.setEnd(new GregorianCalendar(result.getInt("Ende"),
|
||||
11, 31, 23, 59));
|
||||
}
|
||||
data.setLink(result.getString("Link"));
|
||||
}
|
||||
|
||||
result = stmt.executeQuery(String.format(
|
||||
|
|
@ -2226,6 +2228,17 @@ public class DaBInImporter extends Program {
|
|||
if (projectData.getEnd() != null) {
|
||||
projectDe.setEnd(projectData.getEnd().getTime());
|
||||
}
|
||||
if ((projectData.getLink() != null)
|
||||
&& !projectData.getLink().isEmpty()) {
|
||||
RelatedLink link = new RelatedLink();
|
||||
link.setTitle(config.getProperty(
|
||||
"projects.furtherInfoLink.de",
|
||||
projectData.getLink()));
|
||||
link.setTargetType(Link.EXTERNAL_LINK);
|
||||
link.setTargetURI(projectData.getLink());
|
||||
link.setLinkOwner(projectDe);
|
||||
}
|
||||
|
||||
projectDe.setLanguage("de");
|
||||
projectDe.setLifecycle(createLifecycle(projectsLifecycle));
|
||||
projectDe.setContentSection(projectsSection);
|
||||
|
|
@ -2260,6 +2273,16 @@ public class DaBInImporter extends Program {
|
|||
if (projectData.getEnd() != null) {
|
||||
projectEn.setEnd(projectData.getEnd().getTime());
|
||||
}
|
||||
if ((projectData.getLink() != null)
|
||||
&& !projectData.getLink().isEmpty()) {
|
||||
RelatedLink link = new RelatedLink();
|
||||
link.setTitle(config.getProperty(
|
||||
"projects.furtherInfoLink.en",
|
||||
projectData.getLink()));
|
||||
link.setTargetType(Link.EXTERNAL_LINK);
|
||||
link.setTargetURI(projectData.getLink());
|
||||
link.setLinkOwner(projectEn);
|
||||
}
|
||||
projectEn.setLanguage("en");
|
||||
projectEn.setLifecycle(createLifecycle(projectsLifecycle));
|
||||
projectEn.setContentSection(projectsSection);
|
||||
|
|
@ -2424,7 +2447,9 @@ public class DaBInImporter extends Program {
|
|||
if ((publicationData.getLink() != null)
|
||||
&& !publicationData.getLink().isEmpty()) {
|
||||
RelatedLink link = new RelatedLink();
|
||||
link.setTitle(publicationData.getLink());
|
||||
link.setTitle(config.getProperty(
|
||||
"publications.furtherInfoLink.de",
|
||||
publicationData.getLink()));
|
||||
link.setTargetType(Link.EXTERNAL_LINK);
|
||||
link.setTargetURI(publicationData.getLink());
|
||||
link.setLinkOwner(monographDe);
|
||||
|
|
@ -2460,7 +2485,9 @@ public class DaBInImporter extends Program {
|
|||
if ((publicationData.getLink() != null)
|
||||
&& !publicationData.getLink().isEmpty()) {
|
||||
RelatedLink link = new RelatedLink();
|
||||
link.setTitle(publicationData.getLink());
|
||||
link.setTitle(config.getProperty(
|
||||
"publications.furtherInfoLink.en",
|
||||
publicationData.getLink()));
|
||||
link.setTargetType(Link.EXTERNAL_LINK);
|
||||
link.setTargetURI(publicationData.getLink());
|
||||
link.setLinkOwner(monographEn);
|
||||
|
|
@ -2506,12 +2533,18 @@ public class DaBInImporter extends Program {
|
|||
if ((publicationData.getLink() != null)
|
||||
&& !publicationData.getLink().isEmpty()) {
|
||||
RelatedLink link = new RelatedLink();
|
||||
link.setTitle(publicationData.getLink());
|
||||
link.setTitle(config.getProperty(
|
||||
"publications.furtherInfoLink.de",
|
||||
publicationData.getLink()));
|
||||
link.setTargetType(Link.EXTERNAL_LINK);
|
||||
link.setTargetURI(publicationData.getLink());
|
||||
link.setLinkOwner(collectedVolumeDe);
|
||||
}
|
||||
|
||||
if (publicationData.getBeschreibung() != null) {
|
||||
collectedVolumeDe.setAbstract(publicationData.
|
||||
getBeschreibung());
|
||||
}
|
||||
|
||||
collectedVolumeDe.save();
|
||||
|
||||
|
|
@ -2533,12 +2566,19 @@ public class DaBInImporter extends Program {
|
|||
if ((publicationData.getLink() != null)
|
||||
&& !publicationData.getLink().isEmpty()) {
|
||||
RelatedLink link = new RelatedLink();
|
||||
link.setTitle(publicationData.getLink());
|
||||
link.setTitle(config.getProperty(
|
||||
"publications.furtherInfoLink.en",
|
||||
publicationData.getLink()));
|
||||
link.setTargetType(Link.EXTERNAL_LINK);
|
||||
link.setTargetURI(publicationData.getLink());
|
||||
link.setLinkOwner(collectedVolumeEn);
|
||||
}
|
||||
|
||||
if (publicationData.getBeschreibung() != null) {
|
||||
collectedVolumeEn.setAbstract(publicationData.
|
||||
getBeschreibung());
|
||||
}
|
||||
|
||||
collectedVolumeEn.save();
|
||||
publicationDe = collectedVolumeDe;
|
||||
publicationEn = collectedVolumeEn;
|
||||
|
|
@ -2556,7 +2596,9 @@ public class DaBInImporter extends Program {
|
|||
if ((publicationData.getLink() != null)
|
||||
&& !publicationData.getLink().isEmpty()) {
|
||||
RelatedLink link = new RelatedLink();
|
||||
link.setTitle(publicationData.getLink());
|
||||
link.setTitle(config.getProperty(
|
||||
"publications.furtherInfoLink.de",
|
||||
publicationData.getLink()));
|
||||
link.setTargetType(Link.EXTERNAL_LINK);
|
||||
link.setTargetURI(publicationData.getLink());
|
||||
link.setLinkOwner(articleDe);
|
||||
|
|
@ -2585,7 +2627,9 @@ public class DaBInImporter extends Program {
|
|||
if ((publicationData.getLink() != null)
|
||||
&& !publicationData.getLink().isEmpty()) {
|
||||
RelatedLink link = new RelatedLink();
|
||||
link.setTitle(publicationData.getLink());
|
||||
link.setTitle(config.getProperty(
|
||||
"publications.furtherInfoLink.en",
|
||||
publicationData.getLink()));
|
||||
link.setTargetType(Link.EXTERNAL_LINK);
|
||||
link.setTargetURI(publicationData.getLink());
|
||||
link.setLinkOwner(articleEn);
|
||||
|
|
@ -2623,14 +2667,18 @@ public class DaBInImporter extends Program {
|
|||
if ((publicationData.getLink() != null)
|
||||
&& !publicationData.getLink().isEmpty()) {
|
||||
RelatedLink link = new RelatedLink();
|
||||
String titleUrl;
|
||||
if (publicationData.getLink().length() < 200) {
|
||||
link.setTitle(publicationData.getLink());
|
||||
titleUrl = publicationData.getLink();
|
||||
} else {
|
||||
System.out.println(
|
||||
"\t***WARNING: Link in publication is too long for title. Truncating.");
|
||||
link.setTitle(publicationData.getLink().
|
||||
substring(0, 200));
|
||||
titleUrl = publicationData.getLink().
|
||||
substring(0, 200);
|
||||
}
|
||||
link.setTitle(config.getProperty(
|
||||
"publications.furtherInfoLink.de",
|
||||
titleUrl));
|
||||
link.setTargetType(Link.EXTERNAL_LINK);
|
||||
link.setTargetURI(publicationData.getLink());
|
||||
link.setLinkOwner(articleDe);
|
||||
|
|
@ -2659,14 +2707,18 @@ public class DaBInImporter extends Program {
|
|||
if ((publicationData.getLink() != null)
|
||||
&& !publicationData.getLink().isEmpty()) {
|
||||
RelatedLink link = new RelatedLink();
|
||||
String titleUrl;
|
||||
if (publicationData.getLink().length() < 200) {
|
||||
link.setTitle(publicationData.getLink());
|
||||
titleUrl = publicationData.getLink();
|
||||
} else {
|
||||
System.out.println(
|
||||
"\t***WARNING: Link in publication is too long for title. Truncating.");
|
||||
link.setTitle(publicationData.getLink().
|
||||
substring(0, 200));
|
||||
titleUrl = publicationData.getLink().
|
||||
substring(0, 200);
|
||||
}
|
||||
link.setTitle(config.getProperty(
|
||||
"publications.furtherInfoLink.en",
|
||||
titleUrl));
|
||||
link.setTargetType(Link.EXTERNAL_LINK);
|
||||
link.setTargetURI(publicationData.getLink());
|
||||
link.setLinkOwner(articleEn);
|
||||
|
|
@ -2704,7 +2756,9 @@ public class DaBInImporter extends Program {
|
|||
if ((publicationData.getLink() != null)
|
||||
&& !publicationData.getLink().isEmpty()) {
|
||||
RelatedLink link = new RelatedLink();
|
||||
link.setTitle(publicationData.getLink());
|
||||
link.setTitle(config.getProperty(
|
||||
"publications.furtherInfoLink.de",
|
||||
publicationData.getLink()));
|
||||
link.setTargetType(Link.EXTERNAL_LINK);
|
||||
link.setTargetURI(publicationData.getLink());
|
||||
link.setLinkOwner(greyDe);
|
||||
|
|
@ -2731,7 +2785,9 @@ public class DaBInImporter extends Program {
|
|||
if ((publicationData.getLink() != null)
|
||||
&& !publicationData.getLink().isEmpty()) {
|
||||
RelatedLink link = new RelatedLink();
|
||||
link.setTitle(publicationData.getLink());
|
||||
link.setTitle(config.getProperty(
|
||||
"publications.furtherInfoLink.en",
|
||||
publicationData.getLink()));
|
||||
link.setTargetType(Link.EXTERNAL_LINK);
|
||||
link.setTargetURI(publicationData.getLink());
|
||||
link.setLinkOwner(greyEn);
|
||||
|
|
@ -2849,7 +2905,9 @@ public class DaBInImporter extends Program {
|
|||
if ((publicationData.getAbteilungId() != null)
|
||||
&& !publicationData.getAbteilungId().isEmpty()
|
||||
&& departmentsMap.containsKey(
|
||||
publicationData.getAbteilungId())) {
|
||||
publicationData.getAbteilungId())
|
||||
&& (publicationData.getVisiblity()
|
||||
!= PublicationVisibility.PRIVATE)) {
|
||||
System.out.println(
|
||||
"\tAssigning publication to department...\n");
|
||||
ContentBundle department = departmentsMap.get(publicationData.
|
||||
|
|
@ -2878,17 +2936,21 @@ public class DaBInImporter extends Program {
|
|||
}
|
||||
|
||||
insertIntoAZFolder(publication, publicationsAlpha);
|
||||
Term term = publicationTerms.get(Integer.toString(((Publication) publication.
|
||||
getPrimaryInstance()).
|
||||
getYearOfPublication()));
|
||||
if (term == null) {
|
||||
term = publicationsTerm;
|
||||
if (publicationData.getVisiblity()
|
||||
== PublicationVisibility.GLOBAL) {
|
||||
Term term = publicationTerms.get(Integer.toString(((Publication) publication.
|
||||
getPrimaryInstance()).
|
||||
getYearOfPublication()));
|
||||
if (term == null) {
|
||||
term = publicationsTerm;
|
||||
}
|
||||
term = termsDomain.getTerm(term.getUniqueID());
|
||||
System.out.printf(
|
||||
"\tAdding publication to term '%s:%s'...\n", term.
|
||||
getUniqueID(), term.getName());
|
||||
term.addObject(publication);
|
||||
term.save();
|
||||
}
|
||||
term = termsDomain.getTerm(term.getUniqueID());
|
||||
System.out.printf("\tAdding publication to term '%s:%s'...\n", term.
|
||||
getUniqueID(), term.getName());
|
||||
term.addObject(publication);
|
||||
term.save();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -3050,7 +3112,7 @@ public class DaBInImporter extends Program {
|
|||
pdfFileStream.close();
|
||||
|
||||
FileStorageItem fsi = new FileStorageItem();
|
||||
String title = String.format("Datei %s",
|
||||
String title = String.format("Datei %s [pdf]",
|
||||
((WorkingPaper) workingPaper.
|
||||
getPrimaryInstance()).
|
||||
getTitle());
|
||||
|
|
@ -3060,7 +3122,7 @@ public class DaBInImporter extends Program {
|
|||
fsi.setTitle(title);
|
||||
}
|
||||
|
||||
String name = String.format("datei_%s.pdf",
|
||||
String name = String.format("datei_%s-pdf",
|
||||
((WorkingPaper) workingPaper.
|
||||
getPrimaryInstance()).
|
||||
getName());
|
||||
|
|
@ -3348,10 +3410,10 @@ public class DaBInImporter extends Program {
|
|||
|
||||
int colonIndex = normalizedData.indexOf(':');
|
||||
if (colonIndex < 0) {
|
||||
publisher.setName(normalizedData.replace(",", "").
|
||||
replace("/", "").
|
||||
replaceAll("\\s\\s+", " ").
|
||||
replace(' ', '-').toLowerCase());
|
||||
publisher.setName(normalizedData);/*.replace(",", "").
|
||||
replace("/", "").
|
||||
replaceAll("\\s\\s+", " ").
|
||||
replace(' ', '-').toLowerCase());*/
|
||||
} else {
|
||||
String name;
|
||||
String place;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ public class ProjectData {
|
|||
private String descEn;
|
||||
private String fundingDe;
|
||||
private String fundingEn;
|
||||
private String link;
|
||||
|
||||
public ProjectData() {
|
||||
members = new ArrayList<MembershipData>();
|
||||
|
|
@ -117,4 +118,12 @@ public class ProjectData {
|
|||
public void setNameEn(String nameEn) {
|
||||
this.nameEn = nameEn;
|
||||
}
|
||||
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public void setLink(String link) {
|
||||
this.link = link;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import com.arsdigita.domain.DomainObjectTraversalAdapter;
|
|||
import com.arsdigita.domain.DomainObjectXMLRenderer;
|
||||
import com.arsdigita.persistence.metadata.Property;
|
||||
import com.arsdigita.xml.Element;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* This is a special ContentItemXMLRenderer for CMS to get a more transparent
|
||||
|
|
@ -26,6 +27,7 @@ import com.arsdigita.xml.Element;
|
|||
*/
|
||||
public class ContentItemXMLRenderer extends DomainObjectXMLRenderer {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ContentItemXMLRenderer.class);
|
||||
private String m_propertyName = "";
|
||||
private String m_keyName = "";
|
||||
private String m_relationAttribute = "";
|
||||
|
|
@ -96,6 +98,7 @@ public class ContentItemXMLRenderer extends DomainObjectXMLRenderer {
|
|||
// Replace value of the property defined in RELATION_ATTRIBUTES string
|
||||
// of the primary domain object with the localized String.
|
||||
if (!key.isEmpty()) {
|
||||
logger.debug(String.format("Getting relation attribute value for key '%s' of relation attribute '%s'", key, m_relationAttribute));
|
||||
RelationAttributeCollection relationAttributeCollection = new RelationAttributeCollection(m_relationAttribute, key);
|
||||
relationAttributeCollection.addLanguageFilter(DispatcherHelper.getNegotiatedLocale().getLanguage());
|
||||
Element element = newElement(m_element, m_keyName);
|
||||
|
|
|
|||
|
|
@ -205,7 +205,8 @@ public abstract class CompoundContentItemPanel
|
|||
final long pageCount,
|
||||
final long begin,
|
||||
final long end,
|
||||
final long count) {
|
||||
final long count,
|
||||
final long size) {
|
||||
Element paginator;
|
||||
paginator =
|
||||
parent.newChildElement("nav:paginator",
|
||||
|
|
@ -236,7 +237,7 @@ public abstract class CompoundContentItemPanel
|
|||
paginator.addAttribute("pageSize", Long.toString(m_pageSize));
|
||||
paginator.addAttribute("objectBegin", Long.toString(begin + 1));
|
||||
paginator.addAttribute("objectEnd", Long.toString(end));
|
||||
paginator.addAttribute("objectCount", Long.toString(count + 1));
|
||||
paginator.addAttribute("objectCount", Long.toString(size));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -64,9 +64,9 @@ public class GenericOrganizationalUnitPanel extends CompoundContentItemPanel {
|
|||
long end = getPaginatorEnd(begin, count);
|
||||
pageNumber = normalizePageNumber(pageCount, pageNumber);
|
||||
|
||||
contacts.setRange((int) begin, (int) end);
|
||||
createPaginatorElement(parent, pageNumber, pageCount, begin, end,
|
||||
count);
|
||||
count, contacts.size());
|
||||
contacts.setRange((int) begin, (int) end);
|
||||
|
||||
Element contactsElem = parent.newChildElement("contacts");
|
||||
while (contacts.next()) {
|
||||
|
|
@ -95,9 +95,9 @@ public class GenericOrganizationalUnitPanel extends CompoundContentItemPanel {
|
|||
long end = getPaginatorEnd(begin, persons.size());
|
||||
pageNumber = normalizePageNumber(pageCount, pageNumber);
|
||||
|
||||
persons.setRange((int) begin, (int) end);
|
||||
createPaginatorElement(parent, pageNumber, pageCount, begin, end,
|
||||
count);
|
||||
count, persons.size());
|
||||
persons.setRange((int) begin, (int) end);
|
||||
|
||||
while (persons.next()) {
|
||||
GenericPerson person;
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ publications.ui.series.volumes.none=Keine B\u00e4nde gefunden.
|
|||
publications.ui.series.volumes.remove=Band entfernen.
|
||||
publications.ui.series.volumes.remove.confirm=Diesen Band wirklich entfernen?
|
||||
publications.ui.series.volumes.volume_of_series=Band der Serie
|
||||
sciauthor.ui.edit_basic_properties=Basiseigenschaften
|
||||
sciauthor.ui.edit_basic_properties=Basiseigenschaften bearbeiten
|
||||
publications.ui.inproceedings.pages_to=Seiten von
|
||||
publications.ui.internetarticle.issn=ISSN
|
||||
publications.ui.internetarticle.publication_date=Publikationsdatum
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ object type SciProject extends GenericOrganizationalUnit {
|
|||
String[0..1] projectShortDesc = ct_sciorga_projects.shortdesc VARCHAR(500);
|
||||
String[0..1] projectDescription = ct_sciorga_projects.description CLOB;
|
||||
String[0..1] funding = ct_sciorga_projects.funding CLOB;
|
||||
String[0..1] fundingVolume = ct_sciorga_projects.funding_volume VARCHAR(128);
|
||||
|
||||
reference key ( ct_sciorga_projects.project_id );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
</jsp:declaration>
|
||||
|
||||
<define:page name="itemPage" application="content-section"
|
||||
title="APLAWS" cache="true">
|
||||
title="APLAWS" cache="false">
|
||||
|
||||
<define:component name="categoryPath"
|
||||
classname="com.arsdigita.london.navigation.ui.category.Path"/>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
</jsp:declaration>
|
||||
|
||||
<define:page name="itemPage" application="content-section"
|
||||
title="APLAWS" cache="true">
|
||||
title="APLAWS" cache="false">
|
||||
|
||||
<define:component name="categoryPath"
|
||||
classname="com.arsdigita.london.navigation.ui.category.Path"/>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
</jsp:declaration>
|
||||
|
||||
<define:page name="itemPage" application="content-section"
|
||||
title="APLAWS" cache="true">
|
||||
title="APLAWS" cache="false">
|
||||
|
||||
<define:component name="categoryPath"
|
||||
classname="com.arsdigita.london.navigation.ui.category.Path"/>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
<xrd:property name="/object/contacts"/>
|
||||
<xrd:property name="/object/contacts/contactentries"/>
|
||||
<xrd:property name="/object/contacts/address"/>
|
||||
<xrd:property name="/object/organizationalunit"/>
|
||||
</xrd:associations>
|
||||
|
||||
</xrd:adapter>
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ public class SciOrganizationConfig extends AbstractConfig {
|
|||
private final Parameter m_projectDescriptionDhtml;
|
||||
private final Parameter m_projectFundingHide;
|
||||
private final Parameter m_projectFundingDhtml;
|
||||
private final Parameter m_projectFundingVolumeHide;
|
||||
private final Parameter m_projectMaterialsHide;
|
||||
private final Parameter m_projectMembersAllInOne;
|
||||
private final Parameter m_projectMembersMerge;
|
||||
|
|
@ -148,6 +149,10 @@ public class SciOrganizationConfig extends AbstractConfig {
|
|||
"com.arsdigita.cms.contenttypes.sciproject.funding_dhtml",
|
||||
Parameter.REQUIRED,
|
||||
Boolean.FALSE);
|
||||
m_projectFundingVolumeHide = new BooleanParameter(
|
||||
"com.arsdigita.cms.contenttypes.sciproject.funding_volume_hide",
|
||||
Parameter.REQUIRED,
|
||||
Boolean.FALSE);
|
||||
m_projectMaterialsHide = new BooleanParameter(
|
||||
"com.arsdigita.cms.contenttypes.sciproject.materials_hide",
|
||||
Parameter.REQUIRED,
|
||||
|
|
@ -192,6 +197,7 @@ public class SciOrganizationConfig extends AbstractConfig {
|
|||
register(m_projectAddContactHide);
|
||||
|
||||
register(m_projectFundingHide);
|
||||
register(m_projectFundingVolumeHide);
|
||||
register(m_projectFundingDhtml);
|
||||
register(m_projectMaterialsHide);
|
||||
|
||||
|
|
@ -305,6 +311,10 @@ public class SciOrganizationConfig extends AbstractConfig {
|
|||
return (Boolean) get(m_projectFundingDhtml);
|
||||
}
|
||||
|
||||
public final boolean getProjectFundingVolumeHide() {
|
||||
return (Boolean) get(m_projectFundingVolumeHide);
|
||||
}
|
||||
|
||||
public final boolean getProjectMaterialsHide() {
|
||||
return (Boolean) get(m_projectMaterialsHide);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ com.arsdigita.cms.contenttypes.scidepartment.set_organization_hide.format = [boo
|
|||
|
||||
com.arsdigita.cms.contenttypes.scidepartment.set_superdepartment_hide.title = Hide the superdepartment set step of SciDepartment
|
||||
com.arsdigita.cms.contenttypes.scidepartment.set_superdepartment_hide.purpose = Hide the superdepartment set step of SciDepartment
|
||||
com.arsdigita.cms.contenttypes.scidepartment.set_superdepartment_hide.example = true
|
||||
com.arsdigita.cms.contenttypes.scidepartment.set_superdepartment_hide.example = false
|
||||
com.arsdigita.cms.contenttypes.scidepartment.set_superdepartment_hide.format = [boolean]
|
||||
|
||||
com.arsdigita.cms.contenttypes.scidepartment.add_contact_hide.title = Hide the contact add step of Scidepartment
|
||||
|
|
@ -109,10 +109,15 @@ com.arsdigita.cms.contenttypes.sciproject.add_contact_hide.example = false
|
|||
com.arsdigita.cms.contenttypes.sciproject.add_contact_hide.format = [boolean]
|
||||
|
||||
com.arsdigita.cms.contenttypes.sciproject.funding_hide.title = Hide funding text input
|
||||
com.arsdigita.cms.contenttypes.sciproject.funding_hide.purpose = Hide the funding text inpu
|
||||
com.arsdigita.cms.contenttypes.sciproject.funding_hide.example = true
|
||||
com.arsdigita.cms.contenttypes.sciproject.funding_hide.purpose = Hide the funding text input
|
||||
com.arsdigita.cms.contenttypes.sciproject.funding_hide.example = false
|
||||
com.arsdigita.cms.contenttypes.sciproject.funding_hide.format = [boolean]
|
||||
|
||||
com.arsdigita.cms.contenttypes.sciproject.funding_volume_hide.title = Hide funding_volume text input
|
||||
com.arsdigita.cms.contenttypes.sciproject.funding_volume_hide.purpose = Hide the funding_volume text input
|
||||
com.arsdigita.cms.contenttypes.sciproject.funding_volume_hide.example = true
|
||||
com.arsdigita.cms.contenttypes.sciproject.funding_volume_hide.format = [boolean]
|
||||
|
||||
com.arsdigita.cms.contenttypes.sciproject.funding_dhtml.title = Toggles the DHTML editor for funding
|
||||
com.arsdigita.cms.contenttypes.sciproject.funding_dhtml.purpose = Toggles the DHTML editor for funding
|
||||
com.arsdigita.cms.contenttypes.sciproject.funding_dhtml.example = false
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ import org.apache.log4j.Logger;
|
|||
* <dd>A description of the project/<dd>
|
||||
* <dt><code>funding</code><dt>
|
||||
* <dd>A text about the funding of the project</dd>
|
||||
* <dt><code>fundingVolume</code></dt>
|
||||
* <dd><code>Volume of the funding</code></dt>
|
||||
* </dl>
|
||||
* <p>
|
||||
* Also, the class has some methods the access the associations defined by
|
||||
|
|
@ -70,6 +72,7 @@ public class SciProject extends GenericOrganizationalUnit {
|
|||
public static final String PROJECT_SHORT_DESCRIPTION = "projectShortDesc";
|
||||
public static final String PROJECT_DESCRIPTION = "projectDescription";
|
||||
public static final String FUNDING = "funding";
|
||||
public static final String FUNDING_VOLUME = "fundingVolume";
|
||||
public static final String SUBPROJECTS = "subProjects";
|
||||
public static final String SUBPROJECT_ORDER = "subProjectOrder";
|
||||
public static final String ORGANIZATIONS = "organization";
|
||||
|
|
@ -109,7 +112,7 @@ public class SciProject extends GenericOrganizationalUnit {
|
|||
super(type);
|
||||
}
|
||||
|
||||
public static final SciOrganizationConfig getConfig() {
|
||||
public static SciOrganizationConfig getConfig() {
|
||||
return s_config;
|
||||
}
|
||||
|
||||
|
|
@ -153,6 +156,14 @@ public class SciProject extends GenericOrganizationalUnit {
|
|||
set(FUNDING, funding);
|
||||
}
|
||||
|
||||
public String getFundingVolume() {
|
||||
return (String) get(FUNDING_VOLUME);
|
||||
}
|
||||
|
||||
public void setFundingVolume(String fundingVolume) {
|
||||
set(FUNDING_VOLUME, fundingVolume);
|
||||
}
|
||||
|
||||
public SciProjectSubProjectsCollection getSubProjects() {
|
||||
return new SciProjectSubProjectsCollection(
|
||||
(DataCollection) get(SUBPROJECTS));
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ public class SciDepartmentPanel extends SciOrganizationBasePanel {
|
|||
final PageState state) {
|
||||
SciDepartmentSubDepartmentsCollection subDepartments;
|
||||
subDepartments = department.getSubDepartments();
|
||||
subDepartments.addOrder("departmentOrder asc");
|
||||
subDepartments.addOrder("link.subDepartmentOrder asc");
|
||||
|
||||
long pageNumber = getPageNumber(state);
|
||||
|
||||
|
|
@ -144,23 +144,24 @@ public class SciDepartmentPanel extends SciOrganizationBasePanel {
|
|||
long end = getPaginatorEnd(begin, count);
|
||||
pageNumber = normalizePageNumber(pageCount, pageNumber);
|
||||
|
||||
subDepartments.setRange((int) begin, (int) end);
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin, end, count);
|
||||
parent, pageNumber, pageCount, begin, end, count, subDepartments.
|
||||
size());
|
||||
subDepartments.setRange((int) begin, (int) end);
|
||||
|
||||
while (subDepartments.next()) {
|
||||
SciDepartment subDepartment;
|
||||
subDepartment = subDepartments.getSubDepartment();
|
||||
|
||||
Element subDepartmentElem = subDepartmentsElem.newChildElement(
|
||||
"subDepartment");
|
||||
"department");
|
||||
subDepartmentElem.addAttribute("order", Integer.toString(subDepartments.
|
||||
getSubDepartmentOrder()));
|
||||
subDepartmentElem.addAttribute("oid", subDepartment.getOID().
|
||||
toString());
|
||||
|
||||
Element title = subDepartmentElem.newChildElement("title");
|
||||
title.setText(department.getTitle());
|
||||
title.setText(subDepartment.getTitle());
|
||||
|
||||
if ((subDepartment.getAddendum() != null)
|
||||
&& !(subDepartment.getAddendum().isEmpty())) {
|
||||
|
|
@ -177,7 +178,7 @@ public class SciDepartmentPanel extends SciOrganizationBasePanel {
|
|||
|
||||
GenericOrganizationalUnitPersonCollection heads;
|
||||
heads = subDepartment.getPersons();
|
||||
heads.addFilter(("role_name = 'head'"));
|
||||
heads.addFilter(("link.role_name = 'head'"));
|
||||
heads.addOrder("surname asc, givenname asc");
|
||||
|
||||
if (heads.size() > 0) {
|
||||
|
|
@ -249,13 +250,13 @@ public class SciDepartmentPanel extends SciOrganizationBasePanel {
|
|||
long end = getPaginatorEnd(begin, count);
|
||||
pageNumber = normalizePageNumber(pageCount, pageNumber);
|
||||
|
||||
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin, end, count, members.
|
||||
size());
|
||||
List<MemberListItem> membersToShow = members.subList((int) begin,
|
||||
(int) end);
|
||||
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin,
|
||||
end,
|
||||
count);
|
||||
Element membersElem = parent.newChildElement("members");
|
||||
|
||||
for (MemberListItem memberItem : membersToShow) {
|
||||
|
|
@ -293,11 +294,11 @@ public class SciDepartmentPanel extends SciOrganizationBasePanel {
|
|||
long end = getPaginatorEnd(begin, count);
|
||||
pageNumber = normalizePageNumber(pageCount, pageNumber);
|
||||
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin, end, count, members.
|
||||
size());
|
||||
List<MemberListItem> membersToShow = members.subList((int) begin,
|
||||
(int) end);
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin, end,
|
||||
count);
|
||||
|
||||
for (MemberListItem memberItem : membersToShow) {
|
||||
generateMemberXML(memberItem.getMember(),
|
||||
|
|
@ -344,13 +345,13 @@ public class SciDepartmentPanel extends SciOrganizationBasePanel {
|
|||
long end = getPaginatorEnd(begin, count);
|
||||
pageNumber = normalizePageNumber(pageCount, pageNumber);
|
||||
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin, end, count, projects.
|
||||
size());
|
||||
List<SciProject> projectsToShow = projects.subList((int) begin,
|
||||
(int) end);
|
||||
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin,
|
||||
end,
|
||||
count);
|
||||
|
||||
|
||||
Element projectsElem = parent.newChildElement("projects");
|
||||
for (SciProject project : projectsToShow) {
|
||||
|
|
@ -382,14 +383,12 @@ public class SciDepartmentPanel extends SciOrganizationBasePanel {
|
|||
long end = getPaginatorEnd(begin, count);
|
||||
pageNumber = normalizePageNumber(pageCount, pageNumber);
|
||||
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin, end, count, projects.
|
||||
size());
|
||||
List<SciProject> projectsToShow = projects.subList((int) begin,
|
||||
(int) end);
|
||||
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin,
|
||||
end,
|
||||
count);
|
||||
|
||||
Element projectsElem = parent.newChildElement("projects");
|
||||
for (SciProject project : projectsToShow) {
|
||||
generateProjectXML(project, projectsElem, state);
|
||||
|
|
@ -480,6 +479,8 @@ public class SciDepartmentPanel extends SciOrganizationBasePanel {
|
|||
} else if (SHOW_PROJECTS_FINISHED.equals(show)) {
|
||||
generateProjectsXML(department, content, state,
|
||||
getFiltersForFinishedProjects());
|
||||
} else if (SHOW_SUBDEPARTMENTS.equals(show)) {
|
||||
generateSubDepartmentsXML(department, content, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -145,30 +145,32 @@ public abstract class SciOrganizationBasePanel
|
|||
protected class SciProjectComparator implements Comparator<SciProject> {
|
||||
|
||||
public int compare(SciProject project1, SciProject project2) {
|
||||
int result = 0;
|
||||
/*int result = 0;
|
||||
|
||||
if (project1.getBegin() == null) {
|
||||
return -1;
|
||||
return -1;
|
||||
} else if (project2.getBegin() == null) {
|
||||
return 1;
|
||||
return 1;
|
||||
} else {
|
||||
result = project1.getBegin().compareTo(project2.getBegin());
|
||||
result = project1.getBegin().compareTo(project2.getBegin());
|
||||
}
|
||||
|
||||
if (result == 0) {
|
||||
if (project1.getEnd() == null) {
|
||||
return -1;
|
||||
} else if (project2.getEnd() == null) {
|
||||
return 1;
|
||||
} else if ((project1.getEnd() == null) && (project2.getEnd()
|
||||
== null)) {
|
||||
return 0;
|
||||
} else {
|
||||
result = project1.getEnd().compareTo(project2.getEnd());
|
||||
}
|
||||
if (project1.getEnd() == null) {
|
||||
return -1;
|
||||
} else if (project2.getEnd() == null) {
|
||||
return 1;
|
||||
} else if ((project1.getEnd() == null) && (project2.getEnd()
|
||||
== null)) {
|
||||
return 0;
|
||||
} else {
|
||||
result = project1.getEnd().compareTo(project2.getEnd());
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
return result;*/
|
||||
|
||||
return project1.getTitle().compareTo(project2.getTitle());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -283,7 +285,11 @@ public abstract class SciOrganizationBasePanel
|
|||
final String roleName,
|
||||
final String status,
|
||||
final List<MemberListItem> members) {
|
||||
members.add(new MemberListItem(person, roleName, status));
|
||||
MemberListItem listItem = new MemberListItem(person, roleName, status);
|
||||
|
||||
if (!members.contains(listItem)) {
|
||||
members.add(listItem);
|
||||
}
|
||||
}
|
||||
|
||||
protected void mergeMembers(
|
||||
|
|
@ -332,14 +338,13 @@ public abstract class SciOrganizationBasePanel
|
|||
long end = getPaginatorEnd(begin, count);
|
||||
pageNumber = normalizePageNumber(pageCount, pageNumber);
|
||||
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin, end, count, membersWithoutDoubles.
|
||||
size());
|
||||
List<MemberListItem> membersWithoutDoublesToShow = membersWithoutDoubles.
|
||||
subList((int) begin,
|
||||
(int) end);
|
||||
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin,
|
||||
end,
|
||||
count);
|
||||
Element membersWithoutDoublesElem = parent.newChildElement(
|
||||
"members");
|
||||
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ public class SciOrganizationPanel extends SciOrganizationBasePanel {
|
|||
final PageState state) {
|
||||
SciOrganizationDepartmentsCollection departments;
|
||||
departments = orga.getDepartments();
|
||||
departments.addOrder("departmentOrder asc");
|
||||
departments.addOrder("link.departmentOrder asc");
|
||||
|
||||
long pageNumber = getPageNumber(state);
|
||||
|
||||
|
|
@ -226,9 +226,10 @@ public class SciOrganizationPanel extends SciOrganizationBasePanel {
|
|||
long end = getPaginatorEnd(begin, count);
|
||||
pageNumber = normalizePageNumber(pageCount, pageNumber);
|
||||
|
||||
departments.setRange((int) begin, (int) end);
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin, end, count);
|
||||
parent, pageNumber, pageCount, begin, end, count, departments.
|
||||
size());
|
||||
departments.setRange((int) begin, (int) end);
|
||||
|
||||
while (departments.next()) {
|
||||
SciDepartment department;
|
||||
|
|
@ -258,7 +259,7 @@ public class SciOrganizationPanel extends SciOrganizationBasePanel {
|
|||
|
||||
GenericOrganizationalUnitPersonCollection heads;
|
||||
heads = department.getPersons();
|
||||
heads.addFilter("role_name = 'head'");
|
||||
heads.addFilter("link.role_name = 'head'");
|
||||
heads.addOrder("surname asc, givenname asc");
|
||||
|
||||
if (heads.size() > 0) {
|
||||
|
|
@ -356,7 +357,7 @@ public class SciOrganizationPanel extends SciOrganizationBasePanel {
|
|||
} else {
|
||||
GenericOrganizationalUnitPersonCollection orgaMembers;
|
||||
orgaMembers = orga.getPersons();
|
||||
for(String filter : filters) {
|
||||
for (String filter : filters) {
|
||||
orgaMembers.addFilter(filter);
|
||||
}
|
||||
List<MemberListItem> members = new LinkedList<MemberListItem>();
|
||||
|
|
@ -442,17 +443,15 @@ public class SciOrganizationPanel extends SciOrganizationBasePanel {
|
|||
long end = getPaginatorEnd(begin, count);
|
||||
pageNumber = normalizePageNumber(pageCount, pageNumber);
|
||||
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin, end, count, projectsWithoutDoubles.
|
||||
size());
|
||||
List<SciProject> projectsWithoutDoublesToShow = projectsWithoutDoubles.
|
||||
subList((int) begin,
|
||||
(int) end);
|
||||
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin,
|
||||
end,
|
||||
count);
|
||||
|
||||
Element projectsWithoutDoublesElem = parent.newChildElement(
|
||||
"projectsWithoutDoubles");
|
||||
"projects");
|
||||
for (SciProject project : projectsWithoutDoublesToShow) {
|
||||
generateProjectXML(project, projectsWithoutDoublesElem, state);
|
||||
}
|
||||
|
|
@ -482,14 +481,12 @@ public class SciOrganizationPanel extends SciOrganizationBasePanel {
|
|||
long end = getPaginatorEnd(begin, count);
|
||||
pageNumber = normalizePageNumber(pageCount, pageNumber);
|
||||
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin, end, count, projects.
|
||||
size());
|
||||
List<SciProject> projectsToShow = projects.subList((int) begin,
|
||||
(int) end);
|
||||
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin,
|
||||
end,
|
||||
count);
|
||||
|
||||
Element projectsElem = parent.newChildElement("projects");
|
||||
for (SciProject project : projectsToShow) {
|
||||
generateProjectXML(project, projectsElem, state);
|
||||
|
|
@ -502,7 +499,7 @@ public class SciOrganizationPanel extends SciOrganizationBasePanel {
|
|||
Element element,
|
||||
PageState state) {
|
||||
Element content = generateBaseXML(item, element, state);
|
||||
|
||||
|
||||
Element availableData = content.newChildElement("availableData");
|
||||
|
||||
SciOrganization orga = (SciOrganization) item;
|
||||
|
|
@ -578,7 +575,7 @@ public class SciOrganizationPanel extends SciOrganizationBasePanel {
|
|||
} else if (SHOW_PROJECTS_ONGOING.equals(show)) {
|
||||
generateProjectsXML(
|
||||
orga, content, state, getFiltersForOngoingProjects());
|
||||
} else if (SHOW_PROJECTS_FINISHED.equals(show)) {
|
||||
} else if (SHOW_PROJECTS_FINISHED.equals(show)) {
|
||||
generateProjectsXML(
|
||||
orga, content, state, getFiltersForFinishedProjects());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,3 +138,4 @@ sciorganization.ui.department.publications=Publications of the department
|
|||
sciorganizations.ui.department.title=Name of the department
|
||||
sciorganizations.ui.organization.title=Name of the organization
|
||||
sciorganizations.ui.project.title=Name of the project
|
||||
sciorganization.ui.project.funding_volume=Volume of funding
|
||||
|
|
|
|||
|
|
@ -138,3 +138,4 @@ sciorganization.ui.department.publications=Publikationen der Abteilung
|
|||
sciorganizations.ui.department.title=Bezeichnung der Abteilung
|
||||
sciorganizations.ui.organization.title=Name der Organisation
|
||||
sciorganizations.ui.project.title=Name des Projektes
|
||||
sciorganization.ui.project.funding_volume=Volumen der Finanzierung
|
||||
|
|
|
|||
|
|
@ -27,7 +27,9 @@ import com.arsdigita.bebop.event.FormInitListener;
|
|||
import com.arsdigita.bebop.event.FormProcessListener;
|
||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||
import com.arsdigita.bebop.form.TextArea;
|
||||
import com.arsdigita.bebop.form.TextField;
|
||||
import com.arsdigita.bebop.parameters.ParameterModel;
|
||||
import com.arsdigita.bebop.parameters.StringInRangeValidationListener;
|
||||
import com.arsdigita.bebop.parameters.StringParameter;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.SciProject;
|
||||
|
|
@ -79,6 +81,16 @@ public class SciProjectDescriptionEditForm
|
|||
funding.setRows(8);
|
||||
add(funding);
|
||||
}
|
||||
|
||||
if (!SciProject.getConfig().getProjectFundingVolumeHide()) {
|
||||
add(new Label(SciOrganizationGlobalizationUtil.globalize(
|
||||
"sciorganization.ui.project.funding_volume")));
|
||||
ParameterModel fundingVolumeParam = new StringParameter(SciProject.FUNDING_VOLUME);
|
||||
TextField fundingVolume = new TextField(fundingVolumeParam);
|
||||
fundingVolume.addValidationListener(new StringInRangeValidationListener(
|
||||
0, 128));
|
||||
add(fundingVolume);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -95,6 +107,10 @@ public class SciProjectDescriptionEditForm
|
|||
data.put(SciProject.FUNDING, project.getFunding());
|
||||
}
|
||||
|
||||
if (!SciProject.getConfig().getProjectFundingVolumeHide()) {
|
||||
data.put(SciProject.FUNDING_VOLUME, project.getFundingVolume());
|
||||
}
|
||||
|
||||
setVisible(state, true);
|
||||
}
|
||||
|
||||
|
|
@ -114,6 +130,10 @@ public class SciProjectDescriptionEditForm
|
|||
project.setFunding((String) data.get(
|
||||
SciProject.FUNDING));
|
||||
}
|
||||
if (!SciProject.getConfig().getProjectFundingVolumeHide()) {
|
||||
project.setFundingVolume((String) data.get(
|
||||
SciProject.FUNDING_VOLUME));
|
||||
}
|
||||
|
||||
project.save();
|
||||
|
||||
|
|
|
|||
|
|
@ -78,9 +78,16 @@ public class SciProjectDescriptionStep extends SimpleEditStep {
|
|||
sheet.add(SciOrganizationGlobalizationUtil.globalize(
|
||||
"sciorganization.ui.project.desc"),
|
||||
SciProject.PROJECT_DESCRIPTION);
|
||||
sheet.add(SciOrganizationGlobalizationUtil.globalize(
|
||||
"sciorganization.ui.project.funding"),
|
||||
SciProject.FUNDING);
|
||||
if (!SciProject.getConfig().getProjectFundingHide()) {
|
||||
sheet.add(SciOrganizationGlobalizationUtil.globalize(
|
||||
"sciorganization.ui.project.funding"),
|
||||
SciProject.FUNDING);
|
||||
}
|
||||
if (!SciProject.getConfig().getProjectFundingVolumeHide()) {
|
||||
sheet.add(SciOrganizationGlobalizationUtil.globalize(
|
||||
"sciorganization.ui.project.funding_volume"),
|
||||
SciProject.FUNDING_VOLUME);
|
||||
}
|
||||
|
||||
return sheet;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class SciProjectPanel extends SciOrganizationBasePanel {
|
|||
if (project.getPersons() != null) {
|
||||
GenericOrganizationalUnitPersonCollection persons;
|
||||
persons = project.getPersons();
|
||||
for(String filter : filters) {
|
||||
for (String filter : filters) {
|
||||
persons.addFilter(filter);
|
||||
}
|
||||
if (persons.size() > 0) {
|
||||
|
|
@ -92,10 +92,10 @@ public class SciProjectPanel extends SciOrganizationBasePanel {
|
|||
protected boolean hasSubProjects(final SciProject project,
|
||||
final List<String> filters) {
|
||||
if (project.getSubProjects() != null) {
|
||||
|
||||
|
||||
SciProjectSubProjectsCollection subProjects;
|
||||
subProjects = project.getSubProjects();
|
||||
for(String filter : filters) {
|
||||
for (String filter : filters) {
|
||||
subProjects.addFilter(filter);
|
||||
}
|
||||
if (subProjects.size() > 0) {
|
||||
|
|
@ -111,7 +111,7 @@ public class SciProjectPanel extends SciOrganizationBasePanel {
|
|||
final List<String> filters) {
|
||||
SciProjectSubProjectsCollection subProjects;
|
||||
subProjects = project.getSubProjects();
|
||||
for(String filter : filters) {
|
||||
for (String filter : filters) {
|
||||
subProjects.addFilter(filter);
|
||||
}
|
||||
subProjects.addOrder("begin desc, end desc");
|
||||
|
|
@ -126,8 +126,10 @@ public class SciProjectPanel extends SciOrganizationBasePanel {
|
|||
long end = getPaginatorEnd(begin, count);
|
||||
pageNumber = normalizePageNumber(pageCount, pageNumber);
|
||||
|
||||
createPaginatorElement(parent, pageNumber, pageCount, begin, end, count, subProjects.
|
||||
size());
|
||||
subProjects.setRange((int) begin, (int) end);
|
||||
createPaginatorElement(parent, pageNumber, pageCount, begin, end, count);
|
||||
|
||||
|
||||
while (subProjects.next()) {
|
||||
SciProject subProject;
|
||||
|
|
@ -225,7 +227,7 @@ public class SciProjectPanel extends SciOrganizationBasePanel {
|
|||
if (hasMembers(project, getFiltersForActiveMembers())) {
|
||||
availableData.newChildElement("activeMembers");
|
||||
}
|
||||
if (hasMembers(project,getFiltersForAssociatedMembers())) {
|
||||
if (hasMembers(project, getFiltersForAssociatedMembers())) {
|
||||
availableData.newChildElement("associatedMembers");
|
||||
}
|
||||
if (hasMembers(project, getFiltersForFormerMembers())) {
|
||||
|
|
@ -235,7 +237,7 @@ public class SciProjectPanel extends SciOrganizationBasePanel {
|
|||
|
||||
String show = getShowParam(state);
|
||||
|
||||
if (SHOW_DESCRIPTION.equals(show)) {
|
||||
if (SHOW_DESCRIPTION.equals(show)) {
|
||||
Element description = content.newChildElement("description");
|
||||
description.setText(project.getProjectDescription());
|
||||
|
||||
|
|
@ -244,11 +246,14 @@ public class SciProjectPanel extends SciOrganizationBasePanel {
|
|||
} else if (SHOW_CONTACTS.equals(show)) {
|
||||
generateContactsXML(project, content, state);
|
||||
} else if (SHOW_SUBPROJECTS.equals(show)) {
|
||||
generateSubProjectsXML(project, content, state, new LinkedList<String>());
|
||||
generateSubProjectsXML(project, content, state,
|
||||
new LinkedList<String>());
|
||||
} else if (SHOW_SUBPROJECTS_ONGOING.equals(show)) {
|
||||
generateSubProjectsXML(project, content, state, getFiltersForOngoingProjects());
|
||||
generateSubProjectsXML(project, content, state,
|
||||
getFiltersForOngoingProjects());
|
||||
} else if (SHOW_SUBPROJECTS_FINISHED.equals(show)) {
|
||||
generateSubProjectsXML(project, content, state, getFiltersForFinishedProjects());
|
||||
generateSubProjectsXML(project, content, state,
|
||||
getFiltersForFinishedProjects());
|
||||
} else if (SHOW_MEMBERS.equals(show)) {
|
||||
generateMembersXML(project, content, state, true, true, true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@
|
|||
}
|
||||
</jsp:scriptlet>
|
||||
|
||||
<define:page name="publications"
|
||||
<define:page name="person"
|
||||
application="content"
|
||||
title="Publications4Homepages"
|
||||
cache="true">
|
||||
title="person4Homepages"
|
||||
cache="false">
|
||||
|
||||
<define:component name="personList"
|
||||
classname="com.arsdigita.london.navigation.ui.object.ComplexObjectList"/>
|
||||
|
|
@ -32,14 +32,15 @@
|
|||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) personList).getDefinition().setObjectType("com.arsdigita.cms.contenttypes.GenericPerson");
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) personList).getRenderer().setSpecializeObjects(true);
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) personList).getDefinition().setDescendCategories(true);
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) personList).getDefinition().setExcludeIndexObjects(false);
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) personList).getDefinition().setFilterCategory(false);
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) personList).getRenderer().setPageSize(99999);
|
||||
if((request.getParameterMap().get("DaBInId") != null) && (((String[])request.getParameterMap().get("DaBInId")).length > 0)) {
|
||||
String[] params = (String[]) request.getParameterMap().get("DaBInId");
|
||||
String dabinid = params[0];
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) personList).setSQLFilter(String.format("pageDescription LIKE '%%DaBInId={%s}%%'", dabinid));
|
||||
|
||||
}
|
||||
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) personList).getRenderer().setPageSize(99999);
|
||||
</jsp:scriptlet>
|
||||
</define:page>
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<define:page name="publications"
|
||||
application="content"
|
||||
title="Publications4Homepages"
|
||||
cache="true">
|
||||
cache="false">
|
||||
|
||||
<define:component name="projectList"
|
||||
classname="com.arsdigita.london.navigation.ui.object.ComplexObjectList"/>
|
||||
|
|
@ -32,6 +32,9 @@
|
|||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) projectList).getDefinition().setObjectType("com.arsdigita.cms.contenttypes.SciProject");
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) projectList).getRenderer().setSpecializeObjects(true);
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) projectList).getDefinition().setDescendCategories(true);
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) projectList).getDefinition().setExcludeIndexObjects(false);
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) projectList).getDefinition().setFilterCategory(false);
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) projectList).getRenderer().setSpecializeObjectsContext("sciProjectList");
|
||||
if((request.getParameterMap().get("DaBInId") != null) && (((String[])request.getParameterMap().get("DaBInId")).length > 0)) {
|
||||
String[] params = (String[]) request.getParameterMap().get("DaBInId");
|
||||
String dabinid = params[0];
|
||||
|
|
|
|||
|
|
@ -32,10 +32,12 @@
|
|||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) publicationList).getDefinition().setObjectType("com.arsdigita.cms.contenttypes.Publication");
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) publicationList).getRenderer().setSpecializeObjects(true);
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) publicationList).getDefinition().setDescendCategories(true);
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) publicationList).getDefinition().setExcludeIndexObjects(false);
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) publicationList).getDefinition().setFilterCategory(false);
|
||||
if((request.getParameterMap().get("DaBInId") != null) && (((String[])request.getParameterMap().get("DaBInId")).length > 0)) {
|
||||
String[] params = (String[]) request.getParameterMap().get("DaBInId");
|
||||
String dabinid = params[0];
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) publicationList).setSQLFilter(String.format("authors.pageDescription LIKE '%%DaBInId={%s%%'", dabinid));
|
||||
((com.arsdigita.london.navigation.ui.object.ComplexObjectList) publicationList).setSQLFilter(String.format("authors.pageDescription LIKE '%%DaBInId={%s}%%'", dabinid));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
</jsp:scriptlet>
|
||||
|
||||
<define:page name="defaultItemPage" application="navigation"
|
||||
title="Navigation" cache="true">
|
||||
title="Navigation" cache="false">
|
||||
|
||||
<define:component name="greetingItem"
|
||||
classname="com.arsdigita.london.navigation.ui.GreetingItem"/>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
</jsp:scriptlet>
|
||||
|
||||
<define:page name="defaultItemPage" application="navigation"
|
||||
title="Navigation" cache="true">
|
||||
title="Navigation" cache="false">
|
||||
|
||||
<define:component name="greetingItem"
|
||||
classname="com.arsdigita.london.navigation.ui.GreetingItem"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue