CMS
Version 3.9
color_palettes.inc
Go to the documentation of this file.
1
<?php
2
Fakoli::using
(
"svg_charts"
);
3
$menu_item
=
"Color Palettes"
;
4
5
$palettes
= Query::create(
'ColorPalette'
,
"ORDER BY name"
)->execute();
6
7
$colorsTemplate
=
""
;
8
for
($i = 1; $i < 16; ++$i)
9
{
10
$colorsTemplate
.=
"<span class='swatch' style='background-color: {data_series_$i}' title='{data_series_$i}'></span>"
;
11
}
12
13
$table
=
new
DataListView(
$palettes
,
"color_palettes"
);
14
$table
->column(
"Palette Name"
,
"<a href='color_palette_form?palette_id={palette_id}'>{name}</a>"
)
15
->column(
"Background"
,
"<span class='swatch' style='background-color: {background}'></span> {background}"
,
false
,
"text-align: center"
)
16
->column(
"Stroke"
,
"<span class='swatch' style='background-color: {stroke}'></span> {stroke}"
,
false
,
"text-align: center"
)
17
->column(
"Button"
,
"<span class='swatch' style='background-color: {stroke}'></span> {stroke}"
,
false
,
"text-align: center"
)
18
->column(
"Data Series Colors"
,
$colorsTemplate
,
false
,
"text-align: center"
);
19
20
$table
->paginate =
false
;
21
$table
->sortable =
false
;
22
$table
->filter =
false
;
23
$table
->emptyMessage =
"No color palettes have been created"
;
24
25
$script
.=
$table
->writeScript();
26
$table
->drawView();
27
?>
28
<br/>
29
<a
class
=
'button'
href=
'color_palette_form'
>Add a Color Palette</a>
$colorsTemplate
$colorsTemplate
Definition:
color_palettes.inc:7
$palettes
$palettes
Definition:
color_palettes.inc:5
$menu_item
$menu_item
Definition:
color_palettes.inc:3
$table
for($i=1; $i< 16;++$i) $table
Definition:
color_palettes.inc:13
$script
$script
Definition:
color_palettes.inc:25
Fakoli\using
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition:
core.inc:116
code
cms.sonjara.com
cms
components
svg_charts
admin
color_palettes.inc
Generated on Tue Mar 23 2021 15:36:14 for CMS by
1.9.1