Friday, 28 June 2013

Show All Users in Alfresco Share

Hi Guise, 
             You might have noticed that in Alfresco DM, we have a facility of "Show All" users.  



It is not provided OOTB in share.
So if anybody wants to use it or add it in their Alfresco share UI, they can use it as per the steps mentioned below in this document.
Clicking "Show All Users" button will list all the users created in alfresco. (shown below)


Clicking "Show All Users" button will list all the users created in alfresco. (shown below)



Steps
  1. Put the button "Show All Users" in people-finder.get.html.ftl (location -> shared\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\people-finder)

    Code:
    <!-- My Customized button - START -->
    <div class="showAll-button">
    <span id="${el}-showAll-button" class="yui-button yui-push-button">
    <span class="first-child">
    <button>${msg("button.showAll")}</button>
    </span>
    </span>
    </div>
    <!-- My Customized button - END -->

    2. Change the reference of the people-finder.js in people-finder.get.head.ftl (location -> shared\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\people-finder)

      Code:
    <script type="text/javascript" src="${page.url.context}-extension/components/people-finder/people-finder.js"></script>

    3. Extend people-finder.js

    Note: As it is difficult to copy each line of YUI/JS customized code here, please send me an email if you want this file. I will share it with you. Sorry for the inconvenience.

    4. Put the button "Show All Users" in users.get.html.ftl (location -> shared\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\console)
    Code:
    <!-- My Customized button - START -->
    <span class="yui-button yui-push-button" id="${el}-showAll-button">
    <span class="first-child"><button>${msg("button.showAll")}</button></span>
    </span>
    <!-- My Customized button - END -->

 5. 
  1. Change the reference of the users.js in users.get.head.ftl (location -> shared\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\console)
    Code:
    <script type="text/javascript" src="${page.url.context}-extension/components/console/users.js"></script>


    6. Extend users.js

      Note: As it is difficult to copy each line of YUI/JS customized code here, please send me an email if you want this file. I will share it with you. Sorry for the inconvenience.

23 comments:

  1. Hi Sanket, I am interested in trying out this functionality. Could you please forward me the coding at jacob2aj@gmail.com. Regards Jacob.

    ReplyDelete
  2. Hi Sanket, could you please forward me the coding. Mail: applelam.star@gmail.com. Thanks.

    ReplyDelete
  3. Hi Sanket, this could be an convenient customization, do you mind sending the customization code to joe@cypress67.com? Thanks and regards, Joe

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Sanket, I would be very interested in the code customization as well. Could you please forward to me? Many thanks in advance, Bill wlong@data-tactics.com

    ReplyDelete
    Replies
    1. Thank you for going through the blog. Code sent on your email

      Delete
  6. Hi Sanket, please send me code to thaihphan@yahoo.com. Thanks.

    ReplyDelete
    Replies
    1. Thank you for going through the blog. Code sent on your email

      Delete
  7. Hi Sanket Mehta
    I interest in your solution. Please send me the codes to quang.viami@gmail.com
    Thank you and best regards.

    ReplyDelete
    Replies
    1. Thank you for going through the blog. I sent the code on your email.

      Delete
  8. I'm interested by your solution. Please send me the codes to gabrielsellam@free.fr
    Thank you.

    ReplyDelete
    Replies
    1. Thank you for going through the blog. I sent the code on your email.

      Delete
  9. This comment has been removed by the author.

    ReplyDelete
  10. Hi Sanket,

    I am interested in this Alfresco Extension. Can you please send me the code at stavy92@hotmail.com?

    Also, an additional question: When you say 'Put the button "Show All Users" in people-finder.get.html.ftl', do you mean: a) I should create my own 'people-finder.get.html.ftl' file with just the contents you wrote above, b) I should create my own 'people-finder.get.html.ftl' file which is a copy of the original, except the changes you wrote above, or c) I should directly modify the original 'people-finder.get.html.ftl' file?

    Thanks,

    Voula

    ReplyDelete
    Replies
    1. Thank you for going through the blog. I sent the code on your email.

      Delete
    2. @Voula, answering your question:
      Alfresco always recommends - not to modify the original file(s) of alfresco;
      instead extend/override the files by putting them into the alfresco extension environment.
      So you can just copy the original file; put it in extension environment and add your custom code in it.

      You already might be knowing but just for your reference:
      /tomcat/shared/classes/alfresco/web-extension - this is the extension envt for alfresco share files.
      /tomcat/shared/classes/alfresco/extension - this is the extension envt for alfresco explorer files.

      Delete
  11. Hello Sanket,

    I am interested in your solution. Can you please send me the code at astralink_AT_gmail.com?

    ReplyDelete
  12. Hi Sanket, this one is exactly what i want to do. Could you please send me the code.. email : harke@programmer.net

    Thanks for your kind :)

    ReplyDelete
  13. Hi Sanket,
    I'm interested by your solution. Please send me the codes to caesar_8@hotmail.com
    Thank you.

    ReplyDelete
  14. Hi Sanket,
    I'm interested by your solution. Please send me the codes to caesar_8@hotmail.com
    Thank you.

    ReplyDelete