Skip to content

Commit 6299f10

Browse files
committed
Implements #6841 Add Bootstrap icons and make module icons configurable in module.conf.php
1 parent d7960ad commit 6299f10

File tree

21 files changed

+53
-49
lines changed

21 files changed

+53
-49
lines changed

interface/web/admin/lib/module.conf.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
$module['startpage'] = 'admin/server_list.php';
99
$module['tab_width'] = '60';
1010
$module['order'] = '90';
11+
$module['icon'] = 'icon icon-admin';
1112

1213

1314
$items[] = array( 'title' => 'CP Users',

interface/web/client/lib/module.conf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
$module["startpage"] = "client/client_list.php";
77
$module["tab_width"] = '';
88
$module['order'] = '20';
9-
9+
$module['icon'] = 'icon icon-client';
1010

1111
$items[] = array( 'title' => "Edit Client",
1212
'target' => 'content',

interface/web/dashboard/dashlets/modules.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ function show() {
2525
foreach($modules as $mt) {
2626
if(is_file('../' . $mt . '/lib/module.conf.php')) {
2727
if(!preg_match("/^[a-z]{2,20}$/i", $mt)) die('module name contains unallowed chars.');
28+
if(isset($module)) unset($module);
2829
include_once '../' . $mt.'/lib/module.conf.php';
2930
/* We don't want to show the dashboard */
3031
if ($mt != 'dashboard') {
@@ -52,9 +53,12 @@ function show() {
5253
} else {
5354
if(strlen($module_title) > 8) $module_title = substr($module_title, 0, 7).'..';
5455
}
56+
$icon = isset($module['icon']) ? $module['icon'] : 'icon icon-'. $module['name'];
5557
$mod[$module['order'].'-'.$module['name']] = array( 'modules_title' => $module_title,
5658
'modules_startpage' => $module['startpage'],
57-
'modules_name' => $module['name']);
59+
'modules_name' => $module['name'],
60+
'modules_icon' => $icon,
61+
);
5862
}
5963
}
6064
}

interface/web/dashboard/dashlets/templates/modules.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ <h2>{tmpl_var name='available_modules_txt'}</h2>
44
<tmpl_loop name='modules'>
55
<li>
66
<div class='clear'>
7-
<div class='icon icon-{tmpl_var name='modules_name'}'></div>
7+
<div class='{tmpl_var name="modules_icon"}'></div>
88
<div class='left'>
99
<div class='title'>{tmpl_var name='modules_title'}</div>
1010
</div>

interface/web/dashboard/lib/module.conf.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,5 @@
3333
$module['startpage'] = 'dashboard/dashboard.php';
3434
$module['tab_width'] = '';
3535
$module['order'] = '1';
36+
$module['icon'] = 'icon icon-dashboard';
3637

37-
//$items = array();
38-
//
39-
//$items[] = array( 'title' => 'Dashboard 1',
40-
// 'target' => 'content',
41-
// 'link' => 'dashboard/dashboard.php');
42-
//
43-
//$module['nav'][] = array( 'title' => 'Dashboard 2',
44-
// 'open' => 1,
45-
// 'items' => $items);
46-
47-
48-
49-
?>

interface/web/dns/lib/module.conf.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
$module["startpage"] = "dns/dns_soa_list.php";
99
$module["tab_width"] = '';
1010
$module['order'] = '50';
11+
$module['icon'] = 'icon icon-dns';
1112

1213

1314
$items[] = array( 'title' => "Add DNS Zone",
@@ -44,12 +45,6 @@
4445
'target' => 'content',
4546
'link' => 'dns/dns_soa_list.php',
4647
'html_id' => 'dns_soa_list');
47-
/*
48-
$items[] = array( 'title' => "A-Records",
49-
'target' => 'content',
50-
'link' => 'dns/dns_a_list.php',
51-
'html_id' => 'dns_a_list');
52-
*/
5348

5449

5550
$module["nav"][] = array( 'title' => 'DNS',
@@ -71,10 +66,3 @@
7166

7267
unset($items);
7368
}
74-
75-
76-
77-
78-
79-
80-
?>

interface/web/help/lib/module.conf.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
//* The width of the tab. Normally you should leave this empty and let the browser define the width automatically.
3636
$module['tab_width'] = '';
37+
$module['icon'] = 'icon icon-help';
3738

3839

3940
//*** Menu Definition *****************************************
@@ -90,8 +91,6 @@
9091
}
9192
//* -- end of the FAQ menu section
9293

93-
94-
9594
if($_SESSION['s']['user']['typ'] == 'admin') {
9695
//* make sure that the items array is empty
9796
$items = array();

interface/web/login/lib/module.conf.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
$module["template"] = "module.tpl.htm";
55
$module["startpage"] = "login/index.php";
66
$module["nav"] = array();
7-
?>
7+
$module['icon'] = 'icon icon-login';
8+

interface/web/mail/lib/module.conf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
$module['startpage'] = 'mail/mail_domain_list.php';
99
$module['tab_width'] = '';
1010
$module['order'] = '40';
11-
11+
$module['icon'] = 'icon icon-mail';
1212

1313
//**** Email accounts menu
1414
$items = array();

interface/web/mailuser/lib/module.conf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
$module['template'] = 'module.tpl.htm';
88
$module['startpage'] = 'mailuser/index.php';
99
$module['tab_width'] = '';
10-
10+
$module['icon'] = 'icon icon-mailuser';
1111

1212
//**** menu
1313
$items = array();

0 commit comments

Comments
 (0)