Best Practices

Creating a Best Practices context with edit and collaborate capabilities
Bona pràctica
EL - Elephant » Project Desk « JavaEE « Elephant

Lluís Turró Cutiller
Creació
06
des.
2015
Activitat
06
des.
2015

The following steps will help you create a Best Practices context within your web site.

Requirements

  • Elephant based web site.
  • BrightSide Dossiers installed and functioning.

Assumptions I made

  • Best practices will be dossiers-wide, although I'll point where to incorporate filters.
  • Best practices will show in which dossier are included.
  • Best practices will be editable by reporters, responsibles, QA, assistants, dossier owners and dossier assistants.
  • Best practices context will be public.
  • Attached documents will follow attachment's publishable rules.
  • Visitors will be able to comment. Comments are moderated.
  • Visitors may valuate the information using stars.

Creating de context

Follow the usual steps creating a context. Edit _internal/context.xml and add this element tag within elephant-context:

<element id="20091021131026676" type="dossiers">
  <attrib name="sclass" value="" />
  <attrib name="categoryId" value="0" />
  <attrib name="dossierId" value="0" />
  <attrib name="count" value="10" />
  <attrib name="onlyDossiers" value="false" />
  <attrib name="summaryTemplate" value="questions" />
  <attrib name="fullTemplate" value="question" />
  <attrib name="restricted" value="false" />
  <attrib name="issueTypes" value="TYPE_BESTPRACTICE"/>
</element>

Now, you have a context that lists all issues typed as Best Practice. In case you want to restrain best practices scope, you can indicate a category or a dossier. Since the restricted attribute is set to false, the list will show all publishable best practices.

Both, summary and full templates, are provided. Feel free to copy and play around with styles, fields and edit permissions.

The edit context

From the Best practices context, create a new child named Edit. Create a new content by adding this macro:

{@edit-question:{@param:item}:[best_practices_context]?item={@param:item}:TYPE_BESTPRACTICE}

Notice you have to replace [best_practices_context] with your own context.

Create a Best Practice

Do as you normally do when creating a new issue, but this time select Best Practice as issue type. Now you can edit the best practice from the recently created context.

What has been moving on the background

Best practices are created as normal issues, simply typed as a Best Practice. When you edit de best practice text, a copy is stored in the issue, as to track text modifications, but also to help search engines to find description text. The copy is stored as readable plain text.

Best practices created in such a way, support the normal flow of issues. For example, in case you want to ensure Best Practice quality, you could mark as non publishable the issue, put yourself as Quality Assurance and turn on the publishable attribute after verification.

Some more magic

Following the same rules, you can create a FAQ context. Change TYPE_BESTPRACTICE with TYPE_QUESTION. Surprisingly, the ok hand image will be substituted with a question circle. The secret in the supplied templates.

Comentaris