Thursday, October 10, 2013

Personalizaciones útiles de Alfresco Share Parte I - Introducción


Alfresco Share es una excelente interfaz de usuario para el repositorio de contenido de Alfresco.  Fomenta un ambiente de colaboración alrededor de un contenido debidamente organizado.

Sin embargo, cuando queremos extender ese poder de colaboración que nos ofrece, tenemos a nuestra disposición una serie de herramientas que nos permitirán llevar las funcionalidades del producto a un nivel superior.

Esta serie de 4 publicaciones en nuestro Blog, te mostrarán paso a paso, cómo modificar el panel de acciones que trae la interfaz de Alfresco Share y cómo modificar los componentes de una de sus páginas, para añadir por ejemplo un carrusel de imágenes.

A continuación menciono la serie de 4 publicaciones y su contenido.

- Parte I - Introducción
- Parte III - ¿Cómo añadir entradas al Panel de Acciones?
- Parte IV - ¿Cómo añadir componentes modificando una página de detalle?

La publicación está orientada a desarrolladores comenzando a trabajar en la personalización de Alfresco Share, sin embargo, para aquellos con un conocimiento más avanzado, hemos publicado el código de referencia aquí.

Esperamos que estas publicaciones te sean de utilidad en tus personalizaciones de Alfresco Share.

Monday, June 17, 2013

The very simple principles of Excellence in Service and You


Don´t you love vacations?

What is it about a good hotel where everybody is attentive to your every little desire and or need that makes you feel special?

If you are a connoisseur or an experienced world traveler, you already know that this is because it is in their job description to be happy to serve you.  Personnel at these places serve with a smile on their faces, they make you feel welcome and their goal is to leave you longing for the time you will comeback.  Especially if you go to a 4 or 5 stars place, where this kind of service is expected.

It is not only the service but the quality of it.

Now what would happen if you bring that experience to businesses other than the hospitality industry?

No… I don’t mean turning your business into a hotel or a tourist attraction… That would be preposterous!!!

But I definitively believe that every single employee in your organization or mine, should know, believe, breathe and act according to the simple principle that: Good manners will get you far...

Another principle would be that: Our work serves others because after all, unless we are castaways in an island, most times we are doing something for someone else, you may want to consider delivering something of good quality while at it.. it may be the report you were ask to do or the spreadsheet with all sorts of calculations.

And when I say every employee in your organization I mean every single one, independent contractor, subcontractor, CEO, manager, building maintenance employee, administrative assistants, project managers, programmers, clerks … EVERYBODY.

If your business is in the line of interfacing with general public, this is then mandatory, because a bad review or many of them can cost you your business.  A good one or many of them can be translated into more customers and more money.

Businesses that understand these principles strive when this is accompanied with a good quality product, business that fail to understand this, well… are missing out a lot.

If you are still unconvinced about the benefits of good customer service or customer care (internal or external), try it next time you can, you may even start with a smiley: “Hello, how can I help you?”



After all, everybody likes to be treated nicely.



Have a nice day

:-D

Monday, May 27, 2013

[Alfresco/Share] Configure Inline Editable on your custom content

I did not find anything online that explained in one post how I could setup a custom content as Inline Editable. I gathered bits and pieces from several places, but...

First, you have to specify in your content model that the custom content type in question should be handled as inline editable. You do this by defining the aspect app:inlineeditable as a mandatory aspect of the content type. Don't forget to import the application content model so that you can use the app namespace. Here's a snippet for reference.

<?xml version="1.0" encoding="UTF-8"?>

<model name="losi:SampleModel"
       xmlns="http://www.alfresco.org/model/dictionary/1.0"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.alfresco.org/model/dictionary/1.0">

    <description>Sample Model</description>
    <author>Juan Jimenez</author>
    <version>1.0</version>

    <imports>
        <import uri="http://www.alfresco.org/model/application/1.0" prefix="app"/>
        <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
        <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
        ...snip...
    </imports>

    <namespaces>
        <namespace uri="http://losi.co/model/sample/1.0" prefix="losi"/>
    </namespaces>

    ...snip...
    <types>

        ...snip...
        <type name="losi:CustomContent">
            <title>CustomContent</title>
            <parent>cm:content</parent>
            ...snip...
            <mandatory-aspects>
                <aspect>app:inlineeditable</aspect>
            </mandatory-aspects>
        </type>
        ...snip...

    </types>
    ...snip...

</model>

What this configuration does, is tell Share (or Alfresco Explorer for that matter) that whenever an element of type losi:CustomContent is managed in the document library details page, it will enable the Inline Edit action button. But this alone will not do the complete job. You still need to specify Share that you want to display the control to edit the content of the target element, i.e. cm:content. There are to configurations for defining the element's metadata forms, one for creating it and another for editing it.

<!-- for creating -->
<config evaluator="model-type" condition="losi:CustomContent">
    <forms>
        <form>
           <field-visibility>
                <show id="cm:name"/>
                <show id="cm:title"/>
                <show id="cm:description"/>
            </field-visibility>
        </form>
    </forms>
</config>

<!-- for editing -->
<config evaluator="node-type" condition="losi:CustomContent">
    <forms>
        <form>
            <field-visibility>
                <show id="cm:name"/>
                <show id="cm:title"/>
                <show id="cm:description"/>
                <show id="cm:content"/>
            </field-visibility>
        </form>
    </forms>
</config>

I was having trouble with the create one; because I did not wanted to add content at create, but rather enable the user only to add content when editing. For some reason, the inline edit form and the edit properties where not displaying the control to edit the content. The reason is, that since in the create form the content was not being initialized, Share did not know how to render the control to edit content. For instance, if I created a behavior that added default content to any losi:CustomContent and bind it to node create policy for this type, the inline edit for the newly created custom content would behave as expected, i.e. the correct control is rendered.

I though that there should be a simpler way to fix that, so browse through Share config files, and noticed that the cm:content form is defined so that the mimetype is provided as a parameter (within the GET request) and sets it as a hidden field in the form. I figured that I could probably do the same for my CustomContent... and it worked. This is how it ended up:

<!-- for creating -->
<config evaluator="model-type" condition="losi:CustomContent">
    <forms>
        <form>
           <field-visibility>
                <show id="cm:name"/>
                <show id="cm:title"/>
                <show id="cm:description"/>
                <show id="mimetype"/>
                <show id="cm:content"/>
            </field-visibility>
            <appearance>
                <field id="mimetype">
                    <control template="/org/alfresco/components/form/controls/hidden.ftl">
                        <control-param name="contextProperty">mimeType</control-param>
                    </control>
                </field>
                <field id="cm:content">
                    <control template="/org/alfresco/components/form/controls/hidden.ftl"/>
                </field>
            </appearance>
        </form>
    </forms>
</config>

In addition, by default Share will use the form definition for editing, defined at node-type evaluator. But, if you want to define a separate form for inline edit, you can do so by adding another form to the list of forms under the node-type evaluator, with the id doclib-inline-edit.

<!-- for editing -->
<config evaluator="node-type" condition="losi:CustomContent">
    <forms>
        ...snip...

        <!-- Document Library Inline Edit form -->
        <form id="doclib-inline-edit">
            <field-visibility>
                <show id="cm:name" />
                <show id="cm:content" force="true" />
            </field-visibility>
        </form>
    </forms>
</config>

Once again, I hope this is helpful for others looking to implement similar scenarios.