3

I wonder if it's possible to add a "recycle bin" button in the Alfresco share header.

Share Header
(source: alfresco.com)

Glorfindel
  • 21,988
  • 13
  • 81
  • 109

4 Answers4

5

As of 4.2 the trashcan is available to any user. It is a link in their profile. For example, to go to the trash can directly via URL, the link is:

https://localhost:8080/share/page/user/[USER_NAME]/user-trashcan

So it should be a trivial customization to add a link to this in the Share header.

Jeff Potts
  • 10,468
  • 17
  • 40
2

But you need to know that the trashcan at the moment is admin only. There is JIRA, but it hasn't been fixed yet. So without some heavy customization you can bring the button to the menu, but you'll need to be an admin.

There is a cool addon which shows the button on your personal profile: https://forums.alfresco.com/forum/developer-discussions/add-ons/personal-user-trash-can-07192013-1200

Tahir Malik
  • 6,623
  • 15
  • 22
2

https://github.com/atolcd/alfresco-my-deleted-items

I've been trying with the deployment of these modules, but I've not been successful. The installation of these modules have attempted using the MMT and AMP modes.

1

As Jeff already mentioned it strongly depends on the version you are running. From 4.2.x on you can add a line to the following file:

tomcat/webapps/share/WEB-INF/classes/alfresco/share-config.xml

add the following line:

<item type="link" id="trash" label="Trash">/user/{userid}/user-trashcan</item>

and set legacy mode to true:

<legacy-mode-enabled>true</legacy-mode-enabled>

then it will look like:

  <!-- This indicates whether or not to use the configuration defined in this "header" element for rendering
          the header menu bar. If this is set to "false" or it not defined then the header bar will be rendered
          using the design implemented for 4.2 Enterprise. The header definition can be found in the associated
          WebScript controller.
     -->
     <legacy-mode-enabled>true</legacy-mode-enabled>

     <!-- This is the configuration that will be used to populate the header menu bar when "legacy-mode-enabled"
          has been set to true -->
     <app-items>
        <!-- defaults: icon="{id}.png" label="header.{id}.label" description="header.{id}.description" -->
        <item type="link" id="my-dashboard">{userdashboardpage}</item>
        <item type="js" id="sites">Alfresco.module.Sites</item>
        <item type="link" id="people">/people-finder</item>
        <item type="link" id="repository" condition="conditionRepositoryRootNode">/repository</item>
        <item type="link" id="trash" label="Trash">/user/{userid}/user-trashcan</item>

        <item type="container" id="more">
           <container-group id="my">
              <item type="link" id="my-tasks">/my-tasks#filter=workflows|active</item>
              <item type="link" id="my-workflows">/my-workflows#filter=workflows|active</item>
              <item type="link" id="my-content">/user/user-content</item>
              <item type="link" id="my-sites">/user/user-sites</item>
              <item type="link" id="my-profile">{userprofilepage}</item>
           </container-group>
           <container-group id="tools" permission="admin">
              <item type="link" id="application">/console/admin-console/application</item>
              <item type="link" id="groups">/console/admin-console/groups</item>
              <item type="link" id="replication-jobs" condition="!conditionEditionTeam">/console/admin-console/replication-jobs</item>
              <item type="link" id="repository">/console/admin-console/repository</item>
              <item type="link" id="trashcan">/console/admin-console/trashcan</item>
              <item type="link" id="users">/console/admin-console/users</item>
              <item type="link" id="more">/console/admin-console/</item>
           </container-group>
        </item>
     </app-items>

the original trashcan entry within the container group will not work any more as it links to the old before V4.2 admin trash can. You can remove that line if you like.

opbarth
  • 13
  • 3
  • This will also work with older versions of course. The corresponding image you can put under: tomcat/webapps/share/components/images/header/trash.png. But remember the user trashbin link is not valid for versions before V4.2. You are free to add arbitrary links there. – opbarth Feb 19 '14 at 21:41
  • Thanks @opbarth. That's my main problem, i need to add a "recycle bin" shortcut in the Share header, but I'm using Enterprise 4.1.2. Anyway I'll try you solution with arbitrary links. – isaacrojasgarcia Feb 21 '14 at 09:05