Anlegen von Rollen für Organistationen funktioniert jetzt. Die Tabelle benötigt noch ein wenig Feinschliff.
git-svn-id: https://svn.libreccm.org/ccm/trunk@193 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
d44f00ff43
commit
2b282dcdd8
|
|
@ -62,12 +62,12 @@ data operation swapOrganizationRoleWithNextInGroup {
|
|||
}
|
||||
|
||||
query allRoleOrderForOrganization {
|
||||
Integer linkOrder;
|
||||
Integer roleOrder;
|
||||
|
||||
do {
|
||||
select r.role_order from ct_organizationroles r where r.owner_id = :ownerID
|
||||
}
|
||||
map {
|
||||
linkOrder = r.linkOrder;
|
||||
roleOrder = r.role_order;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,8 +197,8 @@ public class OrganizationRole extends ACSObject {
|
|||
}
|
||||
|
||||
DataOperation operation = getSwapOperation(operationName);
|
||||
operation.setParameter("linkOrder", new Integer(key));
|
||||
operation.setParameter("nextLinkOrder", new Integer(otherKey));
|
||||
operation.setParameter("roleOrder", new Integer(key));
|
||||
operation.setParameter("nextRoleOrder", new Integer(otherKey));
|
||||
operation.execute();
|
||||
}
|
||||
|
||||
|
|
@ -222,9 +222,9 @@ public class OrganizationRole extends ACSObject {
|
|||
return 0;
|
||||
}
|
||||
int returnOrder = 0;
|
||||
DataQuery query = SessionManager.getSession().retrieveQuery("com.arsdigita.cms.contenttypes.allRoleOrderForItem");
|
||||
DataQuery query = SessionManager.getSession().retrieveQuery("com.arsdigita.cms.contenttypes.allRoleOrderForOrganization");
|
||||
query.setParameter("ownerID", getRoleOwner().getID());
|
||||
query.addOrder("linkOrder DESC");
|
||||
query.addOrder("roleOrder DESC");
|
||||
if (query.next()) {
|
||||
Integer roleOrder = ((Integer) query.get("roleOrder"));
|
||||
query.close();
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import com.arsdigita.bebop.parameters.NotNullValidationListener;
|
|||
import com.arsdigita.bebop.util.GlobalizationUtil;
|
||||
import com.arsdigita.cms.ContentType;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.Article;
|
||||
import com.arsdigita.cms.contenttypes.GenericOrganization;
|
||||
import com.arsdigita.cms.contenttypes.OrganizationRole;
|
||||
import com.arsdigita.cms.contenttypes.Person;
|
||||
|
|
@ -127,6 +126,7 @@ public class OrganizationRolePropertyForm extends FormSection implements FormIni
|
|||
GenericOrganization orga = this.getOrganization(s);
|
||||
Assert.exists(orga);
|
||||
OrganizationRole role = new OrganizationRole();
|
||||
role.setRoleOwner(orga);
|
||||
return role;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import com.arsdigita.bebop.Component;
|
|||
import com.arsdigita.bebop.ControlLink;
|
||||
import com.arsdigita.bebop.ExternalLink;
|
||||
import com.arsdigita.bebop.Label;
|
||||
import com.arsdigita.bebop.Link;
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.RequestLocal;
|
||||
import com.arsdigita.bebop.Table;
|
||||
|
|
@ -70,6 +69,7 @@ public class OrganizationRoleTable extends Table {
|
|||
addTableActionListener(new OrganizationRoleTableActionListener());
|
||||
setRowSelectionModel(m_roleModel);
|
||||
setDefaultCellRenderer(new OrganizationRoleTableRenderer());
|
||||
setModelBuilder(new OrganizationRoleTableModelBuilder(itemModel));
|
||||
}
|
||||
|
||||
protected void addColumns() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue