在share-config-custom.xml中,我定义了以下内容:
<config evaluator="node-type" condition="zk:document">
<forms>
<form>
<field-visibility>
<show id="cm:name" />
<show id="cm:description" force="true" />
<show id="zk:nummer" />
<show id="zk:registratieDatum" />
<show id="zk:zaakType" />
<show id="zk:documentType" />
<show id="zk:vertrouwelijkheid" />
<show id="zk:richting" />
<show id="zk:subject" />
<show id="zk:object" />
<show id="zk:perceel" />
<show id="cm:taggable" for-mode="edit" force="true" />
</field-visibility>
<appearance>
</appearance>
</form>
</forms>
</config>
表单在“查看和编辑”(完整元数据编辑)中显示正常,但在简单编辑模式下(在docLibrary上 - >编辑元数据)我收到的字段太多了。 我只想在简单模式下显示几个字段,在完整模式下显示完整堆栈。
我怎样才能做到这一点?例如像cm:简单模式中的内容只有名称,标题和&amp;描述和完整模式下的完整堆栈。
重现这个非常简单: - 启动Alfresco - 添加内容 - 单击edit-metadata(在docLib中),您将看到一个简单的编辑表单 - 单击右上角,您将看到完整的编辑表单
我的问题: - 如何配置简单的编辑表单?
谢谢!
答案 0 :(得分:2)
查看原始共享表单config:tomcat / webapps / share / WEB-INF / classes / alfresco / share-form-config.xml
在那里,您可以看到简单元数据对话框具有单独的表单定义。除了您已定义的普通表单外,还可以使用表单id =“doclib-simple-metadata”进行设置。
<config evaluator="node-type" condition="zk:document">
<forms>
<form>.... your full form here....</form>
<form id="doclib-simple-metadata">
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<!-- tags and categories -->
<show id="cm:taggable" for-mode="edit" force="true" />
<show id="cm:categories" />
</field-visibility>
</form>
</forms>
</config>
答案 1 :(得分:1)
您需要添加另一个formid(doclib-simple-metadata):
<form id="doclib-simple-metadata">
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<!-- tags and categories -->
<show id="cm:taggable" for-mode="edit" force="true" />
<show id="cm:categories" />
</field-visibility>
<edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" />
<appearance>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="cm:description">
<control>
<control-param name="activateLinks">true</control-param>
</control>
</field>
<field id="cm:taggable">
<control>
<control-param name="compactMode">true</control-param>
<control-param name="params">aspect=cm:taggable</control-param>
<control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
<control-param name="createNewItemIcon">tag</control-param>
</control>
</field>
<field id="cm:categories">
<control>
<control-param name="compactMode">true</control-param>
</control>
</field>
</appearance>
</form>
干杯,jan(@alfrescian)