Cards
Cards is a gh-element that allows to display application items as cards. To be more precise, it can display view of items in it. This allows you to display all items on one page.
Functional Characteristics
Since this is the element that displays items or their parts, it has a very universal use. For example, you can use cards to display products as in an online store or pictures in an online art gallery.
Value Format
This is one of that elements that does not have field value.
Element Options
The element settings contains three groups of settings.
Field Settings
Cards settings contains of lots of different options for configuring the element.
Name | Description |
---|---|
App | allows to select the source application; details... |
View name | allows to select the view that will be displayed in cards; details... |
Width Cart | allows to select the width of cards; details... |
Height Cart | allows to select the height of cards; details... |
Selected item | allows to select cards; details... |
Sort cards by | allows to select the field by which items will be sorted; details... |
Items order | allows to select the type of cards order; details... |
card_action | allows to select the action after clicking on card; details... |
View name | allows to select the view that will be opened after the card action; details... |
Application | allows to select the source application from which the field for the message will be selected; details... |
Field Send Message | allows to select the field to which the message wll be sent; details... |
App
This is the source application from which the fields will be taken to configure the current gh-element.
View Name For Displaying
The first view name function allows to select the view that will be displayed in cards.
Width Cart and Height Cart
Due to this functions you can customize height and width of cards.
Selected Item
This function allows to configure whether item cards can be selected or not.
Sort Cards By
Select the field by which item cards will be sorted.
Items Order
Due to this function you can set in which order sorted items will be displayed. It works only when the field for sorting is selected.
Card Action
This is an action that will happens after clicking on an item card. There are three variants of action:
- Open Item
- View Dialog
- Send Message
If the action type does not selected, nothing will happens.
View Name For Action
This is the view that will be opened after Open Item and View Dialog action.
Application
This is the application to which the message will be sent.
Field Send Message
This is the field from selected application to which the message will be sent.
Cards Filter and Table Groupe
These two groups of settings allow you to sort and group the items to be displayed.
Name | Description |
---|---|
Table Groupe | allows to make the group of cards; details... |
Cards Filter | allows to add filters that customize which items will be displayed in the cards; details... |
Table Groupe
This function allows to make groups by values of the selected field.
Cards Filter
Add filters to configure which items will be displayed as cards.
Element Style
The cards have unique appearance. It can be configured using standard style settings. Also it depends of the element interpretation type.
General Settings
As usual the only additional setting is located in general style settings.
Name | Description |
---|---|
Interpretation type | allows to change element interpretation type |
Interpretation Type
These types of interpretation are different from those given in end of article. They allow you to adapt cards to different locations. There are three types of such places:
- Document
- Table
- Form
Data Model
Since the element has many settings, the data model has many properties.
{
"data_model": {
"app_id": "28752",
"cards_settings": {
"action": "send_message",
"items_order": 1,
"sort_cards_field": 0,
"view_id": "1528082"
},
"field_groupe": "",
"filters_list": [],
"height_carts": "256px",
"interpretation": [],
"selected_item": 1,
"send_message": {
"app_id": "28752",
"field_id": "678845"
},
"view_id": "1528082",
"width_cart": "512px"
}
}
Name | Type | Description |
---|---|---|
app_id | string |
contains ID of the source application |
cards_settings | object |
contains all properties of cards |
action | string |
contains name of the selected card action |
items_order | number |
contains ID of the order of cards |
sort_cards_field | string |
contains ID of field by which cards will be sorted |
view_id | string |
contains ID of the view that will be opened after card action |
field_groupe | string |
contains IDs of fields by which items cards will be grouped |
filters_list | array |
contains filters that configure which items will be displayed |
height_carts | string |
contains value of the cards height |
interpretation | array |
contains all element interpretation types |
selected_item | boolean |
shows whether the cards selection is used or not |
send_message | object |
contains data needed for field message |
app_id | string |
contains ID of the destination application to which the message will be sent |
field_id | string |
contains ID of the message destination field |
view_id | string |
contains ID of view that is displayed in cards |
width_cart | string |
contains value of the card width |
Filtration
Cards cannot be filtered using any filters other than its settings.
Interpretation
The current item has several not very diverse types of interpretation.
Default
The first type of interpretation displays items as cards. It uses virtual repeat. This type is mainly for HTML pages, so as not to overload them.
Icon
This type of interpretation displays an icon instead of usual element.
No Limit
This is the same type of interpretation as the first one but without virtual repeat. It is useful for document forming when you need to save a large number of elements in a document.