A simple three column table template to put in your business dashboards. It has SelectableItem activated and could be used to link to other widgets.
If you want a DATE/Time column to be a SelectableItem, use another template, or use:
1 |
selectvalue="{moment($T.row[$P.selectColumn]).toDate().floor('day').toString('yyyy-MM-dd HH:mm:ss')},{new Date(moment($T.row[$P.selectColumn]).toDate().setSeconds(1)).ceil('day').toString('yyyy-MM-dd HH:mm:ss')}" |
Template:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
<!--DO NOT USE FOR DATE SELECTION. User other Template for that--> <!--SETTINGS--> {#param name=selectColumn value="Order Nr"} {#param name=dr_table_3_col_idColumn value="Order Nr"} {#param name=dr_table_3_col_property1 value="Namn"} {#param name=dr_table_3_col_property2 value="Totalsumma"} {#param name=dr_table_3_col_header1 value="Header1"} {#param name=dr_table_3_col_header2 value="Header2"} {#param name=dr_table_3_col_header3 value="Header3"} {#param name=dr_table_3_col_header_bgcolor value="#4CAF50"} {#param name=dr_table_3_col_header_textcolor value="#ffffff"} <!--CHANGE COLOR ON ROWS: Background color and Text color for nth-child(odd): Row 35 Background color and Text color for nth-child(even): Row 36 END SETTINGS--> {#literal} <style> .dr-table-3-col { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; border-collapse: collapse; width: 100%; } .dr-table-3-col td, .dr-table-3-col th { border: 1px solid #ddd; text-align: left; padding: 8px; } .dr-table-3-col tr {background-color: lightgrey; color: #darkgrey;} .dr-table-3-col tr:nth-child(even){background-color: white; color: #darkgrey; } .dr-table-3-col tr:hover {background-color: #4CAF50; color: white;} .dr-table-3-col th { padding-top: 12px; padding-bottom: 12px; /* background-color: #4CAF50; color: white;*/ } </style> {#/literal} <table class="dr-table-3-col"> <tr style="background-color: {$P["dr_table_3_col_header_bgcolor"]}; color: {$P["dr_table_3_col_header_textcolor"]};"> <th>{$P.dr_table_3_col_header1}</th> <th>{$P.dr_table_3_col_header2}</th> <th>{$P.dr_table_3_col_header3}</th> </tr> {#foreach $T.rows as row} <tr class="SelectableItem" selectcolumn="{$P.selectColumn}" selectvalue="{$T.row[$P.selectColumn]}"> <td>{fixAndFormatIfNumber($T.row[$P.dr_table_3_col_idColumn])}</td> <td>{$T.row[$P.dr_table_3_col_property1]}</td> <td>{fixAndFormatIfNumber($T.row[$P.dr_table_3_col_property2])}</td> </tr> {#/for} </table> <!--Author: digrealtime.com--> <!--Created: 2016-06-21--> <!--Modified: 2016-06-21--> |