2018-08-19 17:45:49 +02:00
|
|
|
<div id="dashboard" class="container">
|
2018-05-20 21:48:43 +02:00
|
|
|
<div class="row">
|
2020-02-05 20:59:33 +01:00
|
|
|
<div class="col-md-7">
|
2018-06-03 21:51:47 +02:00
|
|
|
|
2018-10-01 16:34:28 +02:00
|
|
|
<!-- Good message -->
|
|
|
|
<div>
|
2019-05-18 11:54:39 +02:00
|
|
|
<h2 id="hello-message" class="pt-0">
|
|
|
|
<span class="fa fa-hand-spock-o"></span><span><?php echo $L->g('hello') ?></span>
|
|
|
|
</h2>
|
2018-10-01 16:34:28 +02:00
|
|
|
<script>
|
|
|
|
$( document ).ready(function() {
|
2018-10-01 19:05:24 +02:00
|
|
|
$("#hello-message").fadeOut(1000, function() {
|
2018-10-01 17:15:29 +02:00
|
|
|
var date = new Date()
|
|
|
|
var hours = date.getHours()
|
2018-10-20 21:34:04 +02:00
|
|
|
if (hours > 6 && hours < 12) {
|
2019-05-18 11:54:39 +02:00
|
|
|
$(this).html('<span class="fa fa-sun-o"></span><?php echo $L->g('good-morning') ?>');
|
2018-10-20 21:34:04 +02:00
|
|
|
} else if (hours > 12 && hours < 18) {
|
2019-05-18 11:54:39 +02:00
|
|
|
$(this).html('<span class="fa fa-sun-o"></span><?php echo $L->g('good-afternoon') ?>');
|
2018-10-20 21:34:04 +02:00
|
|
|
} else if (hours > 18 && hours < 22) {
|
2019-05-18 11:54:39 +02:00
|
|
|
$(this).html('<span class="fa fa-moon-o"></span><?php echo $L->g('good-evening') ?>');
|
2018-10-20 21:34:04 +02:00
|
|
|
} else {
|
2019-05-18 11:54:39 +02:00
|
|
|
$(this).html('<span class="fa fa-moon-o"></span><span><?php echo $L->g('good-night') ?></span>');
|
2018-10-01 17:15:29 +02:00
|
|
|
}
|
|
|
|
}).fadeIn(1000);
|
2018-10-01 16:34:28 +02:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</div>
|
|
|
|
|
2018-06-03 21:51:47 +02:00
|
|
|
<!-- Quick Links -->
|
2020-02-15 11:40:40 +01:00
|
|
|
<div class="container border-bottom pb-5" id="jsclippyContainer">
|
2019-09-25 20:16:45 +02:00
|
|
|
|
2018-06-03 21:51:47 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
2019-09-25 20:16:45 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<select id="jsclippy" class="clippy" name="state"></select>
|
|
|
|
</div>
|
2018-06-03 21:51:47 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-09-25 20:16:45 +02:00
|
|
|
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
var clippy = $("#jsclippy").select2({
|
2019-10-05 21:29:32 +02:00
|
|
|
placeholder: "<?php $L->p('Start typing to see a list of suggestions') ?>",
|
2019-09-25 20:16:45 +02:00
|
|
|
allowClear: true,
|
|
|
|
width: "100%",
|
|
|
|
theme: "bootstrap4",
|
|
|
|
minimumInputLength: 2,
|
2020-02-15 11:40:40 +01:00
|
|
|
dropdownParent: "#jsclippyContainer",
|
2020-05-26 15:50:34 +02:00
|
|
|
language: {
|
|
|
|
inputTooShort: function () { return ''; }
|
|
|
|
},
|
2019-09-25 20:16:45 +02:00
|
|
|
ajax: {
|
|
|
|
url: HTML_PATH_ADMIN_ROOT+"ajax/clippy",
|
|
|
|
data: function (params) {
|
|
|
|
var query = { query: params.term }
|
|
|
|
return query;
|
|
|
|
},
|
|
|
|
processResults: function (data) {
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
templateResult: function(data) {
|
2020-05-26 15:50:34 +02:00
|
|
|
// console.log(data);
|
|
|
|
if (typeof data.id === 'undefined') {
|
|
|
|
return '';
|
|
|
|
}
|
2019-09-25 20:16:45 +02:00
|
|
|
var html = '';
|
|
|
|
if (data.type=='menu') {
|
|
|
|
html += '<a href="'+data.url+'"><div class="search-suggestion">';
|
|
|
|
html += '<span class="fa fa-'+data.icon+'"></span>'+data.text+'</div></a>';
|
|
|
|
} else {
|
|
|
|
html += '<div class="search-suggestion">';
|
2019-10-05 21:29:32 +02:00
|
|
|
html += '<div class="search-suggestion-item">'+data.text+' <span class="badge badge-pill badge-light">'+data.type+'</span></div>';
|
2019-09-25 20:16:45 +02:00
|
|
|
html += '<div class="search-suggestion-options">';
|
2019-12-07 18:11:41 +01:00
|
|
|
html += '<a target="_blank" href="'+DOMAIN_PAGES+data.id+'"><?php $L->p('view') ?></a>';
|
|
|
|
html += '<a class="ml-2" href="'+DOMAIN_ADMIN+'edit-content/'+data.id+'"><?php $L->p('edit') ?></a>';
|
2019-09-25 20:16:45 +02:00
|
|
|
html += '</div></div>';
|
|
|
|
}
|
|
|
|
|
|
|
|
return html;
|
|
|
|
},
|
|
|
|
escapeMarkup: function(markup) {
|
|
|
|
return markup;
|
|
|
|
}
|
|
|
|
}).on("select2:closing", function(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
}).on("select2:closed", function(e) {
|
|
|
|
clippy.select2("open");
|
|
|
|
});
|
|
|
|
clippy.select2("open");
|
|
|
|
|
|
|
|
});
|
|
|
|
</script>
|
2018-06-03 21:51:47 +02:00
|
|
|
</div>
|
|
|
|
<div class="container mt-4">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
|
|
|
<a class="quick-links text-center" target="_blank" href="https://docs.bludit.com">
|
2019-05-18 11:54:39 +02:00
|
|
|
<div class="fa fa-compass quick-links-icons"></div>
|
2018-08-08 00:16:35 +02:00
|
|
|
<div><?php $L->p('Documentation') ?></div>
|
2018-06-03 21:51:47 +02:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="col border-left border-right">
|
|
|
|
<a class="quick-links text-center" target="_blank" href="https://forum.bludit.org">
|
2019-05-18 11:54:39 +02:00
|
|
|
<div class="fa fa-support quick-links-icons"></div>
|
2018-08-08 00:16:35 +02:00
|
|
|
<div><?php $L->p('Forum support') ?></div>
|
2018-06-03 21:51:47 +02:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="col">
|
|
|
|
<a class="quick-links text-center" target="_blank" href="https://gitter.im/bludit/support">
|
2019-05-18 11:54:39 +02:00
|
|
|
<div class="fa fa-comments quick-links-icons"></div>
|
2018-08-08 00:16:35 +02:00
|
|
|
<div><?php $L->p('Chat support') ?></div>
|
2018-06-03 21:51:47 +02:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php Theme::plugins('dashboard') ?>
|
2015-06-26 06:31:53 +02:00
|
|
|
</div>
|
2018-08-01 15:07:37 +02:00
|
|
|
<div class="col-md-5">
|
2015-06-26 06:31:53 +02:00
|
|
|
|
2018-05-20 21:48:43 +02:00
|
|
|
<!-- Notifications -->
|
2018-06-03 21:51:47 +02:00
|
|
|
<ul class="list-group list-group-striped b-0">
|
2018-08-08 00:16:35 +02:00
|
|
|
<li class="list-group-item pt-0"><h4><?php $L->p('Notifications') ?></h4></li>
|
2018-05-20 21:48:43 +02:00
|
|
|
<?php
|
2018-06-10 13:54:55 +02:00
|
|
|
$logs = array_slice($syslog->db, 0, NOTIFICATIONS_AMOUNT);
|
2018-05-20 21:48:43 +02:00
|
|
|
foreach ($logs as $log) {
|
|
|
|
$phrase = $L->g($log['dictionaryKey']);
|
|
|
|
echo '<li class="list-group-item">';
|
|
|
|
echo $phrase;
|
|
|
|
if (!empty($log['notes'])) {
|
2017-09-08 00:43:53 +02:00
|
|
|
echo ' « <b>'.$log['notes'].'</b> »';
|
2017-06-09 20:30:13 +02:00
|
|
|
}
|
2018-06-03 21:51:47 +02:00
|
|
|
echo '<br><span class="notification-date"><small>';
|
2017-06-09 20:30:13 +02:00
|
|
|
echo Date::format($log['date'], DB_DATE_FORMAT, NOTIFICATIONS_DATE_FORMAT);
|
2018-08-08 00:16:35 +02:00
|
|
|
echo ' [ '.$log['username'] .' ]';
|
2018-06-03 21:51:47 +02:00
|
|
|
echo '</small></span>';
|
2017-06-09 20:30:13 +02:00
|
|
|
echo '</li>';
|
|
|
|
}
|
2018-05-20 21:48:43 +02:00
|
|
|
?>
|
|
|
|
</ul>
|
2017-12-20 20:37:17 +01:00
|
|
|
|
2015-07-31 02:49:29 +02:00
|
|
|
</div>
|
2015-10-19 00:45:58 +02:00
|
|
|
</div>
|
2018-08-01 15:07:37 +02:00
|
|
|
</div>
|