...
The most basic edit configuration interrogates the underlying spatial tables for the information it requires. (e.g. to determine what attributes are associated with the entity or what spatial geometries (, point, line or polygon) , the user is allowed to create)
...
The things that you can override are the parameters that the user can edit, the maximum number of geometry items the user can create, and the required number of geometry items the user must create, and if the user can create, update and/or delete an enitity.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<?xml version="1.0" encoding="UTF-8"?> <config xmlns="urn:com.cohga.server.config#1.0" xmlns:edit="urn:com.cohga.spatial.edit#1.0"> <edit:config id="custom.edit"> <entity>graffiti</entity> <label>Grafitti</label> <description>Report graffiti for removal</description> <geometry> <point minimum="1" maximum="1"/> </geometry> <parameter id="description"> <label>Description</label> <controlType>text-area</controlType> <column>DESCRIPTION</column> </parameter> </edit:config> </config> |
...
You can selectively disable a users ability to create, update or delete entities by setting create
, update
or delete
to false in the edit config.
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:com.cohga.server.config#1.0" xmlns:edit="urn:com.cohga.spatial.edit#1.0">
<edit:config id="simple.edit">
<entity>graffiti</entity>
<label>Graffiti</label>
<description>Report graffiti for removal</description>
<update>false</update>
<delete>false</delete>
</edit:config>
</config> |
Custom attributes
If the default attribute editing setup isn't suitable you can directly specify the attributes that the user can edit and how they appear to the user.
...
Code Block |
---|
<item action="weave.edit.createNew" entity="graffiti" edit="grafitti.edit"/> |
...