Per impostazione predefinita, nell’elenco To-do dell’area di lavoro di AEM Forms vengono visualizzati il nome e la descrizione dell’attività. Tuttavia, puoi aggiungere altre informazioni, ad esempio data di creazione e data di scadenza. È inoltre possibile aggiungere icone e modificare lo stile della visualizzazione.
Questo articolo descrive i passaggi per aggiungere informazioni da visualizzare per ogni attività nell'elenco ToDo.
Puoi aggiungere le informazioni disponibili in task.json
inviato dal server. Le informazioni possono essere aggiunte come testo normale oppure è possibile utilizzare gli stili per formattare le informazioni.
Per ulteriori informazioni sulla descrizione dell’oggetto JSON, consulta questo articolo.
Segui Passaggi generici per la personalizzazione dell’area di lavoro AEM Forms.
Per visualizzare informazioni aggiuntive per un'attività, è necessario aggiungere le coppie chiave-valore corrispondenti all'interno del blocco attività di translation.json
.
Esempio di modifica /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__"
}
}
Aggiungi 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 uno stile alle informazioni (proprietà) aggiunte a un'attività. A questo scopo, è necessario aggiungere informazioni sugli stili 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 di sviluppo per ogni proprietà che si desidera aggiungere all'attività. Per crearne uno, fai riferimento a Creazione del codice dell’area di lavoro di AEM Forms .
Copia task.html
:
/libs/ws/js/runtime/templates/
/apps/ws/js/runtime/templates/
Aggiungi le nuove informazioni a /apps/ws/js/runtime/templates/task.html
.
Ad esempio, aggiungi sotto div class="taskProperties"
:
<span class="stepname" alt="<%= $.t('task.stepname.value')%>" title = '<%= $.t("task.stepname.tooltip",{stepName:stepName})%>'/>