Skip to content

Commit 6440598

Browse files
author
Dmytro Lukianenko
committed
[UPD] update dashboard
1 parent b0e60ae commit 6440598

2 files changed

Lines changed: 30 additions & 20 deletions

File tree

manager/media/style/default/css/custom.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ ul.breadcrumbs span::after { margin-left: 2em; font-family: 'Font Awesome 5 Free
208208
/* [ WIDGETS ] */
209209
.widgets .card { margin-bottom: 1rem; margin-right: 0.6rem; border-width: 0; border-radius: 0; background-color: #fff; -webkit-transition: box-shadow .35s; transition: box-shadow .35s; box-shadow: 0 0.1rem 0.3rem 0 rgba(0, 0, 0, 0.075); }
210210
.widgets .card:hover { box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.07); }
211-
.widgets .card-header { padding: .5rem 1rem; font-size: .9rem; color: #616a73; font-weight: 700; border-radius: 0; border: none; border-bottom: 1px solid rgba(0, 0, 0, .05); text-transform: none; background-color: transparent; border-bottom: 1px solid rgba(0, 0, 0, 0.05); }
211+
.widgets .card-header { padding: .5rem 1rem; font-size: .9rem; color: #616a73; fonДивt-weight: 400; border-radius: 0; border: none; border-bottom: 1px solid rgba(0, 0, 0, .05); text-transform: none; background-color: transparent; border-bottom: 1px solid rgba(0, 0, 0, 0.05); }
212212
.widgets .card-header .fa { font-size: .9rem }
213213
.widgets .card-block { padding: 0; }
214214
.widgets .card-block .card-block p { padding: 0 1rem }

manager/media/style/default/snippets/welcome/RecentInfo.php

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
<?php
22
$enable_filter = evo()->getConfig('enable_filter');
33
evo()->setConfig('enable_filter', true);
4-
$_style = ManagerTheme::getStyle();
4+
$_style = ManagerTheme::getStyle();
5+
$wrapActionIcon = function (string $svg, string $class = 'action-icon'): string {
6+
return '<span class="' . $class . '">' . $svg . '</span>';
7+
};
8+
$_style['icon_edit'] = $wrapActionIcon(svg('tabler-file-pencil')->toHtml());
9+
$_style['icon_eye'] = $wrapActionIcon(svg('tabler-eye')->toHtml());
10+
$_style['icon_trash'] = $wrapActionIcon(svg('tabler-trash')->toHtml(), 'action-icon action-icon-trash');
11+
$_style['icon_undo'] = $wrapActionIcon(svg('tabler-arrow-back-up')->toHtml());
12+
$_style['icon_check'] = $wrapActionIcon(svg('tabler-check')->toHtml());
13+
$_style['icon_close'] = $wrapActionIcon(svg('tabler-x')->toHtml());
14+
$_style['icon_info'] = $wrapActionIcon(svg('tabler-info-square-rounded')->toHtml());
515
$contents = \EvolutionCMS\Models\SiteContent::query()->orderBy('editedon','DESC')->limit(10);
616

717
if ($contents->count() < 1) {
@@ -32,8 +42,8 @@
3242
</td>
3343
</tr>';
3444

35-
$btntpl['edit'] = '<a title="[%edit_resource%]" href="index.php?a=27&amp;id=[+id+]" target="main"><i class="'. $_style['icon_edit'] . $_style['icon_size_fix'] . '"></i></a> ';
36-
$btntpl['preview_btn'] = '<a [+preview_disabled+]" title="[%preview_resource%]" target="_blank" href="../index.php?&amp;id=[+id+]"><i class="'. $_style['icon_eye'] . $_style['icon_size_fix'] . '"></i></a> ';
45+
$btntpl['edit'] = '<a title="[%edit_resource%]" href="index.php?a=27&amp;id=[+id+]" target="main">' . $_style['icon_edit'] . '</a> ';
46+
$btntpl['preview_btn'] = '<a [+preview_disabled+]" title="[%preview_resource%]" target="_blank" href="../index.php?&amp;id=[+id+]">' . $_style['icon_eye'] . '</a> ';
3747

3848
$output = array();
3949
foreach ($contents->get()->toArray() as $ph) {
@@ -67,28 +77,28 @@
6777
), $btntpl['preview_btn']);
6878

6979
if (evo()->hasPermission('delete_document')) {
70-
if ($ph['deleted'] == 0) {
71-
$delete_btn = '<a onclick="return confirm(\'[%confirm_delete_record%]\')" title="[%delete_resource%]" href="index.php?a=6&amp;id=[+id+]" target="main"><i class="'. $_style['icon_trash'] . $_style['icon_size_fix'] . '"></i></a> ';
72-
} else {
73-
$delete_btn = '<a onclick="return confirm(\'[%confirm_undelete%]\')" title="[%undelete_resource%]" href="index.php?a=63&amp;id=[+id+]" target="main"><i class="'. $_style['icon_undo'] . $_style['icon_size_fix'] . '"></i></a> ';
74-
}
80+
if ($ph['deleted'] == 0) {
81+
$delete_btn = '<a onclick="return confirm(\'[%confirm_delete_record%]\')" title="[%delete_resource%]" href="index.php?a=6&amp;id=[+id+]" target="main">' . $_style['icon_trash'] . '</a> ';
82+
} else {
83+
$delete_btn = '<a onclick="return confirm(\'[%confirm_undelete%]\')" title="[%undelete_resource%]" href="index.php?a=63&amp;id=[+id+]" target="main">' . $_style['icon_undo'] . '</a> ';
84+
}
7585
$ph['delete_btn'] = str_replace('[+id+]', $docid, $delete_btn);
7686
} else {
7787
$ph['delete_btn'] = '';
7888
}
7989

80-
if ($ph['deleted'] == 1 && $ph['published'] == 0) {
81-
$publish_btn = '<a class="disabled" title="[%publish_resource%]" href="index.php?a=61&amp;id=[+id+]" target="main"><i class="'. $_style['icon_check'] . $_style['icon_size_fix'] . '"></i></i></a> ';
82-
} elseif ($ph['deleted'] == 1 && $ph['published'] == 1) {
83-
$publish_btn = '<a class="disabled" title="[%publish_resource%]" href="index.php?a=61&amp;id=[+id+]" target="main"><i class="'. $_style['icon_close'] . $_style['icon_size_fix'] . '"></i></a> ';
84-
} elseif ($ph['deleted'] == 0 && $ph['published'] == 0) {
85-
$publish_btn = '<a title="[%publish_resource%]" href="index.php?a=61&amp;id=[+id+]" target="main"><i class="'. $_style['icon_check'] . $_style['icon_size_fix'] . '"></i></a> ';
86-
} else {
87-
$publish_btn = '<a title="[%unpublish_resource%]" href="index.php?a=62&amp;id=[+id+]" target="main"><i class="'. $_style['icon_close'] . $_style['icon_size_fix'] . '"></i></a> ';
88-
}
90+
if ($ph['deleted'] == 1 && $ph['published'] == 0) {
91+
$publish_btn = '<a class="disabled" title="[%publish_resource%]" href="index.php?a=61&amp;id=[+id+]" target="main">' . $_style['icon_check'] . '</a> ';
92+
} elseif ($ph['deleted'] == 1 && $ph['published'] == 1) {
93+
$publish_btn = '<a class="disabled" title="[%publish_resource%]" href="index.php?a=61&amp;id=[+id+]" target="main">' . $_style['icon_close'] . '</a> ';
94+
} elseif ($ph['deleted'] == 0 && $ph['published'] == 0) {
95+
$publish_btn = '<a title="[%publish_resource%]" href="index.php?a=61&amp;id=[+id+]" target="main">' . $_style['icon_check'] . '</a> ';
96+
} else {
97+
$publish_btn = '<a title="[%unpublish_resource%]" href="index.php?a=62&amp;id=[+id+]" target="main">' . $_style['icon_close'] . '</a> ';
98+
}
8999

90100
$ph['publish_btn'] = str_replace('[+id+]', $docid, $publish_btn);
91-
$ph['info_btn'] = str_replace('[+id+]', $docid, '<a title="[%resource_overview%]" data-toggle="collapse" data-target=".collapse[+id+]"><i class="'. $_style['icon_info'] . $_style['icon_size_fix'] . '"></i></a>');
101+
$ph['info_btn'] = str_replace('[+id+]', $docid, '<a title="[%resource_overview%]" data-toggle="collapse" data-target=".collapse[+id+]">' . $_style['icon_info'] . '</a>');
92102
$ph['longtitle'] = $ph['longtitle'] == '' ? '(<i>[%not_set%]</i>)' : entities($ph['longtitle']);
93103
$ph['description'] = $ph['description'] == '' ? '(<i>[%not_set%]</i>)' : entities($ph['description']);
94104
$ph['introtext'] = $ph['introtext'] == '' ? '(<i>[%not_set%]</i>)' : entities($ph['introtext']);
@@ -102,4 +112,4 @@
102112
}
103113

104114
evo()->setConfig('enable_filter', $enable_filter);
105-
return implode("\n", $output);
115+
return implode("\n", $output);

0 commit comments

Comments
 (0)