Per impostazione predefinita, nell'elenco attività dell'area di lavoro di AEM Forms vengono visualizzati il nome e la descrizione dell'attività. Tuttavia, potete aggiungere altre informazioni, ad esempio data di creazione e data di scadenza. È inoltre possibile aggiungere icone e modificare lo stile della visualizzazione.
In questo articolo sono descritti i passaggi da eseguire per aggiungere informazioni da visualizzare per ogni attività nell'elenco Attività.
È possibile aggiungere le informazioni disponibili in task.json
inviate dal server. Le informazioni possono essere aggiunte come testo normale oppure potete usare gli stili per formattare le informazioni.
Per ulteriori informazioni sulla descrizione dell'oggetto JSON, consultate l'articolo this.
Seguite i passaggi Generici per personalizzazione dell'area di lavoro AEM Forms.
Per visualizzare informazioni aggiuntive su un'attività, è necessario aggiungere le coppie chiave-valore corrispondenti all'interno del blocco attività di translation.json
.
Ad esempio, modificare /apps/ws/locales/en-US/translation.json
per Inglese:
"task" : {
"reminder" : {
"value" : "Reminder",
"tooltip" : "This is reminder __reminderCount__, for this task."
},
"deadlined" : {
"value" : "Deadlined",
"tooltip" : "This task has deadlined"
},
"save" : {
"message" : "Task has been saved successfully"
},
"status" : {
"deadlined" : "Deadlined",
"created" : "Created",
"assignedsaved" : "Draft from assigned task",
"terminated" : "Terminated",
"assigned" : "Assigned",
"unknown" : "Unknown",
"createdsaved" : "Draft from created task",
"completed" : "Completed"
},
"draft" : {
"value" : "Saved",
"tooltip" : "This task is marked as a draft"
},
"escalated" : {
"value" : "Escalated",
"tooltip" : "This task has been escalated"
},
"forward" : {
"value" : "Forwarded",
"tooltip" : "This task was forwarded"
},
"priority" : {
"highest" : "Highest priority",
"normal" : "Normal priority",
"high" : "High priority",
"low" : "Low priority",
"lowest" : "Lowest priority"
},
"claimed" : {
"value" : "Claimed",
"tooltip" : "This task has been claimed"
},
"locked" : {
"value" : "Locked",
"tooltip" : "This task is locked"
},
"consulted" : {
"value" : "Consulted",
"tooltip" : "This task has been consulted"
},
"returned" : {
"value" : "Returned",
"tooltip" : "This task was returned back"
},
"multiplesubmitbuttons" : {
"message" : "The form associated with this task has multiple submit buttons so the Workspace Complete button will be disabled. Click the appropriate button on the form to submit it."
},
"nosubmitbutton" : {
"message" : "The form associated with this task does not appear to have submit buttons. You may need to upgrade your Adobe Reader version to 9.1 or greater and enable the Reader Submit option in your process."
},
"icon" : {
"tooltip" : "open the task __taskName__"
}
}
Aggiungete le coppie chiave-valore corrispondenti per tutte le lingue supportate.
Ad esempio, aggiungere informazioni all'interno del blocco attività:
"stepname" : {
"value" : "Step Name",
"tooltip" : "This task belongs to __stepName__ step"
}
È possibile applicare lo stile alle informazioni (proprietà) aggiunte a un'attività. A questo scopo, è necessario aggiungere informazioni di stile per la nuova proprietà aggiunta a /apps/ws/css/newStyle.css
.
Ad esempio, aggiungi:
.task .taskProperties .stepname{
width: 25px;
background: url(../images/stepname.png) no-repeat; /*-------- Or just reuse background image / image-sprite defined .task .taskProperties span of style.css---------------------*/
background-position: 0px 0px; /*-------- Dummy values, need to be configured as per user background image / image-sprite ---------------------*/
}
Infine, è necessario includere una voce nel pacchetto dev per ogni proprietà che si desidera aggiungere all'attività. Per crearne uno, fare riferimento a Creazione codice dell'area di lavoro AEM Forms.
Copia task.html
:
/libs/ws/js/runtime/templates/
/apps/ws/js/runtime/templates/
Aggiungete le nuove informazioni a /apps/ws/js/runtime/templates/task.html
.
Ad esempio, aggiungere sotto div class="taskProperties"
:
<span class="stepname" alt="<%= $.t('task.stepname.value')%>" title = '<%= $.t("task.stepname.tooltip",{stepName:stepName})%>'/>