Struct ::exo::dom::Timeline

Overview

Timeline dom node.

This node is used to show a timeline based of a table from a table. Supported fields of this node are:

  • id: The id of this node
  • name: The name to display
  • status: The stati where the node should be shown
  • rights: One of the rights needed to show the node
  • edit: Defines the edit state of the node
  • style: The style which should be applied ot the node
  • layout: The tineline visualisaton either vertical or horizontal
  • record: Define a different record for which the timeline should be shown
  • variable: The ident of the table variable to show, ot the name of the dyn_workflow
  • icon: The column ident of the icon to show
  • title: The column ident of the title to show
  • subtitle: The column ident of the subtitle to show
  • reference: The column ident of the reference to show before the title
  • content: The column ident of the content to show

Within the layouter this timeline can be used like this:

<timeline variable="table" icon="icon_col" title="title_col" content="col_info" />

Methods

fn new() -> Timeline

Creates a new Timeline dom element.

Example

let node = exo::dom::Timeline::new();
node.name = "Your Data";
node.layout = "horizontal";

Protocols

protocol partial_eq
if value == b { }

Allows for partial equality operations to work.

protocol string_debug
println("{:?}", value)

Allows the value to be debug printed.

protocol string_display
println("{}", value)

Allows the value to be display printed.

protocol get id
let output = value.id

Get the id of the node as String. A node Id should be unique inside the complete dom.

Example

let node = exo::dom::Timeline::new();
node.id = "id_123456";
assert_eq!(node.id, "id_123456");
protocol set id
value.id = input

Set the id of the node as String. A node Id should be unique inside the complete dom.

Example

let node = exo::dom::Timeline::new();
node.id = "id_123456";
assert_eq!(node.id, "id_123456");
protocol get name
let output = value.name

Get the name of the node as String. The name is used to display a title or main text.

Example

let node = exo::dom::Timeline::new();
node.name = "Click Here";
assert_eq!(node.name, "Click Here");
protocol set name
value.name = input

Get the name of the node as String. The name is used to display a title or main text.

Example

let node = exo::dom::Timeline::new();
node.name = "Click Here";
assert_eq!(node.name, "Click Here");
protocol get status
let output = value.status

Get the different status of the node as Vec<String>. This node and all it's child will only be displayed, when no status is set or the record has any of the given stati.

Example

let node = exo::dom::Timeline::new();
node.status = ["new", "released"];
assert!(node.status.iter().any(|s| s == "new"));
protocol set status
value.status = input

Set the status of the node as Vec<String>. This node and all it's child will only be displayed, when no status is set or the record has any of the given stati.

Example

let node = exo::dom::Timeline::new();
node.status = ["new", "released"];
assert!(node.status.iter().any(|s| s == "new"));
protocol get edit
let output = value.edit

Get the edit status of the node as Option<bool>. The edit mode can be set as true or false. When the edit mode is not set, it takes the system edit state.

Example

let node = exo::dom::Timeline::new();
node.edit = Some(false);
assert_eq!(node.edit, Some(false));
protocol set edit
value.edit = input

Set the edit status of the node as Option<bool>. The edit mode can be set as true or false. When the edit mode is not set, it takes the system edit state.

Example

let node = exo::dom::Timeline::new();
node.edit = Some(false);
assert_eq!(node.edit, Some(false));
protocol get style
let output = value.style

Get the style of the node as String.

Example

let node = exo::dom::Timeline::new();
node.style = "color: red;";
assert_eq!(node.style, "color: red;");
protocol set style
value.style = input

Set the style of the node as String.

Example

let node = exo::dom::Timeline::new();
node.style = "color: red;";
assert_eq!(node.style, "color: red;");
protocol get rights
let output = value.rights

Get the different rights of the node as Vec<String>. This node and all it's child will only be displayed, when no rights are set or the user has one of the rights.

Example

let node = exo::dom::Timeline::new();
node.rights = ["user_right", "can_release"];
assert!(node.rights.iter().any(|s| s == "can_release"));
protocol set rights
value.rights = input

Get the different rights of the node as Vec<String>. This node and all it's child will only be displayed, when no rights are set or the user has one of the rights.

Example

let node = exo::dom::Timeline::new();
node.rights = ["user_right", "can_release"];
assert!(node.rights.iter().any(|s| s == "can_release"));
protocol get layout
let output = value.layout

Get the timeline layout.

Example

let node = exo::dom::Timeline::new();
node.layout = "horizontal";
assert_eq!(node.layout, "Horizontal");
protocol set layout
value.layout = input

Set the timeline layout.

Example

let node = exo::dom::Timeline::new();
node.layout = "horizontal";
assert_eq!(node.layout, "Horizontal");
protocol get record
let output = value.record

Get the optional record reference.

Example

let node = exo::dom::Timeline::new();
node.record = "463db135-d8f6-44d0-a320-5d80886ae296";
assert_eq!(node.record, Some("463db135-d8f6-44d0-a320-5d80886ae296"));
protocol set record
value.record = input

Set the optional record reference.

Example

let node = exo::dom::Timeline::new();
node.record = "463db135-d8f6-44d0-a320-5d80886ae296";
assert_eq!(node.record, Some("463db135-d8f6-44d0-a320-5d80886ae296"));
protocol get variable
let output = value.variable

Get the timeline variable.

Example

let node = exo::dom::Timeline::new();
node.variable = "test_var";
assert_eq!(node.variable, "test_var");
protocol set variable
value.variable = input

Set the timeline variable.

Example

let node = exo::dom::Timeline::new();
node.variable = "test_var";
assert_eq!(node.variable, "test_var");
protocol get icon
let output = value.icon

Get the timeline icon column.

Example

let node = exo::dom::Timeline::new();
node.icon = "icon_col";
assert_eq!(node.icon, "icon_col");
protocol set icon
value.icon = input

Set the timeline icon column.

Example

let node = exo::dom::Timeline::new();
node.icon = "icon_col";
assert_eq!(node.icon, "icon_col");
protocol get title
let output = value.title

Get the timeline title column.

Example

let node = exo::dom::Timeline::new();
node.title = "title_col";
assert_eq!(node.title, "title_col");
protocol set title
value.title = input

Set the timeline title column.

Example

let node = exo::dom::Timeline::new();
node.title = "title_col";
assert_eq!(node.title, "title_col");
protocol get subtitle
let output = value.subtitle

Get the timeline subtitle column.

Example

let node = exo::dom::Timeline::new();
node.subtitle = "sub_col";
assert_eq!(node.subtitle, "sub_col");
protocol set subtitle
value.subtitle = input

Set the timeline subtitle column.

Example

let node = exo::dom::Timeline::new();
node.subtitle = "sub_col";
assert_eq!(node.subtitle, "sub_col");
protocol get reference
let output = value.reference

Get the timeline reference column.

Example

let node = exo::dom::Timeline::new();
node.reference = "ref_col";
assert_eq!(node.reference, "ref_col");
protocol set reference
value.reference = input

Set the timeline reference column.

Example

let node = exo::dom::Timeline::new();
node.reference = "ref_col";
assert_eq!(node.reference, "ref_col");
protocol get content
let output = value.content

Get the timeline content column.

Example

let node = exo::dom::Timeline::new();
node.content = "content_col";
assert_eq!(node.content, "content_col");
protocol set content
value.content = input

Set the timeline reference column.

Example

let node = exo::dom::Timeline::new();
node.content = "content_col";
assert_eq!(node.content, "content_col");