在ToDo列表中显示其他数据 displaying-additional-data-in-todo-list

CAUTION
AEM 6.4已结束扩展支持,本文档将不再更新。 有关更多详细信息,请参阅 技术支助期. 查找支持的版本 此处.

默认情况下,AEM Forms工作区待办事项列表会显示任务显示名称和说明。 但是,您可以添加其他信息,如创建日期、截止日期。 您还可以添加图标并更改显示的样式。

查看显示默认配置的HTML工作区待办事项选项卡

本文详细介绍了在“待办事项”列表中为每项任务添加要显示的信息的步骤。

可添加的内容 what-can-be-added

您可以在 task.json 由服务器发送。 该信息可以添加为纯文本,也可以使用样式来设置信息的格式。

有关JSON对象描述的更多信息,请参阅 文章。

显示任务信息 displaying-information-on-a-task

  1. 关注 AEM Forms工作区自定义的一般步骤.

  2. 要显示任务的其他信息,必须在的任务块中添加相应的键值对 translation.json.

    例如,更改 /apps/ws/locales/en-US/translation.json 英语:

    code language-none
    "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__"
            }
        }
    
    note note
    NOTE
    为所有支持的语言添加相应的键值对。
  3. 例如,在任务块内添加信息:

    code language-none
    "stepname" : {
                "value" : "Step Name",
                "tooltip" : "This task belongs to __stepName__ step"
    }
    

为新属性定义CSS defining-css-for-the-new-property

  1. 您可以对添加到任务的信息(属性)应用样式。 为此,您需要为添加到的新资产添加样式信息 /apps/ws/css/newStyle.css.

    例如,添加:

    code language-css
    .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 ---------------------*/
    }
    

在HTML模板中添加条目 adding-entry-in-the-html-template

最后,您需要在开发包中为要添加到任务的每个属性包含一个条目。 要创建工作区,请参阅构建AEM Forms工作区代码。

  1. 复制task.html

    • 从: /libs/ws/js/runtime/templates/
    • 到: /apps/ws/js/runtime/templates/
  2. 将新信息添加到 /apps/ws/js/runtime/templates/task.html.

    例如,在 div class="taskProperties":

    code language-none
    <span class="stepname" alt="<%= $.t('task.stepname.value')%>" title = '<%= $.t("task.stepname.tooltip",{stepName:stepName})%>'/>
    
recommendation-more-help
a6ebf046-2b8b-4543-bd46-42a0d77792da