Thanks!
Following your suggestion we have to implement theese steps:
1) create in share-config-custom.xml a new form for "custom:documentci" type,
with modifiable and read-only fields as we need (ok, we know how to do it)
2) add a new custom action "Edit Metadata" in the right-side list of actions in the document details view (ok).
The new action will be displayed depending on the value of document property "custom:state".
We can define new 'evaluators' in the file:
\alfresco\WEB-INF\classes\alfresco\templates\webscripts\org\alfresco\slingshot\documentlibrary\evaluator.lib.js
if ( node.properties["custom:state"]=="Approved" ) {
permissions["edit-approved"] = true;
} else {
permissions["edit-notapproved"] = true;
}
and modify the file
\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\document-details\repo-document-actions.get.config.xml
adding the new "Edit Metadata" action that will open the new form, and changing the permission of out-of-the-box "Edit Metadata" action:
<actionSet id="document">
…..
<action type="simple-link" id="onActionDetails" permission="edit-properties,edit-notapproved" href="{editMetadataUrl}"
label="actions.document.edit-metadata" />
<action type="simple-link" id="onActionDetails" permission="edit-properties,edit-approved" href="????????"
label="actions.document.edit-metadata" />
</actionSet>
>>> We don't know how to call the new form when the user clicks the new custom "Edit Matadata" action.
Could you please help us with this point?