Shell for UI pages, some placeholder dashboard stats
This commit is contained in:
@ -2,6 +2,9 @@
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg order-lg-first">
|
||||
<ul class="nav nav-tabs border-0 flex-column flex-lg-row">
|
||||
<li class="nav-item">
|
||||
<a href="/" class="nav-link"><i class="fe fe-home"></i> Dashboard</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a href="#" class="nav-link" data-toggle="dropdown"><i class="fe fe-monitor"></i> Hosts</a>
|
||||
<div class="dropdown-menu dropdown-menu-arrow">
|
||||
@ -22,4 +25,4 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -12,22 +12,13 @@ module.exports = Mn.View.extend({
|
||||
template: template,
|
||||
|
||||
ui: {
|
||||
link: 'a'
|
||||
links: 'a'
|
||||
},
|
||||
|
||||
events: {
|
||||
'click @ui.link': function (e) {
|
||||
'click @ui.links': function (e) {
|
||||
e.preventDefault();
|
||||
let href = $(e.currentTarget).attr('href');
|
||||
|
||||
switch (href) {
|
||||
case '/':
|
||||
Controller.showDashboard();
|
||||
break;
|
||||
case '/users':
|
||||
Controller.showUsers();
|
||||
break;
|
||||
}
|
||||
Controller.navigate($(e.currentTarget).attr('href'), true);
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user