De forma predeterminada, la lista Tareas pendientes de AEM Forms workspace muestra el nombre y la descripción de la tarea. Sin embargo, puede agregar otra información, como fecha de creación o fecha límite. También puede añadir iconos y cambiar el estilo de la pantalla.
Este artículo detalla los pasos para agregar información para mostrar para cada tarea en la lista Tareas pendientes.
Puede añadir la información disponible en task.json
enviado por el servidor. La información se puede añadir como texto sin formato o puede utilizar estilos para dar formato a la información.
Para obtener más información sobre la descripción del objeto JSON, consulte this artículo.
Siga las Pasos genéricos para la personalización del espacio de trabajo de AEM Forms.
Para mostrar información adicional para una tarea, se deben agregar los pares de clave-valor correspondientes dentro del bloque de tareas de translation.json
.
Por ejemplo, cambiar /apps/ws/locales/en-US/translation.json
para inglés:
"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__"
}
}
Agregue los pares de clave-valor correspondientes para todos los idiomas compatibles.
Por ejemplo, agregue información dentro del bloque de tareas:
"stepname" : {
"value" : "Step Name",
"tooltip" : "This task belongs to __stepName__ step"
}
Puede aplicar estilo a la información (propiedad) añadida a una tarea. Para ello, debe agregar información de estilo para la nueva propiedad agregada a /apps/ws/css/newStyle.css
.
Por ejemplo, agregue:
.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 ---------------------*/
}
Finalmente, debe incluir una entrada en el paquete dev para cada propiedad que desee agregar a la tarea. Para crear una, consulte Creación del código de espacio de trabajo de AEM Forms .
Copiar task.html
:
/libs/ws/js/runtime/templates/
/apps/ws/js/runtime/templates/
Agregue la nueva información a /apps/ws/js/runtime/templates/task.html
.
Por ejemplo, agregue debajo de div class="taskProperties"
:
<span class="stepname" alt="<%= $.t('task.stepname.value')%>" title = '<%= $.t("task.stepname.tooltip",{stepName:stepName})%>'/>