Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
When creating a widget, define its form, fields, and their behaviour by behavior using the template elements to specify the widget view and the way it displays is displayed with HTML and and Widget Attributes. The widget template also allows end-users to input enter data and interact with it. Apply You can apply HTML tags and React components to add and control elements such as buttons and various types of fields.
<activityfeed>description goes here
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<activityfeed table_name="itsm_incident"
sys_id="157322330317307618"></activityfeed> |
<authfull>
An Authorisation widget component that contains full functionality of the user authorization including form of registration. It also supports configurable validation in strings containing user login and password.
The following attributes are applicable:
Absolute path to the logo displayed on authorization page. For example:
https://example.com/logo.png
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<authfull redirectTo="/portal" isRegistration="true" isSwitchLang="true" isRememberMe="false" isResetPassword="true"></authfull> |
<authheader>
A part of a header that displays a user's name and avatar, or prompts them to log in if they haven't already. The following attributes are applicable:
- profileURL - specify the path to the portal section containing the personal pages.
- If specified, then the Profile item is available in the User Menu at the top right
- If not specified, then this item is not available, and user won't be able to watch his profile.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<authheader profileURL="/portal/cabinet"> |
<breadcrumbs>
A Breadcrumbs widget component that displays a navigation chain trailing user activity.
This widget uses the object received from the server script to build the breadcrumbs chain with the format below:
{sys_id, title, url}.Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
there was text here. it's gone now. |
<card>
* img - Иконка (svg) не ссылка, а код svg
* url - Ссылка на которую перейдем при клике на карточку
* name - Заголовок
* short_description - Описание
* button_name - Текст на кнопке
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<getlist table_name="sys_service_portal">
<card></card>
</getlist> |
<category>
This widget is a component that displays portal categories and items structure. It interacts with some other widgets, like <breadcrumbs> or <sidemenu> widgets.
The following attributes are applicable:
Specify a table field containing category titles.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<Category nodeId="158766114011088368" categorySubject="name" categoryDescription="short_description" itemDescription="vendor" itemSubject="city"></Category> |
<dropdownMenu>
Creates a dropdown menu with menu elements on any nesting level.
The following attributes are applicable:
size - (может быть low = __ px ? / medium = __ px ? / large = __ px ?).
- event -
- event_to_display -
- isShow - this attribute of a Boolean type is responsible for menu displaying
- doClose - this attribute of a Function type is a method of an additional action when the menu closes.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<dropdownMenu model="data.menu"></dropdownMenu> |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
; (() => {
data.menu = {
"menu": {
"size": "low",
"event_to_display": [
"click"
],
"sections": [
{
"order": "1",
"elements": [
{
"title": "Text",
"order": "1",
"event_to_display": ["click"],
"events": {
"click": "runScript()"
},
"child_elements": [
{
"title": "Text22",
"event_to_display": ["click"],
"events": {
"click": "runScript()"
},
"child_elements": [
{
"title": "Text2",
"event_to_display": ["click"],
"events": {
"click": "runScript()"
},
"child_elements": []
}
]
}
]
},
{
"title": "Title",
"order": "2",
"event_to_display": ["click"],
"events": {
"click": "runScript()"
},
"child_elements": [
{
"title": "Text2",
"event_to_display": ["click"],
"events": {
"click": "runScript()"
},
"child_elements": []
}
]
}
]
},
{
"order": "2",
"elements": [
{
"title": "Text",
"order": "1",
"event_to_display": ["click"],
"events": {
"click": "runScript()"
},
"child_elements": []
}
]
}
]
}
}
})(); |
<form>
The dynamic form creating component. It requires the following arguments received from the server script:
(optional) buttons - form UI actions including buttons and other graphical elements.
Info |
---|
Specify the way UI actions displayed on the form with the options below:
Specify these options separating them with the coma. |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<form table="name_table" view="name_view"
sys_id="sys_number" buttons="header, bottom, link">
</form> |
<getlist>
Виджет для получения списка из АПИ и прокидывания результатов в дочерний виджет.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
there was text here. it's gone now. |
<listitems>
This widget allows displaying table items as a list view. The following attributes are applicable:
- tableName- specify a table containing output elements to display. This attribute is mandatory.
- listView - specify a list view to use (this view need to be created first in the UI list (sys_ui_list) dictionary). This attribute is mandatory.
- view - this attribute allows us to specify the view adjustability. Available attribute options:
- adjustable - in this case, you can adjust the widget size to be able to use more than one widget on the page.
- full - when this option is specified, the widget uses all the valuable page space.
- condition - specify a condition applied to the list. This attribute should contain data of the Conditions type.
- choiceConditionName - this attribute is to specify columns containing data of the Choice type if you need to specify choice options in your condition.
- dateConditionName - this attribute is to specify columns containing data of the Date or Date/Time type if you need to specify date ranges in your condition.
- perPage - specify the number of page items. If not specified, then equal to '5'by default.
- displayColumnNumber - specify a column number to open a record by clicking on it. If not specified, then equal to '1' by default.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<listitems tableName="itsm_incident" condition="" listView="Widget" choiceConditionName="state" dateConditionName="sys_created_at" perPage="25" displayColumnNumber="2"></listitems> |
<news>
Displays a newsfeed or an announcement list that is generated by the data object received from the server script.
The following attributes are applicable:
- sys_id - an ID of the form.
- subject - an announcement message text.
- announcement_type - a category of an announcement.
- sys_created_at - the date an announcement was created.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<news model="[{ "sys_id": "159038766612804355", "subject": "test subject", "announcement_type": "1", "sys_created_at": "2020-03-04 00:00:00" },
{ "sys_id": "148038977612804360", "subject": "test subject 2", "announcement_type": "2", "sys_created_at": "2020-01-20 00:00:00" }]"></news> |
<previewList>
This list view widget allows displaying table items as a customizable list.
The following attributes are applicable:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<PreviewList tableName="itsm_incident" view="Widget" elementCount="2" subjectColumn="subject" dateColumn="sys_created_at" stateColumn="state" wrap="true"><ListHeader><div>Hello</div></ListHeader></PreviewList> |
<search>
A Search widget component responsible for search functionality.
The following attributes are applicable:
An URL suffix defining a page item address.
Example:
If you set pageItem="page" as shown in code example below, then your search URL may look like this:
https://your_instanse_url/page?searchQuery
A text inside the search field.
(non-mandatory attribute) Define a custom title instead of a default one.
To use a custom title, please set a showTitle attribute equal to true first.
An URL suffix defining an page item address .
Example:
If you set pageItem="page" as shown in code example below, then your search URL may look like this:
https://your_instanse_url/page?searchQuery
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<search search_url='search' showTitle=true size='lg' title='A custom title' placeholder='Your search request' pageItem='page'/> |
<sidemenu>
This element adds a side-menu.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<SideMenu
parents_depth="..."
children_depth="..."
include_categories="..."
include_items="..." /> |