cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable workflow menu

junminya
Champ on-the-rise
Champ on-the-rise
Hi,

I use share repository in alfresco community 4.2.c
I wanna disable workflow menu in file details screen.(Pls confirm  attatched file.)

Can I disable it by configuration file without modify document-workflows.get.js ?

thank you!!
6 REPLIES 6

alhol
Champ in-the-making
Champ in-the-making
Quick solution:
in <em>{share_path}/WEB-INF/classes/alfresco/site-data/template-instances/document-details.xml</em> remove section

      <!– Document Workflows –>
      <component>
         <region-id>document-workflows</region-id>
         <url>/components/document-details/document-workflows</url>
         <properties>
            <nodeRef>{nodeRef}</nodeRef>
         </properties>
      </component>


But I'd recommend you to read about Spring Surf components, relations between pages, templates, components and scopes and implement your custom document-details page

junminya
Champ on-the-rise
Champ on-the-rise
Thank you! But I think it is not so good, too…Because what you say is truth.

rjohnson
Star Contributor
Star Contributor
There is a very good blog item on using extensibility to add and remove panels from the document details display by Eric Winlof at http://blogs.alfresco.com/wp/ewinlof/2011/11/09/add-remove-or-replace-components-on-shares-document-.... Use this. Don't start editing the standard files it may well work but it may also have unintended consequences and be hard to back uot.

Below is a copy of my extension which removes some panels from the document details page.


<extension>
   <modules>
      <module>
         <id>Document Details Page</id>
         <components>
         <!– Remove Tag Panel –>
         <component>
            <scope>template</scope>
            <region-id>document-tags</region-id>
            <source-id>document-details</source-id>
            <sub-components>
               <sub-component id="default">
                  <evaluations>
                     <evaluation id="farthest-gate-doc-details-layout-removeTags">
                        <render>false</render>
                     </evaluation>
                  </evaluations>
               </sub-component>
            </sub-components>
         </component>
         <!– Remove Link Panel –>
         <component>
            <scope>template</scope>
            <region-id>document-links</region-id>
            <source-id>document-details</source-id>
            <sub-components>
               <sub-component id="default">
                  <evaluations>
                     <evaluation id="farthest-gate-doc-details-layout-removeLinks">
                        <render>false</render>
                     </evaluation>
                  </evaluations>
               </sub-component>
            </sub-components>
         </component>
         <!– Remove Workflow Panel –>
         <component>
            <scope>template</scope>
            <region-id>document-workflows</region-id>
            <source-id>document-details</source-id>
            <sub-components>
               <sub-component id="default">
                  <evaluations>
                     <evaluation id="farthest-gate-doc-details-layout-removeWorkflows">
                        <render>false</render>
                     </evaluation>
                  </evaluations>
               </sub-component>
            </sub-components>
         </component>         
         <!– Remove Versions Panel –>
         <component>
            <scope>template</scope>
            <region-id>document-versions</region-id>
            <source-id>document-details</source-id>
            <sub-components>
               <sub-component id="default">
                  <evaluations>
                     <evaluation id="farthest-gate-doc-details-layout-removeVersions">
                        <render>false</render>
                     </evaluation>
                  </evaluations>
               </sub-component>
            </sub-components>
         </component>         
         <!– Remove Publishing Panel –>
         <component>
            <scope>template</scope>
            <region-id>document-publishing</region-id>
            <source-id>document-details</source-id>
            <sub-components>
               <sub-component id="default">
                  <evaluations>
                     <evaluation id="farthest-gate-doc-details-layout-removePublishing">
                        <render>false</render>
                     </evaluation>
                  </evaluations>
               </sub-component>
            </sub-components>
         </component>         
         <!– Remove the Permissions Panel –>
         <component>
            <scope>template</scope>
            <region-id>document-permissions</region-id>
            <source-id>document-details</source-id>
            <sub-components>
               <sub-component id="default">
                  <evaluations>
                     <evaluation id="farthest-gate-doc-details-layout-removePermissions">
                        <render>false</render>
                     </evaluation>
                  </evaluations>
               </sub-component>
            </sub-components>
         </component>
         </components>
      </module>
   </modules>
</extension>


This goes in /alfresco/web-extension/site-data/extensions although I deliver it in a jar along with some other extensions

junminya
Champ on-the-rise
Champ on-the-rise
thank you rjohnson. it may be so GOOD!! I am trying it now…

hello,

I know this is a old thread. But I would like to understand if these kind of configuration can be set for different users/groups. For instance, if I want to remove those panels for everyone except admins, what can I do?

thank you!

You can use the mechanisms described here http://docs.alfresco.com/5.1/tasks/dev-extensions-share-tutorials-subcomponent-evals.html and the surrounding pages to define evaluators that determine in what conditions the configuration should apply

Regards

Steven