Verschiedene Korrekturen zur Verbesserung der Suchergebnisse
git-svn-id: https://svn.libreccm.org/ccm/trunk@1430 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
7e11539fb6
commit
ed4b6497ac
|
|
@ -247,4 +247,9 @@ public class GenericOrganizationalUnit extends ContentPage {
|
|||
public boolean hasSubordinateOrgaUnits() {
|
||||
return !getSubordinateOrgaUnits().isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSearchSummary() {
|
||||
return String.format("%s %s", getTitle(), getAddendum());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -306,4 +306,9 @@ public class GenericPerson extends ContentPage implements
|
|||
public String getRelationAttributeKey(String propertyName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSearchSummary() {
|
||||
return getFullName();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit;
|
|||
import com.arsdigita.cms.contenttypes.ui.GenericOrgaUnitTab;
|
||||
import com.arsdigita.dispatcher.DispatcherHelper;
|
||||
import com.arsdigita.domain.DomainObjectFactory;
|
||||
import com.arsdigita.globalization.GlobalizationHelper;
|
||||
import com.arsdigita.navigation.ui.AbstractComponent;
|
||||
import com.arsdigita.persistence.OID;
|
||||
import com.arsdigita.util.UncheckedWrapperException;
|
||||
|
|
@ -60,6 +61,13 @@ public class GenericOrgaUnitTabComponent extends AbstractComponent {
|
|||
GenericOrganizationalUnit orgaunit =
|
||||
(GenericOrganizationalUnit) DomainObjectFactory.
|
||||
newInstance(orgaunitOid);
|
||||
|
||||
if (!(orgaunit.getLanguage().equals(GlobalizationHelper.
|
||||
getNegotiatedLocale().getLanguage()))) {
|
||||
orgaunit = (GenericOrganizationalUnit) orgaunit.getContentBundle().
|
||||
getInstance(GlobalizationHelper.getNegotiatedLocale());
|
||||
}
|
||||
|
||||
if ((DispatcherHelper.getDispatcherPrefix(request) == null)
|
||||
|| !DispatcherHelper.getDispatcherPrefix(request).equals("preview")) {
|
||||
orgaunit = (GenericOrganizationalUnit) orgaunit.getLiveVersion();
|
||||
|
|
@ -67,7 +75,9 @@ public class GenericOrgaUnitTabComponent extends AbstractComponent {
|
|||
|
||||
final Element contentPanelElem = new Element("cms:contentPanel",
|
||||
CMS.CMS_XML_NS);
|
||||
final Element cmsItemElem = contentPanelElem.newChildElement("cms:item", CMS.CMS_XML_NS);
|
||||
final Element cmsItemElem =
|
||||
contentPanelElem.newChildElement("cms:item",
|
||||
CMS.CMS_XML_NS);
|
||||
cmsItemElem.addAttribute("oid", orgaunitOid.toString());
|
||||
final Element objTypeElem = cmsItemElem.newChildElement("objectType");
|
||||
objTypeElem.setText(orgaunit.getClass().getName());
|
||||
|
|
|
|||
|
|
@ -318,4 +318,12 @@ public class Publication extends ContentPage {
|
|||
generators.add(new SciPublicationExtraXmlGenerator());
|
||||
return generators;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSearchSummary() {
|
||||
return String.format("%s %s %s",
|
||||
getTitle(),
|
||||
getAuthors(),
|
||||
getAbstract());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -230,4 +230,9 @@ public class SciDepartment extends GenericOrganizationalUnit {
|
|||
generators.add(new SciDepartmentExtraXmlGenerator());
|
||||
return generators;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSearchSummary() {
|
||||
return getDepartmentShortDescription();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -237,4 +237,9 @@ public class SciInstitute extends GenericOrganizationalUnit {
|
|||
generators.add(new SciInstituteExtraXmlGenerator());
|
||||
return generators;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSearchSummary() {
|
||||
return getInstituteShortDescription();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -366,4 +366,9 @@ public class SciProject extends GenericOrganizationalUnit {
|
|||
generators.add(new SciProjectExtraXmlGenerator());
|
||||
return generators;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSearchSummary() {
|
||||
return getProjectShortDescription();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue