Korrekturen
git-svn-id: https://svn.libreccm.org/ccm/trunk@962 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
a62873c8e9
commit
bb33575aef
|
|
@ -386,7 +386,10 @@ public class Category extends ACSObject {
|
||||||
localizationExists(locale)) {
|
localizationExists(locale)) {
|
||||||
|
|
||||||
// Return value of isEnabled from localized version, so categories could be disabled depending on locale
|
// Return value of isEnabled from localized version, so categories could be disabled depending on locale
|
||||||
return m_categoryLocalizationCollection.getName();
|
String name = m_categoryLocalizationCollection.getName();
|
||||||
|
m_categoryLocalizationCollection.rewind();
|
||||||
|
return name;
|
||||||
|
//return m_categoryLocalizationCollection.getName();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
@ -563,7 +566,10 @@ public class Category extends ACSObject {
|
||||||
localizationExists(locale)) {
|
localizationExists(locale)) {
|
||||||
|
|
||||||
// Return value of isEnabled from localized version, so categories could be disabled depending on locale
|
// Return value of isEnabled from localized version, so categories could be disabled depending on locale
|
||||||
return m_categoryLocalizationCollection.getDescription();
|
String description = m_categoryLocalizationCollection.getDescription();
|
||||||
|
m_categoryLocalizationCollection.rewind();
|
||||||
|
return description;
|
||||||
|
//return m_categoryLocalizationCollection.getDescription();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
@ -633,7 +639,10 @@ public class Category extends ACSObject {
|
||||||
localizationExists(locale)) {
|
localizationExists(locale)) {
|
||||||
|
|
||||||
// Return value of isEnabled from localized version, so categories could be disabled depending on locale
|
// Return value of isEnabled from localized version, so categories could be disabled depending on locale
|
||||||
return m_categoryLocalizationCollection.getURL();
|
String url = m_categoryLocalizationCollection.getURL();
|
||||||
|
//return m_categoryLocalizationCollection.getURL();
|
||||||
|
m_categoryLocalizationCollection.rewind();
|
||||||
|
return url;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
@ -704,7 +713,10 @@ public class Category extends ACSObject {
|
||||||
localizationExists(locale)) {
|
localizationExists(locale)) {
|
||||||
|
|
||||||
// Return value of isEnabled from localized version, so categories could be disabled depending on locale
|
// Return value of isEnabled from localized version, so categories could be disabled depending on locale
|
||||||
return m_categoryLocalizationCollection.isEnabled();
|
boolean isEnabled = m_categoryLocalizationCollection.isEnabled();
|
||||||
|
m_categoryLocalizationCollection.rewind();
|
||||||
|
return isEnabled;
|
||||||
|
//return m_categoryLocalizationCollection.isEnabled();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@ import com.arsdigita.persistence.DataCollection;
|
||||||
**/
|
**/
|
||||||
public class CategoryLocalizationCollection extends ACSObjectCollection {
|
public class CategoryLocalizationCollection extends ACSObjectCollection {
|
||||||
|
|
||||||
|
private String lastFoundLocale;
|
||||||
|
|
||||||
public CategoryLocalizationCollection(Category category) {
|
public CategoryLocalizationCollection(Category category) {
|
||||||
super(category.getLocalizations().getDataCollection());
|
super(category.getLocalizations().getDataCollection());
|
||||||
}
|
}
|
||||||
|
|
@ -111,10 +113,11 @@ public class CategoryLocalizationCollection extends ACSObjectCollection {
|
||||||
/**
|
/**
|
||||||
* Search for the requested localization in the Collection
|
* Search for the requested localization in the Collection
|
||||||
*
|
*
|
||||||
|
* @param locale
|
||||||
* @return result of the search. If true, the CollectionCursor is set to the position of the requested locale.
|
* @return result of the search. If true, the CollectionCursor is set to the position of the requested locale.
|
||||||
*/
|
*/
|
||||||
public boolean localizationExists(String locale) {
|
public boolean localizationExists(String locale) {
|
||||||
|
|
||||||
// Really string comparison using != ??
|
// Really string comparison using != ??
|
||||||
// && !locale.isEmpty() ?
|
// && !locale.isEmpty() ?
|
||||||
if (!m_dataCollection.isEmpty() && locale != "") {
|
if (!m_dataCollection.isEmpty() && locale != "") {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class SciMemberSciDepartmentsCollection extends DomainCollection {
|
||||||
public SciMemberSciDepartmentsCollection(DataCollection dataCollection) {
|
public SciMemberSciDepartmentsCollection(DataCollection dataCollection) {
|
||||||
super(dataCollection);
|
super(dataCollection);
|
||||||
|
|
||||||
m_dataCollection.addFilter(String.format("type = %s",
|
m_dataCollection.addFilter(String.format("type = '%s'",
|
||||||
ContentType.
|
ContentType.
|
||||||
findByAssociatedObjectType(SciDepartment.class.getName()).getID().
|
findByAssociatedObjectType(SciDepartment.class.getName()).getID().
|
||||||
toString()));
|
toString()));
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class SciMemberSciOrganizationsCollection extends DomainCollection {
|
||||||
public SciMemberSciOrganizationsCollection(DataCollection dataCollection) {
|
public SciMemberSciOrganizationsCollection(DataCollection dataCollection) {
|
||||||
super(dataCollection);
|
super(dataCollection);
|
||||||
|
|
||||||
m_dataCollection.addFilter(String.format("type = %s",
|
m_dataCollection.addFilter(String.format("type = '%s'",
|
||||||
ContentType.
|
ContentType.
|
||||||
findByAssociatedObjectType(SciOrganization.class.getName()).
|
findByAssociatedObjectType(SciOrganization.class.getName()).
|
||||||
getID().toString()));
|
getID().toString()));
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class SciMemberSciProjectsCollection extends DomainCollection {
|
||||||
public SciMemberSciProjectsCollection(DataCollection dataCollection) {
|
public SciMemberSciProjectsCollection(DataCollection dataCollection) {
|
||||||
super(dataCollection);
|
super(dataCollection);
|
||||||
|
|
||||||
m_dataCollection.addFilter(String.format("type = %s",
|
m_dataCollection.addFilter(String.format("type = '%s'",
|
||||||
ContentType.
|
ContentType.
|
||||||
findByAssociatedObjectType(SciProject.class.getName()).getID().
|
findByAssociatedObjectType(SciProject.class.getName()).getID().
|
||||||
toString()));
|
toString()));
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ public class SciOrganizationPanel extends SciOrganizationBasePanel {
|
||||||
|
|
||||||
GenericOrganizationalUnitPersonCollection heads;
|
GenericOrganizationalUnitPersonCollection heads;
|
||||||
heads = department.getPersons();
|
heads = department.getPersons();
|
||||||
heads.addFilter("link.role_name = 'head'");
|
heads.addFilter("link.role_name = 'head' and link.status = 'active'");
|
||||||
heads.addOrder("surname asc, givenname asc");
|
heads.addOrder("surname asc, givenname asc");
|
||||||
|
|
||||||
if (heads.size() > 0) {
|
if (heads.size() > 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue