Dashboard minor fixes and icons

This commit is contained in:
Jose Gonzalez 2023-03-07 00:15:26 +01:00
parent 5ecc3470e2
commit a10e79f663
3 changed files with 48 additions and 37 deletions

View File

@ -60,7 +60,7 @@ $form = [
'id' => 'form-update-dashboard', 'id' => 'form-update-dashboard',
'action' => $url, 'action' => $url,
'onsubmit' => 'return false;', 'onsubmit' => 'return false;',
'class' => 'modal-dashboard', 'class' => 'filter-list-adv',
'enctype' => 'multipart/form-data', 'enctype' => 'multipart/form-data',
'method' => 'POST', 'method' => 'POST',
]; ];
@ -83,22 +83,6 @@ $inputs = [
'maxlength' => 35, 'maxlength' => 35,
], ],
], ],
[
'block_id' => 'private',
'direct' => 1,
'block_content' => [
[
'label' => __('Private'),
'arguments' => [
'name' => 'private',
'id' => 'private',
'type' => 'switch',
'value' => $private,
'onclick' => 'showGroup()',
],
],
],
],
[ [
'block_id' => 'group', 'block_id' => 'group',
'direct' => 1, 'direct' => 1,
@ -118,6 +102,22 @@ $inputs = [
], ],
], ],
], ],
[
'block_id' => 'private',
'direct' => 1,
'block_content' => [
[
'label' => __('Private'),
'arguments' => [
'name' => 'private',
'id' => 'private',
'type' => 'switch',
'value' => $private,
'onclick' => 'showGroup()',
],
],
],
],
[ [
'label' => __('Favourite'), 'label' => __('Favourite'),
'arguments' => [ 'arguments' => [

View File

@ -37,11 +37,12 @@ $queryFull = [
$urlFull = $url.'&'.http_build_query($queryFull); $urlFull = $url.'&'.http_build_query($queryFull);
$fullscreen['text'] = '<a id="full_screen_link" href="'.$urlFull.'">'; $fullscreen['text'] = '<a id="full_screen_link" href="'.$urlFull.'">';
$fullscreen['text'] .= html_print_image( $fullscreen['text'] .= html_print_image(
'images/full_screen.png', 'images/fullscreen@svg.svg',
true, true,
[ [
'title' => __('Full screen mode'), 'title' => __('Full screen mode'),
'class' => 'invert_filter', 'style' => 'margin-top: 5px',
'class' => 'main_menu_icon invert_filter',
] ]
); );
$fullscreen['text'] .= '</a>'; $fullscreen['text'] .= '</a>';
@ -51,11 +52,11 @@ $queryNormal = ['dashboardId' => $dashboardId];
$urlNormal = $url.'&'.http_build_query($queryNormal); $urlNormal = $url.'&'.http_build_query($queryNormal);
$normalscreen['text'] = '<a href="'.$urlNormal.'">'; $normalscreen['text'] = '<a href="'.$urlNormal.'">';
$normalscreen['text'] .= html_print_image( $normalscreen['text'] .= html_print_image(
'images/normal_screen.png', 'images/exit_fullscreen@svg.svg',
true, true,
[ [
'title' => __('Back to normal mode'), 'title' => __('Back to normal mode'),
'class' => 'invert_filter', 'class' => 'main_menu_icon invert_filter',
] ]
); );
$normalscreen['text'] .= '</a>'; $normalscreen['text'] .= '</a>';
@ -74,11 +75,12 @@ $options['text'] .= 'show_option_dialog('.json_encode(
); );
$options['text'] .= ')\'>'; $options['text'] .= ')\'>';
$options['text'] .= html_print_image( $options['text'] .= html_print_image(
'images/setup.png', 'images/configuration@svg.svg',
true, true,
[ [
'title' => __('Options'), 'title' => __('Options'),
'class' => 'invert_filter', 'style' => 'margin-top: 5px',
'class' => 'main_menu_icon invert_filter',
] ]
); );
$options['text'] .= '</a>'; $options['text'] .= '</a>';
@ -86,11 +88,12 @@ $options['text'] .= '</a>';
// Button for back to list dashboards. // Button for back to list dashboards.
$back_to_dashboard_list['text'] = '<a href="'.$url.'">'; $back_to_dashboard_list['text'] = '<a href="'.$url.'">';
$back_to_dashboard_list['text'] .= html_print_image( $back_to_dashboard_list['text'] .= html_print_image(
'images/list.png', 'images/logs@svg.svg',
true, true,
[ [
'title' => __('Back to dashboards list'), 'title' => __('Back to dashboards list'),
'class' => 'invert_filter', 'style' => 'margin-top: 5px',
'class' => 'main_menu_icon invert_filter',
] ]
); );
$back_to_dashboard_list['text'] .= '</a>'; $back_to_dashboard_list['text'] .= '</a>';
@ -113,7 +116,8 @@ $slides['text'] .= html_print_image(
true, true,
[ [
'title' => __('Slides mode'), 'title' => __('Slides mode'),
'class' => 'invert_filter', 'style' => 'margin-top: 5px',
'class' => 'main_menu_icon invert_filter',
] ]
); );
$slides['text'] .= '</a>'; $slides['text'] .= '</a>';
@ -130,11 +134,12 @@ $publicUrl = ui_get_full_url(
); );
$publiclink['text'] = '<a id="public_link" href="'.$publicUrl.'" target="_blank">'; $publiclink['text'] = '<a id="public_link" href="'.$publicUrl.'" target="_blank">';
$publiclink['text'] .= html_print_image( $publiclink['text'] .= html_print_image(
'images/camera_mc.png', 'images/item-icon.svg',
true, true,
[ [
'title' => __('Show link to public dashboard'), 'title' => __('Show link to public dashboard'),
'class' => 'invert_filter', 'style' => 'margin-top: 5px',
'class' => 'main_menu_icon invert_filter',
] ]
); );
$publiclink['text'] .= '</a>'; $publiclink['text'] .= '</a>';
@ -195,10 +200,16 @@ $combo_dashboard['text'] .= html_print_select(
$combo_dashboard['text'] .= '</form>'; $combo_dashboard['text'] .= '</form>';
// Edit mode. // Edit mode.
$enable_disable['text'] = html_print_checkbox_switch( $enable_disable['text'] = html_print_div(
'edit-mode', [
1, 'style' => 'margin-top: 10px;',
false, 'content' => html_print_checkbox_switch(
'edit-mode',
1,
false,
true
),
],
true true
); );

View File

@ -157,9 +157,9 @@ if (empty($dashboards) === true) {
$urlFull .= '&'.\http_build_query($dataQueryFull); $urlFull .= '&'.\http_build_query($dataQueryFull);
$data['full_screen'] = '<a href="'.$urlFull.'">'; $data['full_screen'] = '<a href="'.$urlFull.'">';
$data['full_screen'] .= \html_print_image( $data['full_screen'] .= \html_print_image(
'images/fullscreen.png', 'images/fullscreen@svg.svg',
true, true,
['class' => 'invert_filter'] ['class' => 'main_menu_icon invert_filter']
); );
$data['full_screen'] .= '</a>'; $data['full_screen'] .= '</a>';
@ -175,7 +175,7 @@ if (empty($dashboards) === true) {
]; ];
$urlCopy = $urlDashboard.'&'.\http_build_query($dataQueryCopy); $urlCopy = $urlDashboard.'&'.\http_build_query($dataQueryCopy);
$data['copy'] = '<a href="'.$urlCopy.'">'; $data['copy'] = '<a href="'.$urlCopy.'">';
$data['copy'] .= html_print_image('images/copy.png', true, ['class' => 'invert_filter']); $data['copy'] .= html_print_image('images/copy.svg', true, ['class' => 'main_menu_icon invert_filter']);
$data['copy'] .= '</a>'; $data['copy'] .= '</a>';
$dataQueryDelete = [ $dataQueryDelete = [
@ -187,9 +187,9 @@ if (empty($dashboards) === true) {
$data['delete'] = '<a href="'.$urlDelete; $data['delete'] = '<a href="'.$urlDelete;
$data['delete'] .= '" onclick="javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;">'; $data['delete'] .= '" onclick="javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;">';
$data['delete'] .= \html_print_image( $data['delete'] .= \html_print_image(
'images/cross.png', 'images/delete.svg',
true, true,
['class' => 'invert_filter'] ['class' => 'main_menu_icon invert_filter']
); );
$data['delete'] .= '</a>'; $data['delete'] .= '</a>';
} }