cancel
Showing results for 
Search instead for 
Did you mean: 

Simple one-step publish

dwoods
Champ in-the-making
Champ in-the-making
Hi,

We are evaluating the Web Quick Start functionality, and I have a couple of questions so far..

1. The default workflow is fine for some of the sites/users, but in many of our smaller sites where the individual creating & editing the content IS the site manager, the  "Start workflow -> review & publish -> assign to Myself -> go to My Dashboard -> select the Task -> Publish -> go back to My Dashboard -> select the task again -> set to Done" process is cumbersome is would meet with a lot of resistance from users.  How can I add a one-step "Publish" option to the actions list for a piece of content (beside the 'Start Workflow' option) for users that have a appropriate privileges?

2. When editing HTML content using the TinyMCE editor and adding an image, in some cases there is no "Browse" button to select an image from the repository.  When  there is a button, clicking it does nothing.  I assume that this browse link is meant to allow a user to browse and select from the repository like in WCM, but I'm not sure.   Most times it makes sense to only allow users to  add images via a separate field so that we can decide how best to present it on the website, but for standard informational pages users will want to place images within the HTML content.  A lot of the site editors are non-technical, and don't understand how to acquire the URL for an image they just uploaded to the site and paste it into the image TinyMCE URL field (and even if we told them, they may only edit the site twice a year, and would forget).   What is my best option here for making this more user-friendly?

I'm using version Community version 3.4d (from HEAD).

Thanks in advance,
Darryl

edit: added version
3 REPLIES 3

bremmington
Champ on-the-rise
Champ on-the-rise
Not sure about your second question - will have to look into that a little deeper. It may be a bug.

With regard to the one-step publish, however, this is reasonably straightforward as long as you don't mind making adjustments to a couple of the WebQS files used to extend Share (in the wcmqs-share-3.4.amp file). If you're working from the source then you can rebuild the AMP file after making your changes using the command "ant package-wcmquickstart-share-extension". If you only have the WebQS Share AMP file then you can unzip it (it is a standard ZIP file). If you only have the share.war file then you can unjar it and work in there. You may want to try to make the process repeatable if you want to be able to apply the changes to later releases too. The steps to take are:

  1. Find the file named "wcmqs-actions.js". In the same folder create a new file named, for example, "wcmqs-action-extensions.js". Put the following in that new file:

  2. (function()
    {
       Alfresco.doclib.Actions.prototype.onPublish = function WCMQS_onPublish(asset)
       {
          var displayName = asset.displayName;
      
          this.modules.actions.genericAction(
          {
             success:
             {
                event:
                {
                   name: "metadataRefresh"
                },
                message: this.msg("message.wcmqs.asset-published-success")
             },
             failure:
             {
                message: this.msg("message.wcmqs.asset-published-failure")
             },
             webscript:
             {
                method: Alfresco.util.Ajax.POST,
                stem: Alfresco.constants.PROXY_URI + "api/",
                name: "actionQueue"
             },
             config:
             {
                requestContentType: Alfresco.util.Ajax.JSON,
                dataObj:
                {
                   actionedUponNode: asset.nodeRef,
                   actionDefinitionName: "webqs_publish"
                }
             }
          });
       };
    })();

  3. Find the file named "wcmqs.documentlist.get.head.ftl". Add a line to it to import the new script file that you added in step 1. It should now look like this:

  4. <#include "../component.head.inc">
    <#include "../form/form.get.head.ftl">
    <!– WCM QuickStart actions - JS –>
    <@script type="text/javascript" src="${page.url.context}/res/components/documentlibrary/wcmqs-actions.js"></@script>
    <@script type="text/javascript" src="${page.url.context}/res/components/documentlibrary/wcmqs-action-extensions.js"></@script>
    <!– Document List –>
    <@link rel="stylesheet" type="text/css" href="${page.url.context}/res/components/documentlibrary/documentlist.css" />
    <@script type="text/javascript" src="${page.url.context}/res/components/documentlibrary/documentlist.js"></@script>
    <!– WCM QuickStart actions - CSS –>
    <@link rel="stylesheet" type="text/css" href="${page.url.context}/res/components/documentlibrary/wcmqs-actions.css" />
    (Note the new reference to "wcmqs-action-extensions.js" on line 5)

  5. Find the file named "wcmqs.documentlist.get.config.xml". In that file, find the XML element "<actionSet id="document">" and add this line somewhere inside it (where you place it will dictate where it appears in the list of actions the user will see):

  6.          <action type="action-link" id="onPublish" permission="delete" label="actions.wcmqs.publish-webasset" />
    This will add a new action link onto each document that calls the onPublish function that you defined in your new JavaScript file. In this case it will show itself only if the user has permission to delete the asset in question.

  7. Finally, find the file named "wcmqs.documentlist.get.properties" and add the following lines at the bottom of it:

  8. actions.wcmqs.publish-webasset=Publish Web Asset
    message.wcmqs.asset-published-success=Asset queued for publishing
    message.wcmqs.asset-published-failure=Failed to place asset on the publishing queue
Once you've repackaged everything (and reapplied the AMP file if necessary) you should see the "Publish Web Asset" action available for your assets.

dwoods
Champ in-the-making
Champ in-the-making
Works great, thanks for the prompt and detailed response.

bremmington
Champ on-the-rise
Champ on-the-rise
You're welcome. Glad it worked for you.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.