From a9e01a83e255eb1d52b5b41565fc0e00871fb6ba Mon Sep 17 00:00:00 2001 From: nhthinh-axonivy Date: Thu, 28 Nov 2024 18:25:08 +0700 Subject: [PATCH 1/9] document/IVYPORTAL-17805-Update-documentation-for-IFrame-task-template-configuration _ update document in code _ update document --- .../restricted/IFrameTaskTemplate.xhtml | 140 ++++++----- .../portal-developer-guide/iframe/index.rst | 223 +++++++++++++----- 2 files changed, 245 insertions(+), 118 deletions(-) diff --git a/AxonIvyPortal/portal/webContent/layouts/restricted/IFrameTaskTemplate.xhtml b/AxonIvyPortal/portal/webContent/layouts/restricted/IFrameTaskTemplate.xhtml index eb85ed0512f..c9cda06739d 100644 --- a/AxonIvyPortal/portal/webContent/layouts/restricted/IFrameTaskTemplate.xhtml +++ b/AxonIvyPortal/portal/webContent/layouts/restricted/IFrameTaskTemplate.xhtml @@ -9,69 +9,87 @@ - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - + **Task Details:** + - taskName: (String) Custom text for the task name. + - taskIcon: (String) Icon for the task, using Streamline or Awesome font (e.g., `si si-arrow-right`). + - isHideTaskName: (Boolean) Hides the task name when true. Default is false. + + **Case Information:** + - caseId: (String) ID of the case to be displayed in the case information dialog. + - isHideCaseInfo: (Boolean) Hides the `Show Information` button when true. Default is false. + + **Process Steps:** + - currentProcessStep: (Number/String) Current step in the process, either as an index or step name. + - processSteps: (Array/String) List of process steps (e.g., `["Create Investment Request", "Approve Investment Request"]`) + or JSON (e.g., `#{portalComponentUtilsBean.convertToJSON(data.steps)}`). + - isShowAllSteps: (Boolean) Displays all steps on large screens when true. Default is false. + - processChainDirection: (String) Orientation of the process chain, either `VERTICAL` or `HORIZONTAL` (default). + - processChainShape: (String) Shape of the process chain, either `LINE` or `CIRCLE` (default). + + **Task Actions:** + - isHideTaskAction: (Boolean) Hides the task action button when true. Default is false. + - isWorkingOnATask: (Boolean) Indicates if a task is currently being worked on, useful for displaying a warning when leaving the page. Default is true. + + **Miscellaneous:** + - announcementInvisible: (Boolean) Makes the announcement invisible when true. Default is false. + - isCardFrame: (Boolean) Displays content of the IFrame inside a card-style container when true. + - viewName: (String) Defines a custom breadcrumb view. Possible values: + `HOME, PROCESS, TASK, TASK_DETAIL, CASE_DETAIL, CASE, TECHNICAL_CASE, RELATED_TASK, USER_PROFILE, + ABSENCES_MANAGEMENT, DASHBOARD_CONFIGURATION, EDIT_DASHBOARD_DETAILS, PROCESS_VIEWER, PORTAL_MANAGEMENT, NOTIFICATION`. + + --> + + + - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst index 6a4196590f6..0ddde7170b7 100644 --- a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst +++ b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst @@ -11,7 +11,11 @@ your HTML dialog independent of the **Portal**. It is rendered automatically in .. _iframe-usage: -Templates to use with IFrame: frame-10 templates (Provided by core, uses Freya theme). This template fully supports responsiveness. +Templates to Use with IFrame +============================ + +Use the ``frame-10`` templates (provided by the core and using the Freya theme). +These templates fully support responsive designs. How To Use ========== @@ -21,54 +25,90 @@ How To Use Follow these steps to use the IFrame approach: -#. Your HTML User Dialog has to be independent of the **Portal**. You can use - the ``frame-_x_`` template in designer, or your own template. **Portal** will - render it automatically in an IFrame. - -#. If you don't want to use the default configuration, apply one of the following three - levels to open your task(s) in an IFrame: - - - Task level: in Task custom fields, set the ``embedInFrame`` field to - - - ``true``: start inside IFrame - - ``false``: not start inside IFrame - - Don't set if you want to use case or engine level - - |task-embedInFrame| - - - Case level: in Case custom fields, set the ``embedInFrame`` String field to - - - ``true``: start inside IFrame - - ``false``: not start inside IFrame - - Don't set if you want to use engine level - - |case-embedInFrame| - - - Engine level: - - - The **Portal Administrator** can define globally that all of the tasks - running on the engine are started inside IFrames by using the - ``Portal.EmbedInFrame`` Portal setting. refer to - :ref:`update-portal-settings` +#. **HTML Dialog Independence** + Ensure your HTML User Dialog is independent of the **Portal**. You can use the ``frame-_x_`` template in the designer or your own custom template. + **Portal** will automatically render it in an IFrame. + +#. **Configuration Levels** + If you want custom behavior, configure at one of the following levels to open your tasks in an IFrame: + + - **Task Level**: Set the ``embedInFrame`` field in Task custom fields to: + - ``true``: Start inside IFrame. + - ``false``: Do not start inside IFrame. + - Leave unset to use case or engine-level configuration. + + |task-embedInFrame| + + - **Case Level**: Set the ``embedInFrame`` String field in Case custom fields to: + - ``true``: Start inside IFrame. + - ``false``: Do not start inside IFrame. + - Leave unset to use engine-level configuration. + + |case-embedInFrame| + + - **Engine Level**: + The **Portal Administrator** can globally configure all tasks to start inside IFrames by setting the ``Portal.EmbedInFrame`` value in the Portal settings. + Refer to :ref:`update-portal-settings`. .. _iframe-configure-template: -Configure template +Configure Template ================== -**Portal** supports some configurations for templates like: +The **Portal** allows configuration of templates with the following options: -#. Name and icon of the working task. +#. Name and icon for the working task. +#. Process chain configuration. + (See: :ref:`components-portal-components-process-chain`). +#. Show/hide case details and other actions. -#. Configuration of :ref:`components-portal-components-process-chain`. -#. Show/hide case details and other actions. +Template Parameters +------------------- + +The following parameters are available for this template: + +**Task Details** + +- ``taskName`` (String): Custom text for the task name. +- ``taskIcon`` (String): Icon for the task, using Streamline or Awesome font (e.g., ``si si-arrow-right``). +- ``isHideTaskName`` (Boolean): Hides the task name when true. Default is ``false``. + +**Case Information** + +- ``caseId`` (String): ID of the case to be displayed in the case information dialog. +- ``isHideCaseInfo`` (Boolean): Hides the ``Show Information`` button when true. Default is ``false``. + +**Process Steps** + +- ``currentProcessStep`` (Number/String): Current step in the process, either as an index or step name. +- ``processSteps`` (Array/String): List of process steps (e.g., ``["Create Investment Request", "Approve Investment Request"]``) + or JSON (e.g., ``#{portalComponentUtilsBean.convertToJSON(data.steps)}``). +- ``isShowAllSteps`` (Boolean): Displays all steps on large screens when true. Default is ``false``. +- ``processChainDirection`` (String): Orientation of the process chain, either ``VERTICAL`` or ``HORIZONTAL`` (default). +- ``processChainShape`` (String): Shape of the process chain, either ``LINE`` or ``CIRCLE`` (default). + +**Task Actions** + +- ``isHideTaskAction`` (Boolean): Hides the task action button when true. Default is ``false``. +- ``isWorkingOnATask`` (Boolean): Indicates if a task is currently being worked on, useful for displaying a warning when leaving the page. Default is ``true``. -|task-name-template| +**Miscellaneous** -You could configure UI in either of these two ways: +- ``announcementInvisible`` (Boolean): Makes the announcement invisible when true. Default is ``false``. +- ``isCardFrame`` (Boolean): Displays content of the IFrame inside a card-style container when true. +- ``viewName`` (String): Defines a custom breadcrumb view. Possible values: + ``HOME, PROCESS, TASK, TASK_DETAIL, CASE_DETAIL, CASE, TECHNICAL_CASE, RELATED_TASK, USER_PROFILE, + ABSENCES_MANAGEMENT, DASHBOARD_CONFIGURATION, EDIT_DASHBOARD_DETAILS, PROCESS_VIEWER, PORTAL_MANAGEMENT, NOTIFICATION``. -#. Using the component IFrameTaskConfig (recommended) +--- + +Configuration Methods +--------------------- + +You can configure the UI in one of two ways: + +#. **Using ``IFrameTaskConfig`` Component** (Recommended) .. code-block:: xml @@ -96,13 +136,13 @@ You could configure UI in either of these two ways: -#. Using Javascript +#. **Using JavaScript** .. code-block:: xml - ... + ... ... -Configure Task name -------------------- +Configure Task Details +---------------------- +You can customize task details, such as the task name and icon. -By default, **Portal** uses the name of the working task. +**Parameters:** +- ``taskName``: Custom text for the task name. +- ``taskIcon``: Icon for the task, using Streamline or Awesome font (e.g., `si si-arrow-right`). +- ``isHideTaskName``: Set to ``true`` to hide the task name. Default is ``false``. -Options for ``Task name`` +**Example:** -.. csv-table:: - :file: documents/available_task_options.csv - :widths: 20 50 - :header-rows: 1 - :class: longtable +.. code-block:: xml -Example using IFrameTaskConfig: + + + ... + + ... + + + + +Configure Case Information +-------------------------- +Customize how case details are displayed and whether to show the "Show Information" button. + +**Parameters:** +- ``caseId``: The ID of the case to display in the information dialog. +- ``isHideCaseInfo``: Set to ``true`` to hide the "Show Information" button. Default is ``false``. + +**Example:** .. code-block:: xml ... - + ... + + + +Configure Task Actions +---------------------- +Control the visibility and behavior of task-related buttons and actions. + +**Parameters:** +- ``isHideTaskAction``: Set to ``true`` to hide the task action button. Default is ``false``. +- ``isWorkingOnATask``: Indicates if the task is active. Useful for displaying a warning when leaving the page. Default is ``true``. + +**Example:** + +.. code-block:: xml + + + + ... + + ... + + + + +Configure Miscellaneous Options +------------------------------- +Additional settings can influence the layout and visibility of elements. + +**Parameters:** +- ``announcementInvisible``: Set to ``true`` to hide announcements. Default is ``false``. +- ``isCardFrame``: Set to ``true`` to display the IFrame content inside a card-style container. +- ``viewName``: Defines the breadcrumb view. Possible values are: + ``HOME, PROCESS, TASK, TASK_DETAIL, CASE_DETAIL, CASE, TECHNICAL_CASE, RELATED_TASK, USER_PROFILE, ABSENCES_MANAGEMENT, DASHBOARD_CONFIGURATION, EDIT_DASHBOARD_DETAILS, PROCESS_VIEWER, PORTAL_MANAGEMENT, NOTIFICATION``. + +**Example:** + +.. code-block:: xml + + + + ... + ... From 3d102517a99708cde7daa89b35df6bf47c0e8fd1 Mon Sep 17 00:00:00 2001 From: nhthinh-axonivy Date: Fri, 29 Nov 2024 08:02:01 +0700 Subject: [PATCH 2/9] document/IVYPORTAL-17805-Update-documentation-for-IFrame-task-template-configuration --- .../source/portal-developer-guide/iframe/index.rst | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst index 0ddde7170b7..3986a79cbff 100644 --- a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst +++ b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst @@ -96,12 +96,11 @@ The following parameters are available for this template: **Miscellaneous** - ``announcementInvisible`` (Boolean): Makes the announcement invisible when true. Default is ``false``. -- ``isCardFrame`` (Boolean): Displays content of the IFrame inside a card-style container when true. +- ``isCardFrame`` (Boolean): Displays content of the IFrame inside a card-style container when "true". - ``viewName`` (String): Defines a custom breadcrumb view. Possible values: - ``HOME, PROCESS, TASK, TASK_DETAIL, CASE_DETAIL, CASE, TECHNICAL_CASE, RELATED_TASK, USER_PROFILE, - ABSENCES_MANAGEMENT, DASHBOARD_CONFIGURATION, EDIT_DASHBOARD_DETAILS, PROCESS_VIEWER, PORTAL_MANAGEMENT, NOTIFICATION``. - ---- + ``HOME, PROCESS, TASK, TASK_DETAIL, CASE_DETAIL, CASE, TECHNICAL_CASE, RELATED_TASK, USER_PROFILE, + ABSENCES_MANAGEMENT, DASHBOARD_CONFIGURATION, EDIT_DASHBOARD_DETAILS, PROCESS_VIEWER, + PORTAL_MANAGEMENT, NOTIFICATION``. Configuration Methods --------------------- @@ -246,10 +245,9 @@ Additional settings can influence the layout and visibility of elements. **Parameters:** - ``announcementInvisible``: Set to ``true`` to hide announcements. Default is ``false``. - ``isCardFrame``: Set to ``true`` to display the IFrame content inside a card-style container. -- ``viewName``: Defines the breadcrumb view. Possible values are: - ``HOME, PROCESS, TASK, TASK_DETAIL, CASE_DETAIL, CASE, TECHNICAL_CASE, RELATED_TASK, USER_PROFILE, ABSENCES_MANAGEMENT, DASHBOARD_CONFIGURATION, EDIT_DASHBOARD_DETAILS, PROCESS_VIEWER, PORTAL_MANAGEMENT, NOTIFICATION``. +- ``viewName``: Defines the breadcrumb view. -**Example:** +**Example:** .. code-block:: xml From f5a1b1b56d7a9cd4e66a49d575f7fad72531aa80 Mon Sep 17 00:00:00 2001 From: nhthinh-axonivy Date: Fri, 29 Nov 2024 08:13:31 +0700 Subject: [PATCH 3/9] document/IVYPORTAL-17805-Update-documentation-for-IFrame-task-template-configuration --- .../portal-developer-guide/iframe/index.rst | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst index 3986a79cbff..33e1aa41fca 100644 --- a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst +++ b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst @@ -195,9 +195,9 @@ Configure Case Information -------------------------- Customize how case details are displayed and whether to show the "Show Information" button. -**Parameters:** -- ``caseId``: The ID of the case to display in the information dialog. -- ``isHideCaseInfo``: Set to ``true`` to hide the "Show Information" button. Default is ``false``. +- **Parameters:** + - ``caseId``: The ID of the case to display in the information dialog. + - ``isHideCaseInfo``: Set to ``true`` to hide the "Show Information" button. Default is ``false``. **Example:** @@ -218,9 +218,9 @@ Configure Task Actions ---------------------- Control the visibility and behavior of task-related buttons and actions. -**Parameters:** -- ``isHideTaskAction``: Set to ``true`` to hide the task action button. Default is ``false``. -- ``isWorkingOnATask``: Indicates if the task is active. Useful for displaying a warning when leaving the page. Default is ``true``. +- **Parameters:** + - ``isHideTaskAction``: Set to ``true`` to hide the task action button. Default is ``false``. + - ``isWorkingOnATask``: Indicates if the task is active. Useful for displaying a warning when leaving the page. Default is ``true``. **Example:** @@ -242,10 +242,10 @@ Configure Miscellaneous Options ------------------------------- Additional settings can influence the layout and visibility of elements. -**Parameters:** -- ``announcementInvisible``: Set to ``true`` to hide announcements. Default is ``false``. -- ``isCardFrame``: Set to ``true`` to display the IFrame content inside a card-style container. -- ``viewName``: Defines the breadcrumb view. +- **Parameters:** + - ``announcementInvisible``: Set to ``true`` to hide announcements. Default is ``false``. + - ``isCardFrame``: Set to ``true`` to display the IFrame content inside a card-style container. + - ``viewName``: Defines the breadcrumb view. **Example:** From 8b8571c29c3cbe194004705c462b91beb90bccc5 Mon Sep 17 00:00:00 2001 From: nhthinh-axonivy Date: Fri, 29 Nov 2024 08:21:07 +0700 Subject: [PATCH 4/9] document/IVYPORTAL-17805-Update-documentation-for-IFrame-task-template-configuration --- .../source/portal-developer-guide/iframe/index.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst index 33e1aa41fca..5766058ca10 100644 --- a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst +++ b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst @@ -170,9 +170,9 @@ Configure Task Details You can customize task details, such as the task name and icon. **Parameters:** -- ``taskName``: Custom text for the task name. -- ``taskIcon``: Icon for the task, using Streamline or Awesome font (e.g., `si si-arrow-right`). -- ``isHideTaskName``: Set to ``true`` to hide the task name. Default is ``false``. + - ``taskName``: Custom text for the task name. + - ``taskIcon``: Icon for the task, using Streamline or Awesome font (e.g., `si si-arrow-right`). + - ``isHideTaskName``: Set to ``true`` to hide the task name. Default is ``false``. **Example:** @@ -195,7 +195,7 @@ Configure Case Information -------------------------- Customize how case details are displayed and whether to show the "Show Information" button. -- **Parameters:** +**Parameters:** - ``caseId``: The ID of the case to display in the information dialog. - ``isHideCaseInfo``: Set to ``true`` to hide the "Show Information" button. Default is ``false``. @@ -218,7 +218,7 @@ Configure Task Actions ---------------------- Control the visibility and behavior of task-related buttons and actions. -- **Parameters:** +**Parameters:** - ``isHideTaskAction``: Set to ``true`` to hide the task action button. Default is ``false``. - ``isWorkingOnATask``: Indicates if the task is active. Useful for displaying a warning when leaving the page. Default is ``true``. @@ -242,7 +242,7 @@ Configure Miscellaneous Options ------------------------------- Additional settings can influence the layout and visibility of elements. -- **Parameters:** +**Parameters:** - ``announcementInvisible``: Set to ``true`` to hide announcements. Default is ``false``. - ``isCardFrame``: Set to ``true`` to display the IFrame content inside a card-style container. - ``viewName``: Defines the breadcrumb view. From 74a42e66b1140a9990af349331f381ac11920f84 Mon Sep 17 00:00:00 2001 From: nhthinh-axonivy Date: Fri, 29 Nov 2024 08:29:42 +0700 Subject: [PATCH 5/9] document/IVYPORTAL-17805-Update-documentation-for-IFrame-task-template-configuration --- .../portal-developer-guide/iframe/index.rst | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst index 5766058ca10..1a7c9751aba 100644 --- a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst +++ b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst @@ -71,7 +71,8 @@ The following parameters are available for this template: **Task Details** - ``taskName`` (String): Custom text for the task name. -- ``taskIcon`` (String): Icon for the task, using Streamline or Awesome font (e.g., ``si si-arrow-right``). +- ``taskIcon`` (String): Icon for the task, using Streamline + or Awesome font (e.g., ``si si-arrow-right``). - ``isHideTaskName`` (Boolean): Hides the task name when true. Default is ``false``. **Case Information** @@ -81,26 +82,32 @@ The following parameters are available for this template: **Process Steps** -- ``currentProcessStep`` (Number/String): Current step in the process, either as an index or step name. -- ``processSteps`` (Array/String): List of process steps (e.g., ``["Create Investment Request", "Approve Investment Request"]``) - or JSON (e.g., ``#{portalComponentUtilsBean.convertToJSON(data.steps)}``). +- ``currentProcessStep`` (Number/String): Current step in the process, + either as an index or step name. +- ``processSteps`` (Array/String): List of process steps + (e.g., ``["Create Investment Request", "Approve Investment Request"]``) + or JSON (e.g., ``#{portalComponentUtilsBean.convertToJSON(data.steps)}``). - ``isShowAllSteps`` (Boolean): Displays all steps on large screens when true. Default is ``false``. -- ``processChainDirection`` (String): Orientation of the process chain, either ``VERTICAL`` or ``HORIZONTAL`` (default). +- ``processChainDirection`` (String): Orientation of the process chain, + either ``VERTICAL`` or ``HORIZONTAL`` (default). - ``processChainShape`` (String): Shape of the process chain, either ``LINE`` or ``CIRCLE`` (default). **Task Actions** - ``isHideTaskAction`` (Boolean): Hides the task action button when true. Default is ``false``. -- ``isWorkingOnATask`` (Boolean): Indicates if a task is currently being worked on, useful for displaying a warning when leaving the page. Default is ``true``. +- ``isWorkingOnATask`` (Boolean): Indicates if a task is currently being worked on, + useful for displaying a warning when leaving the page. Default is ``true``. **Miscellaneous** - ``announcementInvisible`` (Boolean): Makes the announcement invisible when true. Default is ``false``. -- ``isCardFrame`` (Boolean): Displays content of the IFrame inside a card-style container when "true". -- ``viewName`` (String): Defines a custom breadcrumb view. Possible values: - ``HOME, PROCESS, TASK, TASK_DETAIL, CASE_DETAIL, CASE, TECHNICAL_CASE, RELATED_TASK, USER_PROFILE, - ABSENCES_MANAGEMENT, DASHBOARD_CONFIGURATION, EDIT_DASHBOARD_DETAILS, PROCESS_VIEWER, - PORTAL_MANAGEMENT, NOTIFICATION``. +- ``isCardFrame`` (Boolean): Displays content of the IFrame inside a + card-style container when "true". +- ``viewName`` (String): Defines a custom breadcrumb view. +Possible values: + ``HOME, PROCESS, TASK, TASK_DETAIL, CASE_DETAIL, CASE, TECHNICAL_CASE, RELATED_TASK, USER_PROFILE, + ABSENCES_MANAGEMENT, DASHBOARD_CONFIGURATION, EDIT_DASHBOARD_DETAILS, PROCESS_VIEWER, + PORTAL_MANAGEMENT, NOTIFICATION``. Configuration Methods --------------------- @@ -171,7 +178,7 @@ You can customize task details, such as the task name and icon. **Parameters:** - ``taskName``: Custom text for the task name. - - ``taskIcon``: Icon for the task, using Streamline or Awesome font (e.g., `si si-arrow-right`). + - ``taskIcon``: Icon for the task, using Streamline or Awesome font. - ``isHideTaskName``: Set to ``true`` to hide the task name. Default is ``false``. **Example:** From 211ab01dcfb11e292f04703b1ae8515df2efe090 Mon Sep 17 00:00:00 2001 From: nhthinh-axonivy Date: Fri, 29 Nov 2024 08:43:19 +0700 Subject: [PATCH 6/9] document/IVYPORTAL-17805-Update-documentation-for-IFrame-task-template-configuration --- .../portal-developer-guide/iframe/index.rst | 64 +++++++++---------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst index 1a7c9751aba..8a80abe30be 100644 --- a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst +++ b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst @@ -70,44 +70,34 @@ The following parameters are available for this template: **Task Details** -- ``taskName`` (String): Custom text for the task name. -- ``taskIcon`` (String): Icon for the task, using Streamline - or Awesome font (e.g., ``si si-arrow-right``). -- ``isHideTaskName`` (Boolean): Hides the task name when true. Default is ``false``. +- ``taskName``: Custom text for the task name. +- ``taskIcon``: Icon for the task, using Streamline or Awesome font. +- ``isHideTaskName``: Hides the task name when true. **Case Information** -- ``caseId`` (String): ID of the case to be displayed in the case information dialog. -- ``isHideCaseInfo`` (Boolean): Hides the ``Show Information`` button when true. Default is ``false``. +- ``caseId``: ID of the case to be displayed in the case information dialog. +- ``isHideCaseInfo``: Hides the ``Show Information`` button when true. **Process Steps** -- ``currentProcessStep`` (Number/String): Current step in the process, - either as an index or step name. -- ``processSteps`` (Array/String): List of process steps - (e.g., ``["Create Investment Request", "Approve Investment Request"]``) - or JSON (e.g., ``#{portalComponentUtilsBean.convertToJSON(data.steps)}``). -- ``isShowAllSteps`` (Boolean): Displays all steps on large screens when true. Default is ``false``. -- ``processChainDirection`` (String): Orientation of the process chain, - either ``VERTICAL`` or ``HORIZONTAL`` (default). -- ``processChainShape`` (String): Shape of the process chain, either ``LINE`` or ``CIRCLE`` (default). +- ``currentProcessStep``: Current step in the process, either as an index or step name. +- ``processSteps``: List of process steps or JSON. +- ``isShowAllSteps``: Displays all steps on large screens when true. +- ``processChainDirection``: Orientation of the process chain, either ``VERTICAL`` or ``HORIZONTAL``. +- ``processChainShape``: Shape of the process chain, either ``LINE`` or ``CIRCLE``. **Task Actions** -- ``isHideTaskAction`` (Boolean): Hides the task action button when true. Default is ``false``. -- ``isWorkingOnATask`` (Boolean): Indicates if a task is currently being worked on, - useful for displaying a warning when leaving the page. Default is ``true``. +- ``isHideTaskAction``: Hides the task action button when true. +- ``isWorkingOnATask``: Indicates if a task is currently being worked on, + useful for displaying a warning when leaving the page. **Miscellaneous** -- ``announcementInvisible`` (Boolean): Makes the announcement invisible when true. Default is ``false``. -- ``isCardFrame`` (Boolean): Displays content of the IFrame inside a - card-style container when "true". -- ``viewName`` (String): Defines a custom breadcrumb view. -Possible values: - ``HOME, PROCESS, TASK, TASK_DETAIL, CASE_DETAIL, CASE, TECHNICAL_CASE, RELATED_TASK, USER_PROFILE, - ABSENCES_MANAGEMENT, DASHBOARD_CONFIGURATION, EDIT_DASHBOARD_DETAILS, PROCESS_VIEWER, - PORTAL_MANAGEMENT, NOTIFICATION``. +- ``announcementInvisible``: Makes the announcement invisible. +- ``isCardFrame``: Displays content of the IFrame inside a card-style container. +- ``viewName``: Defines a custom breadcrumb view. Configuration Methods --------------------- @@ -178,7 +168,7 @@ You can customize task details, such as the task name and icon. **Parameters:** - ``taskName``: Custom text for the task name. - - ``taskIcon``: Icon for the task, using Streamline or Awesome font. + - ``taskIcon``: Using Streamline or Awesome font (e.g., `si si-arrow-right`). - ``isHideTaskName``: Set to ``true`` to hide the task name. Default is ``false``. **Example:** @@ -204,7 +194,8 @@ Customize how case details are displayed and whether to show the "Show Informati **Parameters:** - ``caseId``: The ID of the case to display in the information dialog. - - ``isHideCaseInfo``: Set to ``true`` to hide the "Show Information" button. Default is ``false``. + - ``isHideCaseInfo``: Set to ``true`` to hide the "Show Information" button. + Default is ``false``. **Example:** @@ -226,8 +217,10 @@ Configure Task Actions Control the visibility and behavior of task-related buttons and actions. **Parameters:** - - ``isHideTaskAction``: Set to ``true`` to hide the task action button. Default is ``false``. - - ``isWorkingOnATask``: Indicates if the task is active. Useful for displaying a warning when leaving the page. Default is ``true``. + - ``isHideTaskAction``: Set to ``true`` to hide the task action button. + Default is ``false``. + - ``isWorkingOnATask``: Indicates if the task is active. + Useful for displaying a warning when leaving the page. Default is ``true``. **Example:** @@ -250,9 +243,14 @@ Configure Miscellaneous Options Additional settings can influence the layout and visibility of elements. **Parameters:** - - ``announcementInvisible``: Set to ``true`` to hide announcements. Default is ``false``. - - ``isCardFrame``: Set to ``true`` to display the IFrame content inside a card-style container. - - ``viewName``: Defines the breadcrumb view. + - ``announcementInvisible``: Set to ``true`` to hide announcements. + Default is ``false``. + - ``isCardFrame``: Set to ``true`` to display the IFrame + content inside a card-style container. + - ``viewName``: Custom breadcrumb view. Possible values are: + ``HOME, PROCESS, TASK, TASK_DETAIL, CASE_DETAIL, CASE, TECHNICAL_CASE, RELATED_TASK, + USER_PROFILE, ABSENCES_MANAGEMENT, DASHBOARD_CONFIGURATION, EDIT_DASHBOARD_DETAILS, + PROCESS_VIEWER, PORTAL_MANAGEMENT, NOTIFICATION``. **Example:** From 9e16c2f5def1c06b31430838bbf35d5ded4d9df5 Mon Sep 17 00:00:00 2001 From: nhthinh-axonivy Date: Fri, 29 Nov 2024 08:53:50 +0700 Subject: [PATCH 7/9] document/IVYPORTAL-17805-Update-documentation-for-IFrame-task-template-configuration --- .../portal-developer-guide/iframe/index.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst index 8a80abe30be..b0fc107d596 100644 --- a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst +++ b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst @@ -91,7 +91,7 @@ The following parameters are available for this template: - ``isHideTaskAction``: Hides the task action button when true. - ``isWorkingOnATask``: Indicates if a task is currently being worked on, - useful for displaying a warning when leaving the page. + useful for displaying a warning when leaving the page. **Miscellaneous** @@ -195,7 +195,7 @@ Customize how case details are displayed and whether to show the "Show Informati **Parameters:** - ``caseId``: The ID of the case to display in the information dialog. - ``isHideCaseInfo``: Set to ``true`` to hide the "Show Information" button. - Default is ``false``. + Default is ``false``. **Example:** @@ -218,9 +218,9 @@ Control the visibility and behavior of task-related buttons and actions. **Parameters:** - ``isHideTaskAction``: Set to ``true`` to hide the task action button. - Default is ``false``. + Default is ``false``. - ``isWorkingOnATask``: Indicates if the task is active. - Useful for displaying a warning when leaving the page. Default is ``true``. + Useful for displaying a warning when leaving the page. Default is ``true``. **Example:** @@ -244,13 +244,13 @@ Additional settings can influence the layout and visibility of elements. **Parameters:** - ``announcementInvisible``: Set to ``true`` to hide announcements. - Default is ``false``. + Default is ``false``. - ``isCardFrame``: Set to ``true`` to display the IFrame - content inside a card-style container. + content inside a card-style container. - ``viewName``: Custom breadcrumb view. Possible values are: - ``HOME, PROCESS, TASK, TASK_DETAIL, CASE_DETAIL, CASE, TECHNICAL_CASE, RELATED_TASK, - USER_PROFILE, ABSENCES_MANAGEMENT, DASHBOARD_CONFIGURATION, EDIT_DASHBOARD_DETAILS, - PROCESS_VIEWER, PORTAL_MANAGEMENT, NOTIFICATION``. + ``HOME, PROCESS, TASK, TASK_DETAIL, CASE_DETAIL, CASE, TECHNICAL_CASE, RELATED_TASK, + USER_PROFILE, ABSENCES_MANAGEMENT, DASHBOARD_CONFIGURATION, EDIT_DASHBOARD_DETAILS, + PROCESS_VIEWER, PORTAL_MANAGEMENT, NOTIFICATION``. **Example:** From 2b634cbf3901e4f91d4dfd89f71ff743d578f285 Mon Sep 17 00:00:00 2001 From: nhthinh-axonivy Date: Fri, 29 Nov 2024 09:04:48 +0700 Subject: [PATCH 8/9] document/IVYPORTAL-17805-Update-documentation-for-IFrame-task-template-configuration --- .../portal-guide/source/portal-developer-guide/iframe/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst index b0fc107d596..50006def15b 100644 --- a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst +++ b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst @@ -195,7 +195,7 @@ Customize how case details are displayed and whether to show the "Show Informati **Parameters:** - ``caseId``: The ID of the case to display in the information dialog. - ``isHideCaseInfo``: Set to ``true`` to hide the "Show Information" button. - Default is ``false``. + Default is ``false``. **Example:** From 24177240f71b80b24860ef5f5290eeda7635393b Mon Sep 17 00:00:00 2001 From: Thinh Nguyen <117440893+nhthinh-axonivy@users.noreply.github.com> Date: Thu, 5 Dec 2024 09:54:04 +0700 Subject: [PATCH 9/9] Update index.rst --- .../source/portal-developer-guide/iframe/index.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst index 50006def15b..8a03edbc6e0 100644 --- a/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst +++ b/Documentation/portal-guide/source/portal-developer-guide/iframe/index.rst @@ -25,14 +25,16 @@ How To Use Follow these steps to use the IFrame approach: -#. **HTML Dialog Independence** - Ensure your HTML User Dialog is independent of the **Portal**. You can use the ``frame-_x_`` template in the designer or your own custom template. - **Portal** will automatically render it in an IFrame. +#. **HTML Dialog Independence** + + Ensure your HTML User Dialog is independent of the **Portal**. You can use the ``frame-_x_`` + template in the designer or your own custom template. **Portal** will automatically render it in an IFrame. #. **Configuration Levels** If you want custom behavior, configure at one of the following levels to open your tasks in an IFrame: - **Task Level**: Set the ``embedInFrame`` field in Task custom fields to: + - ``true``: Start inside IFrame. - ``false``: Do not start inside IFrame. - Leave unset to use case or engine-level configuration. @@ -40,13 +42,15 @@ Follow these steps to use the IFrame approach: |task-embedInFrame| - **Case Level**: Set the ``embedInFrame`` String field in Case custom fields to: + - ``true``: Start inside IFrame. - ``false``: Do not start inside IFrame. - Leave unset to use engine-level configuration. |case-embedInFrame| - - **Engine Level**: + - **Engine Level**: + The **Portal Administrator** can globally configure all tasks to start inside IFrames by setting the ``Portal.EmbedInFrame`` value in the Portal settings. Refer to :ref:`update-portal-settings`.