Hi all,
My problem with the button is almost resolute.
With this source, i can to hide the button "New Document" when there is no
document type available for creation :
---actions-contrib.xml---
<action id="newDocument" link="select_document_type"
enabled="true" label="action.test" icon="/icons/action_add.gif">
<category>SUBVIEW_UPPER_LIST</category>
<filter id="newEtat">
<rule grant="false">
<type>label.etat</type>
</rule>
</filter>
<filter id="newBiblio">
<rule grant="false">
<type>label.biblio.folder</type>
</rule>
</filter>
<filter id="newTexte">
<rule grant="false">
<type>label.texte.folder</type>
</rule>
</filter>
</action>
But now, the button "New Document" is duplicate and I do not find resolution
for this.
How can i do that ??
Thx
2008/3/17, Florent Guillaume <[EMAIL PROTECTED]>:
>
> On 14 Mar 2008, at 12:16, Daniel CERQUEIRA wrote:
> > 1) I would like to know how to hide the button " New Document " when
> > there is no document type available for creation ?
> > With " Import a file" :
> > <extension target="org.nuxeo.ecm.platform.actions.ActionService"
> > point="actions">
> > <!-- Enleve le bouton importer -->
> > <action id="newFile" link="create_file" enabled="false"
> > label="action.new.file" icon="/icons/action_add_file.gif">
> > </action>
> > </extension>
>
>
> If you want to hide the button only when there are no document types,
> then you will have to associate your action with a filter that calls a
> method deciding if the button is displayed or not. Something like:
>
> <filter id="some_documents_createable">
> <rule grant="true">
> <condition>#{yourSeamComponent.yourMethod}</condition>
> </rule>
> </filter>
>
> And the method yourMethod will have to check what can be created, by
> checking the length of typesTool.getTypesList().
>
>
> > 2) And I would like to know how to recover the "labels" of the
> > message's table to link for a create document :
> > create_doc(documentManager, "Contexte",
> > root_path,"label.contexte.folder", "label.to.be.put");
> > With :
> > label.contexte.folder
> > or
> > "label.contexte.folder"
> > It doesn't work.
>
>
>
> I don't understand the question.
>
> Florent
>
>
> --
> Florent Guillaume, Director of R&D, Nuxeo
> Open Source Enterprise Content Management (ECM)
> http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87
>
>
>
>
--
CERQUEIRA Daniel
Asyres
6, 8, 10 rue Troyon
92316 Sèvres
Tel : 01.55.64.05.64
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm