Open IT Experts for Enterprise

Zylk empresa de desarrollo de ecommerce

More about quick shared functionality in Alfresco

Cesar Capillas
Cesar Capillas

Very related to the topic of the last posts, it is to disable quick
shares in Alfresco via alfresco-global.properties:

system.quickshare.enabled=false

This hides the quick shared part in document details page of Alfresco
Share, but it does not hide detailed metadata templates. Maybe the
less intrusive way is just to add to your theme:

/* Disables the Quick Share link both in documentlibrary and document-details pages */
.item-social a.quickshare-action {
   visibility: hidden;
}

If your organization does not feel "social", you can also
re-define the default (detailed) metadata template, ignoring the
social part. This can be extended in
share-config-custom.xml (the original reference can
be found in $ALF_HOME/tomcat/webapps/shareWEB-INF/classes/alfresco/share-documentlibrary-config.xml).

<config evaluator="string-compare" condition="DocumentLibrary" replace="true">
   <metadata-templates>
      <template id="default">
         <banner index="10" id="lockBanner" evaluator="evaluator.doclib.metadata.hasLockBanner">{lockBanner}</banner>
         <banner index="20" id="syncTransientError" evaluator="evaluator.doclib.metadata.hasSyncTransientErrorBanner">{syncTransientError}</banner>
         <banner index="30" id="syncFailed" evaluator="evaluator.doclib.metadata.hasSyncFailedBanner">{syncFailed}</banner>
         <line index="10" id="date">{date}{size}</line>
         <line index="20" id="description" view="detailed">{description}</line>
         <line index="30" id="tags" view="detailed">{tags}</line>
         <line index="40" id="categories" view="detailed" evaluator="evaluator.doclib.metadata.hasCategories">{categories}</line>
<!--     <line index="50" id="social" view="detailed">{social}</line> -->
      </template>

      <template id="isWorkingCopy">
         <evaluator>evaluator.doclib.metadata.isWorkingCopy</evaluator>
         <banner index="10" id="lockBanner" evaluator="evaluator.doclib.metadata.hasLockBanner">{lockBanner}</banner>
         <banner index="20" id="syncTransientError" evaluator="evaluator.doclib.metadata.hasSyncTransientErrorBanner">{syncTransientError}</banner>
         <banner index="30" id="syncFailed" evaluator="evaluator.doclib.metadata.hasSyncFailedBanner">{syncFailed}</banner>
         <line index="10" id="date">{date}{size}</line>
         <line index="20" id="description" view="detailed">{description}</line>
      </template>

      <template id="dictionaryModel">
         <evaluator>evaluator.doclib.metadata.isDictionaryModel</evaluator>
         <banner index="10" id="lockBanner" evaluator="evaluator.doclib.metadata.hasLockBanner">{lockBanner}</banner>
         <banner index="20" id="syncTransientError" evaluator="evaluator.doclib.metadata.hasSyncTransientErrorBanner">{syncTransientError}</banner>
         <banner index="30" id="syncFailed" evaluator="evaluator.doclib.metadata.hasSyncFailedBanner">{syncFailed}</banner>
         <line index="10" id="date">{date}</line>
         <line index="20" id="description" view="detailed">{description}</line>
         <line index="30" id="dictionaryModel" simpleView="true">{modelActive label.modelActive}{modelName label.modelName}{modelDescription label.modelDescription}</line>
      </template>

      <template id="transferTarget">
         <evaluator>evaluator.doclib.metadata.isTransferTarget</evaluator>
         <banner index="10" id="lockBanner" evaluator="evaluator.doclib.metadata.hasLockBanner">{lockBanner}</banner>
         <banner index="20" id="syncTransientError" evaluator="evaluator.doclib.metadata.hasSyncTransientErrorBanner">{syncTransientError}</banner>
         <banner index="30" id="syncFailed" evaluator="evaluator.doclib.metadata.hasSyncFailedBanner">{syncFailed}</banner>
         <line index="10" id="date">{date}</line>
         <line index="20" id="description" view="detailed">{description}</line>
         <line index="30" id="transferTarget" simpleView="true">{trx_enabled label.trx_enabled}{trx_endpointhost label.trx_endpointhost}{trx_endpointport label.trx_endpointport}</line>
      </template>        
   </metadata-templates>
</config>

Other frequent customization is to disable Facebook, Twitter and
Google+ shares, letting only the mailto share:

This can be done again in share-config-custom.xml:

<config evaluator="string-compare" condition="Social" replace="true">
      <!– Alfresco QuickShare social widget - for creating public url that can be shared –>
      <quickshare>
         <!–
            Will be available as Alfresco.constants.QUICKSHARE_URL using javascrip in the browser.
            If changing this, make sure this url matches the quickshare rule in urlrewrite.xml
         –>
         <url>{context}/s/{sharedId}</url>
      </quickshare>

      <!– Alfresco LinkShare social widget - share a link to social sites –>
      <linkshare>
         <!–
            These actions will be available as Alfresco.constants.LINKSHARE_ACTIONS using javascript in the browser.
            Labels will be retrieved from msg key "linkshare.action.<id>.label" unless explicitly provided as an
            attribute to the action element.
            Each param value accepts the following input: {shareUrl}, {displayName} or a msg key that will be prefixed.
            I.e. {body} for the email action's href param will be retrieved using "linkshare.action.email.body".
         –>
         <action id="email" type="link" index="10">
            <param name="href">mailto:?subject={subject}&amp;body={body}</param>
            <param name="target">new</param>

         </action>
<!--
         <action id="facebook" type="link" index="20">
            <param name="href">https://www.facebook.com/sharer/sharer.php?u={shareUrl}&t={message}</param>
            <param name="target">new</param>
         </action>
         <action id="twitter" type="link" index="30">
            <param name="href">https://twitter.com/intent/tweet?text={message}&url={shareUrl}</param>
            <param name="target">new</param>
         </action>
         <action id="google-plus" type="link" index="40">
            <param name="href">https://plus.google.com/share?url={shareUrl}</param>
            <param name="target">new</param>
         </action>
-->
      </linkshare>
</config>

 

This is valid from Alfresco >4.2.

 

External links:

Si te ha parecido interesante comparte este post en RRS

Facebook
LinkedIn
Telegram
Email

Leer más sobre temas relacionados

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *