cancel
Showing results for 
Search instead for 
Did you mean: 

Removing the default features

mialfresco
Champ in-the-making
Champ in-the-making
Hi team,
We are currently implemeting an KMS using alfresco DMS features.
For that we are required to configure the web client UI according to our requirement.
As first phase we don't want to show all the default features in Advanced search like "look in location wizard", "Show me results in the categories wizard", "more search options wizard" etc. So i want to enable these wizards. I have gone through the web-client-config.xml inside alfresco but these are not declared in that file.
And another one is after clicking the "view details" link of any document i'm seeing various boxes like "Custom View", " Links", "Multilingual Content Info" etc. As a first phase we don't want to see all the features to the users in the first time itself. So decided to disable these features. So how to do this.

Can anyone guide me in this regard.

Thanks in adnace.
17 REPLIES 17

jayjayecl
Confirmed Champ
Confirmed Champ
1/ you have to manually edit advanced-search.jsp
2/ you have to manually edit document-details.jsp

Hop this helps

mialfresco
Champ in-the-making
Champ in-the-making
Thanks Jay, this helps a lot.
I have been removed the default things which i don't want.
But in "view details" page (document-details.jsp) i'm seeing some other links like "Take ownership"…etc rather than common links like delete,checkout..etc.
So if i remove the "Action" link in the above jsp i'm losting the entire "Actions" box. Instead of that i want to remove some links in that box.
But i'm little bit confused to know where to remove. because the jsf is new to me.
Can u guide me ?

Thanks for your support.

jayjayecl
Confirmed Champ
Confirmed Champ
in document-details.jsp, just remove the whole panel :
<a:panel label="#{msg.view_links}" id="preview-panel" etc …

this will remove the whole block holding the links like "view in webdav", "view in CIFS" etc …

mialfresco
Champ in-the-making
Champ in-the-making
Hi Jay,
Thanks for your response.
Already i have done what you said to remove those links.
I removed all the links except "Actions" available in right side.
this "Actions" box contains many links like "Edit Offline","Check Out","Download","Update","Cut","Copy","Delete","TakeOwnership","Manage Content Users","Create Shortcut"…etc.

I want to remove some of these link not the entire "Actions" window.

This want i want to do now.
Can you guide me in this regard.

jayjayecl
Confirmed Champ
Confirmed Champ
All right then :

In your web-client-config-custom.xml (in tomcaT/shared/classes/alfresco/extension), add the following :


<config>
<actions>
<action-group id="doc_details_actions">
            <action idref="edit_doc_online_http" hide="true"/>
            <action idref="edit_doc_online_webdav" hide="true"/>
            <action idref="edit_doc_online_cifs" hide="true"/>
            <action idref="edit_doc_offline" hide="true"/>
</action-group>
</actions>
</config>

This will hide (for all users), these 4 actions.
If you want to know how I found those names ("doc-details-actions", "edit_doc_online_http" etc …), please have a look at
web-client-config-actions.xml, in webapp/alfresco/WEB-INF/classes/alfresco/

Does this help ?

mialfresco
Champ in-the-making
Champ in-the-making
Hi Jay,
Yes this is what i want.
Thanks for your support.
This disables the features to the admin also.
is there any way to disable the features except admin ?

jayjayecl
Confirmed Champ
Confirmed Champ
yes, the other way is the following : instead of overriding the <action-group> and hiding some actions, you have to override each action definition and change the permission evaluator.

Let's see the example of action "edit_doc_offline"
(the following config sample is from web-client-config-actions.xml)


<!– Edit document offline action –>
         <action id="edit_doc_offline">
            <permissions>
               <permission allow="true">Write</permission>
            </permissions>
            <evaluator>org.alfresco.web.action.evaluator.EditDocOfflineEvaluator</evaluator>
            <label-id>edit_doc_offline</label-id>
            <image>/images/icons/edit_offline.gif</image>
            <action-listener>#{EditOfflineDialog.setupContentAction}</action-listener>
            <params>
                <param name="id">#{actionContext.id}</param>
            </params>
         </action>

you can see that this action is visible only for users having the permission "Write", and if the evaluator EditDocOfflineEvaluator evaluates to "true".
Now you can see that you can "play" on :
- the <permission… > tag (have a look at permissionModel.xml to understand how permissions are built)
- the <evaluator… > tag to implement your own java code if you want to build a complex behaviour

Try to make the changes you want in web-client-config-custom.xml, overriding the actions you need to get changed, and tell us about the results.

hope this helps

mialfresco
Champ in-the-making
Champ in-the-making
Yeah, thanks Jay.
will try and let you know the results.
Thanks for ur time.

rama_honge
Champ in-the-making
Champ in-the-making
Hi Jay,

Is it possible to include two permissions (say Write and Execute) in the individual actions in the web-client-config-custom.xml?

below one is just an reference one:-

<!– Edit document offline action –>
         <action id="edit_doc_offline">
            <permissions>
               <permission allow="true">Write, Execute</permission>
            </permissions>
            <evaluator>org.alfresco.web.action.evaluator.EditDocOfflineEvaluator</evaluator>
            <label-id>edit_doc_offline</label-id>
            <image>/images/icons/edit_offline.gif</image>
            <action-listener>#{EditOfflineDialog.setupContentAction}</action-listener>
            <params>
                <param name="id">#{actionContext.id}</param>
            </params>
         </action>