Skip to content

Commit

Permalink
Settings pages: move level selector from top bar and add page titles
Browse files Browse the repository at this point in the history
Signed-off-by: RD WebDesign <[email protected]>
  • Loading branch information
rdwebdesign committed Jul 19, 2023
1 parent 7c00023 commit b26dcf3
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 8 deletions.
8 changes: 0 additions & 8 deletions scripts/pi-hole/lua/header_authenticated.lp
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ mg.include('header.lp','r')
</a>
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<? if startsWith(scriptname, 'settings/') then ?>
<li class="nav-item">
<p class="navbar-text">
Settings level: <select id="settings-level" class="form-control input-sm">
</select>
</p>
</li>
<? end ?>
<li<? if string.len(hostname) == 0 then ?> class="hidden"<? end ?>>
<p class="navbar-text">
<span class="hidden-xs">hostname:</span>
Expand Down
7 changes: 7 additions & 0 deletions scripts/pi-hole/lua/settings_header.lp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- Title -->
<div class="page-header flex-header">
<h1><?= PageTitle ?></h1>
<div class="settings-selector">
Settings level: <select id="settings-level" class="form-control input-sm"></select>
</div>
</div>
4 changes: 4 additions & 0 deletions settings-advanced.lp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
--]]

mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')

-- Page title and level selector
PageTitle = "Advanced Settings"
mg.include('scripts/pi-hole/lua/settings_header.lp','r')
?>
<div class="row settings-level-2" id="advanced-content">
<!-- dynamically filled with content -->
Expand Down
4 changes: 4 additions & 0 deletions settings-api.lp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
--]]

mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')

-- Page title and level selector
PageTitle = "Web Interface - API Settings"
mg.include('scripts/pi-hole/lua/settings_header.lp','r')
?>
<div class="row">
<div class="col-md-6 settings-level-1">
Expand Down
4 changes: 4 additions & 0 deletions settings-dhcp.lp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
--]]

mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')

-- Page title and level selector
PageTitle = "DHCP Settings"
mg.include('scripts/pi-hole/lua/settings_header.lp','r')
?>
<div class="row">
<!-- DHCP Settings Box -->
Expand Down
4 changes: 4 additions & 0 deletions settings-dns.lp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
--]]

mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')

-- Page title and level selector
PageTitle = "DNS Settings"
mg.include('scripts/pi-hole/lua/settings_header.lp','r')
?>
<div class="row">
<div class="col-lg-6">
Expand Down
4 changes: 4 additions & 0 deletions settings-dnsrecords.lp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
--]]

mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')

-- Page title and level selector
PageTitle = "Local DNS Settings"
mg.include('scripts/pi-hole/lua/settings_header.lp','r')
?>
<div class="row">
<div class="col-md-6 settings-level-1">
Expand Down
4 changes: 4 additions & 0 deletions settings-privacy.lp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
--]]

mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')

-- Page title and level selector
PageTitle = "Privacy Settings"
mg.include('scripts/pi-hole/lua/settings_header.lp','r')
?>
<div class="row">
<div class="col-md-6 settings-level-0">
Expand Down
4 changes: 4 additions & 0 deletions settings-system.lp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
--]]

mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')

-- Page title and level selector
PageTitle = "System Settings"
mg.include('scripts/pi-hole/lua/settings_header.lp','r')
?>
<div class="row">
<div class="col-md-6">
Expand Down
4 changes: 4 additions & 0 deletions settings-teleporter.lp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
--]]

mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')

-- Page title and level selector
PageTitle = "Teleporter"
mg.include('scripts/pi-hole/lua/settings_header.lp','r')
?>
<div class="row">
<div class="col-md-6">
Expand Down

0 comments on commit b26dcf3

Please sign in to comment.