mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-13 14:31:15 +00:00
initial commit
This commit is contained in:
122
assets/tpl/admin_index.html
Normal file
122
assets/tpl/admin_index.html
Normal file
@@ -0,0 +1,122 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!-- http://paintstrap.com/preview_by_id/27826?design=large -->
|
||||
<!-- http://www.colourlovers.com/palette/4657935 -->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||
<title>{{ .static.WebsiteTitle }} - Admin</title>
|
||||
<meta name="description" content="{{ .static.WebsiteTitle }}">
|
||||
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
||||
<!--link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"-->
|
||||
<link rel="stylesheet" href="/fonts/fontawesome-all.min.css">
|
||||
<link rel="stylesheet" href="/css/custom.css">
|
||||
</head>
|
||||
|
||||
<body id="page-top">
|
||||
{{template "prt_nav.html" .}}
|
||||
<div class="container">
|
||||
<div class="page-header">
|
||||
<h1>WireGuard VPN Administration</h1>
|
||||
</div>
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Interface status for <strong>{{.interface.Name}}</strong></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>Public Key: <strong>{{.interface.PublicKey}}</strong></p>
|
||||
<p>Listening Port: <strong>{{.interface.ListenPort}}</strong></p>
|
||||
<p>Number of Peers: <strong>{{len .interface.Peers}}</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<h2>Current VPN Users</h2>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover" id="userTable">
|
||||
<thead>
|
||||
<tr class="d-flex">
|
||||
<th scope="col" class="list-image-cell"></th><!-- Status and expand -->
|
||||
<th scope="col"><a href="?sort=id">Identifier <i class="fa fa-fw {{.session.GetSortIcon "id"}}"></i></a></th>
|
||||
<th scope="col"><a href="?sort=pubKey">Public Key <i class="fa fa-fw {{.session.GetSortIcon "pubKey"}}"></i></a></th>
|
||||
<th scope="col"><a href="?sort=mail">E-Mail <i class="fa fa-fw {{.session.GetSortIcon "mail"}}"></i></a></th>
|
||||
<th scope="col"><a href="?sort=ip">IP's <i class="fa fa-fw {{.session.GetSortIcon "ip"}}"></i></a></th>
|
||||
<th scope="col"><a href="?sort=traffic">Traffic <i class="fa fa-fw {{.session.GetSortIcon "traffic"}}"></i></a></th>
|
||||
<th scope="col"><a href="?sort=handshake">Last Handshake <i class="fa fa-fw {{.session.GetSortIcon "handshake"}}"></i></a></th>
|
||||
<th scope="col"></th><!-- Actions -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range $i, $p :=.peers}}
|
||||
<tr class="d-flex" id="user-pos-{{$i}}">
|
||||
<th scope="row" class="list-image-cell">
|
||||
<a href="#{{$p.UID}}" data-toggle="collapse" class="collapse-indicator collapsed"></a>
|
||||
<!-- online check -->
|
||||
</th>
|
||||
<td>{{$p.Identifier}}</td>
|
||||
<td>{{$p.PublicKey}}</td>
|
||||
<td>{{$p.Email}}</td>
|
||||
<td>{{$p.IPsStr}}</td>
|
||||
<td>{{$p.Peer.ReceiveBytes}} / {{$p.Peer.TransmitBytes}}</td>
|
||||
<td>{{$p.Peer.LastHandshakeTime}}</td>
|
||||
<td>
|
||||
{{if eq $.session.IsAdmin true}}
|
||||
<a href="/admin/user/edit?pos={{$i}}"><i class="fas fa-cog"></i></a>
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="hiddenRow">
|
||||
<td colspan="8" class="hiddenCell" style="white-space:nowrap">
|
||||
<div class="collapse" id="{{$p.UID}}" data-parent="#userTable">
|
||||
<div class="row collapsedRow">
|
||||
<div class="col-md-6 leftBorder">
|
||||
<div class="nav btn-group" id="pills-tab{{$p.UID}}" role="tablist">
|
||||
<a data-toggle="tab" href="#t1{{$p.UID}}" class="btn active">General</a>
|
||||
<a data-toggle="tab" href="#t2{{$p.UID}}" class="btn">Organization</a>
|
||||
<a data-toggle="tab" href="#t3{{$p.UID}}" class="btn">Address</a>
|
||||
<a data-toggle="tab" href="#t4{{$p.UID}}" class="btn">Telephone</a>
|
||||
</div>
|
||||
|
||||
<div class="tab-content" id="pills-tabContent{{$p.UID}}">
|
||||
<div id="t1{{$p.UID}}" class="tab-pane active">
|
||||
<ul>
|
||||
<li>0</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="t2{{$p.UID}}" class="tab-pane">
|
||||
<ul>
|
||||
<li>1</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="t3{{$p.UID}}" class="tab-pane">
|
||||
<ul>
|
||||
<li>2</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="t4{{$p.UID}}" class="tab-pane">
|
||||
<ul>
|
||||
<li>4</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<img class="list-image-large" src="/user/qr.jpg"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Currently listed peers: <strong>{{len .peers}}</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
{{template "prt_footer.html"}}
|
||||
<script src="/js/jquery.min.js"></script>
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
<script src="/js/jquery.easing.js"></script>
|
||||
<script src="/js/custom.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
142
assets/tpl/edit.html
Normal file
142
assets/tpl/edit.html
Normal file
@@ -0,0 +1,142 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!-- http://paintstrap.com/preview_by_id/27826?design=large -->
|
||||
<!-- http://www.colourlovers.com/palette/4657935 -->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||
<title>{{ .static.WebsiteTitle }} - Edit User</title>
|
||||
<meta name="description" content="{{ .static.WebsiteTitle }}">
|
||||
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i">
|
||||
<link rel="stylesheet" href="/fonts/fontawesome-all.min.css">
|
||||
<link rel="stylesheet" href="/css/custom.css">
|
||||
</head>
|
||||
|
||||
<body id="page-top">
|
||||
{{template "prt_nav.html" .}}
|
||||
<div class="container user-edit-container">
|
||||
<div class="jumbotron user-edit-jumbotron">
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<div class="row">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6 text-center">
|
||||
<img class="list-image-edit" src="/user/{{$.user.Username}}/user.jpg?cc={{len $.user.Image}}" alt="User Image"/>
|
||||
|
||||
<input type="file" accept="image/jpeg" name="thumbnailPhoto"
|
||||
class="form-control-file center-block" id="inputThumbnailPhoto">
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputName">Name</label>
|
||||
<input type="text" name="displayName" class="form-control" id="inputName" placeholder="" value="{{index $.user.Attributes "displayName" }}">
|
||||
<label for="inputMail">Email</label>
|
||||
<input type="email" name="mail" class="form-control" id="inputMail" placeholder="" value="{{index $.user.Attributes "mail" }}" readonly >
|
||||
<label for="inputUserID">User ID</label>
|
||||
<input type="text" name="sAMAccountName" class="form-control" id="inputUserID" placeholder="" value="{{index $.user.Attributes "sAMAccountName" }}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputPhone">Phone Number</label>
|
||||
<input type="text" name="telephoneNumber" class="form-control" id="inputPhone" value="{{index $.user.Attributes "telephoneNumber" }}" placeholder="">
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputMobile">Mobile Number</label>
|
||||
<input type="text" name="mobile" class="form-control" id="inputMobile" value="{{index $.user.Attributes "mobile" }}" placeholder="">
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputEmployeeID">Employee ID</label>
|
||||
<input type="text" name="employeeID" class="form-control" id="inputEmployeeID" value="{{index $.user.Attributes "employeeID" }}" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputTitle">Title</label>
|
||||
<input type="text" name="title" class="form-control" id="inputTitle" value="{{index $.user.Attributes "title" }}" placeholder="">
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputDepartment">Department</label>
|
||||
<input type="text" name="department" class="form-control" id="inputDepartment" value="{{index $.user.Attributes "department" }}" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputCompany">Company</label>
|
||||
<input type="text" name="company" class="form-control" id="inputCompany" value="{{index $.user.Attributes "company" }}" placeholder="">
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputManager">Teamleader</label>
|
||||
<select name="manager" id="inputManager" class="form-control">
|
||||
<option value="">No Teamleader</option>
|
||||
{{range $i, $leader := $.teamLeaders}}
|
||||
{{if eq $leader.DN (index $.user.Attributes "manager")}}
|
||||
<option value="{{$leader.DN}}" selected>{{$leader.Firstname}} {{$leader.Lastname}}</option>
|
||||
{{else}}
|
||||
<option value="{{$leader.DN}}">{{$leader.Firstname}} {{$leader.Lastname}}</option>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputStreet">Street</label>
|
||||
<input type="text" name="streetAddress" class="form-control" id="inputStreet" value="{{index $.user.Attributes "streetAddress" }}" placeholder="">
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputZip">Street</label>
|
||||
<input type="text" name="postalCode" class="form-control" id="inputZip" value="{{index $.user.Attributes "postalCode" }}" placeholder="">
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputCity">City</label>
|
||||
<input type="text" name="l" class="form-control" id="inputCity" value="{{index $.user.Attributes "l" }}" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputState">State/Province</label>
|
||||
<input type="text" name="st" class="form-control" id="inputState" value="{{index $.user.Attributes "st" }}" placeholder="">
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputCountry">Country</label>
|
||||
<input type="text" name="co" class="form-control" id="inputCountry" value="{{index $.user.Attributes "co" }}" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<button type="submit" class="btn btn-primary">Save</button>
|
||||
{{if le $.jumpBack 0 }}
|
||||
<a href="/" class="btn btn-default">Cancel</a>
|
||||
{{else}}
|
||||
<a href="/#user-pos-{{$.jumpBack}}" class="btn btn-default">Cancel</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{if $.alerts.HasAlert}}
|
||||
<div class="row">
|
||||
<div class="form-row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-{{$.alerts.Type}}" role="alert">
|
||||
{{$.alerts.Message}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{template "prt_footer.html"}}
|
||||
<script src="/js/jquery.min.js"></script>
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
<script src="/js/jquery.easing.js"></script>
|
||||
<script src="/js/custom.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
34
assets/tpl/error.html
Normal file
34
assets/tpl/error.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!-- http://paintstrap.com/preview_by_id/27826?design=large -->
|
||||
<!-- http://www.colourlovers.com/palette/4657935 -->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||
<title>{{ .static.WebsiteTitle }} - Error</title>
|
||||
<meta name="description" content="{{ .static.WebsiteTitle }}">
|
||||
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i">
|
||||
<link rel="stylesheet" href="/fonts/fontawesome-all.min.css">
|
||||
<link rel="stylesheet" href="/css/custom.css">
|
||||
</head>
|
||||
|
||||
<body id="page-top">
|
||||
{{template "prt_nav.html" .}}
|
||||
<div class="container">
|
||||
<div class="text-center mt-5">
|
||||
<div class="error mx-auto" data-text="{{.data.Code}}">
|
||||
<p class="m-0">{{.data.Code}}</p>
|
||||
</div>
|
||||
<p class="text-dark mb-5 lead">{{.data.Message}}</p>
|
||||
<p class="text-black-50 mb-0">{{.data.Details}}</p><a href="/">← Back to Dashboard</a>
|
||||
</div>
|
||||
</div>
|
||||
{{template "prt_footer.html"}}
|
||||
<script src="/js/jquery.min.js"></script>
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
<script src="/js/jquery.easing.js"></script>
|
||||
<script src="/js/custom.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
31
assets/tpl/index.html
Normal file
31
assets/tpl/index.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!-- http://paintstrap.com/preview_by_id/27826?design=large -->
|
||||
<!-- http://www.colourlovers.com/palette/4657935 -->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||
<title>{{ .static.WebsiteTitle }}</title>
|
||||
<meta name="description" content="{{ .static.WebsiteTitle }}">
|
||||
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
||||
<!--link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"-->
|
||||
<link rel="stylesheet" href="/fonts/fontawesome-all.min.css">
|
||||
<link rel="stylesheet" href="/css/custom.css">
|
||||
</head>
|
||||
|
||||
<body id="page-top">
|
||||
{{template "prt_nav.html" .}}
|
||||
<div class="container">
|
||||
<div class="page-header">
|
||||
<h1>WireGuard VPN Portal</h1>
|
||||
</div>
|
||||
<p class="lead">Please note that this page is only intended for internal use!</p>
|
||||
</div>
|
||||
{{template "prt_footer.html"}}
|
||||
<script src="/js/jquery.min.js"></script>
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
<script src="/js/jquery.easing.js"></script>
|
||||
<script src="/js/custom.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
46
assets/tpl/login.html
Normal file
46
assets/tpl/login.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||
<title>{{ .static.WebsiteTitle }} - Login</title>
|
||||
<meta name="description" content="{{ .static.WebsiteTitle }}">
|
||||
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i">
|
||||
<link rel="stylesheet" href="/fonts/fontawesome-all.min.css">
|
||||
<link rel="stylesheet" href="/fonts/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="/fonts/fontawesome5-overrides.min.css">
|
||||
<link rel="stylesheet" href="/css/signin.css">
|
||||
</head>
|
||||
|
||||
<body class="bg-gradient-primary">
|
||||
<div class="container">
|
||||
<form class="form-signin" method="post">
|
||||
<h2 class="form-signin-heading">Please sign in</h2>
|
||||
<label for="inputUser" class="sr-only">Username</label>
|
||||
<input name="username" type="text" id="inputUser" class="form-control" placeholder="user.name" required="" autofocus="">
|
||||
<label for="inputPassword" class="sr-only">Password</label>
|
||||
<input name="password" type="password" id="inputPassword" class="form-control" placeholder="password" required="">
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
||||
|
||||
{{ if eq .error true }}
|
||||
<hr>
|
||||
<span class="text-danger">{{.message}}</span>
|
||||
{{end}}
|
||||
</form>
|
||||
|
||||
<div class="card shadow-lg o-hidden border-0 my-5">
|
||||
<div class="card-body p-0">
|
||||
<a href="/" class="btn btn-white btn-block text-primary btn-user">Go Home</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/js/jquery.min.js"></script>
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
<script src="/js/jquery.easing.js"></script>
|
||||
<script src="/js/jquery.fancybox.min.js"></script>
|
||||
<script src="/js/custom.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
120
assets/tpl/profile.html
Normal file
120
assets/tpl/profile.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!-- http://paintstrap.com/preview_by_id/27826?design=large -->
|
||||
<!-- http://www.colourlovers.com/palette/4657935 -->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||
<title>{{ .static.WebsiteTitle }} - Profile</title>
|
||||
<meta name="description" content="{{ .static.WebsiteTitle }}">
|
||||
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i">
|
||||
<link rel="stylesheet" href="/fonts/fontawesome-all.min.css">
|
||||
<link rel="stylesheet" href="/css/custom.css">
|
||||
</head>
|
||||
|
||||
<body id="page-top">
|
||||
{{template "prt_nav.html" .}}
|
||||
<div class="container user-edit-container">
|
||||
<div class="jumbotron user-edit-jumbotron">
|
||||
<div class="row">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6 text-center">
|
||||
<img class="list-image-edit" src="/user/{{$.user.Username}}/user.jpg?cc={{len $.user.Image}}" alt="User Image"/>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputName">Name</label>
|
||||
<input type="text" name="displayName" class="form-control" id="inputName" placeholder="" value="{{index $.user.Attributes "displayName" }}" readonly>
|
||||
<label for="inputMail">Email</label>
|
||||
<input type="email" name="mail" class="form-control" id="inputMail" placeholder="" value="{{index $.user.Attributes "mail" }}" readonly>
|
||||
<label for="inputUserID">User ID</label>
|
||||
<input type="text" name="sAMAccountName" class="form-control" id="inputUserID" placeholder="" value="{{index $.user.Attributes "sAMAccountName" }}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputPhone">Phone Number</label>
|
||||
<input type="text" name="telephoneNumber" class="form-control" id="inputPhone" value="{{index $.user.Attributes "telephoneNumber" }}" placeholder="" readonly>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputMobile">Mobile Number</label>
|
||||
<input type="text" name="mobile" class="form-control" id="inputMobile" value="{{index $.user.Attributes "mobile" }}" placeholder="" readonly>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputEmployeeID">Employee ID</label>
|
||||
<input type="text" name="employeeID" class="form-control" id="inputEmployeeID" value="{{index $.user.Attributes "employeeID" }}" placeholder="" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputTitle">Title</label>
|
||||
<input type="text" name="title" class="form-control" id="inputTitle" value="{{index $.user.Attributes "title" }}" placeholder="" readonly>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputDepartment">Department</label>
|
||||
<input type="text" name="department" class="form-control" id="inputDepartment" value="{{index $.user.Attributes "department" }}" placeholder="" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputCompany">Company</label>
|
||||
<input type="text" name="company" class="form-control" id="inputCompany" value="{{index $.user.Attributes "company" }}" placeholder="" readonly>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputManager">Teamleader</label>
|
||||
<select name="manager" id="inputManager" class="form-control" readonly>
|
||||
<option value="">No Teamleader</option>
|
||||
{{range $i, $leader := $.teamLeaders}}
|
||||
{{if eq $leader.DN (index $.user.Attributes "manager")}}
|
||||
<option value="{{$leader.DN}}" selected>{{$leader.Firstname}} {{$leader.Lastname}}</option>
|
||||
{{end}}
|
||||
<option value="{{$leader.DN}}">{{$leader.Firstname}} {{$leader.Lastname}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputStreet">Street</label>
|
||||
<input type="text" name="streetAddress" class="form-control" id="inputStreet" value="{{index $.user.Attributes "streetAddress" }}" placeholder="" readonly>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputZip">Street</label>
|
||||
<input type="text" name="postalCode" class="form-control" id="inputZip" value="{{index $.user.Attributes "postalCode" }}" placeholder="" readonly>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputCity">City</label>
|
||||
<input type="text" name="l" class="form-control" id="inputCity" value="{{index $.user.Attributes "l" }}" placeholder="" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputState">State/Province</label>
|
||||
<input type="text" name="st" class="form-control" id="inputState" value="{{index $.user.Attributes "st" }}" placeholder="" readonly>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputCountry">Country</label>
|
||||
<input type="text" name="co" class="form-control" id="inputCountry" value="{{index $.user.Attributes "co" }}" placeholder="" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<a href="/" class="btn btn-primary">Go Back</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "prt_footer.html"}}
|
||||
<script src="/js/jquery.min.js"></script>
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
<script src="/js/jquery.easing.js"></script>
|
||||
<script src="/js/custom.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
6
assets/tpl/prt_footer.html
Normal file
6
assets/tpl/prt_footer.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p class="text-muted">Copyright © Prolicht GmbH 2020 <a class="scroll-to-top" href="#page-top"><i class="fas fa-angle-up"></i></a></p>
|
||||
|
||||
</div>
|
||||
</footer>
|
57
assets/tpl/prt_nav.html
Normal file
57
assets/tpl/prt_nav.html
Normal file
@@ -0,0 +1,57 @@
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/"><img src="/img/PROLICHT_FULL.png" alt="PROLICHT"/></a>
|
||||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="nav-spacer"></li>
|
||||
{{with eq $.session.LoggedIn true}}{{with eq $.session.IsAdmin true}}
|
||||
<form class="navbar-form navbar-right" action="/">
|
||||
<div class="form-group btn-group">
|
||||
<input id="inputSearch" name="search" type="search" placeholder="Search..." onsearch="OnSearch(this)" class="form-control" value="{{$.session.Search}}">
|
||||
<!--span id="searchclear"><i class="fas fa-times"></i></span-->
|
||||
</div>
|
||||
<div class="form-group btn-group">
|
||||
<select name="department" id="inputDepartment" type="search" class="form-control">
|
||||
<option value="">All departments</option>
|
||||
{{range $i, $department := $.departments}}
|
||||
{{if eq $department $.session.SearchDepartment}}
|
||||
<option value="{{$department}}" selected>{{$department}}</option>
|
||||
{{else}}
|
||||
<option value="{{$department}}">{{$department}}</option>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-outline-light"><i class="fa fa-search"></i></button>
|
||||
</form>
|
||||
{{end}}{{end}}
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{if eq $.session.LoggedIn true}}
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{$.session.Firstname}} {{$.session.Lastname}} <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
{{with eq $.session.LoggedIn true}}{{with eq $.session.IsAdmin true}}
|
||||
<li><a href="/admin/"><i class="fas fa-file-export"></i> Administration</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
{{end}}{{end}}
|
||||
<li><a href="/user/{{$.session.UserName}}/profile"><i class="fas fa-user"></i> Profile</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="{{ $.static.LogoutURL }}"><i class="fas fa-sign-out-alt"></i> Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{{else}}
|
||||
<li><a href="{{ $.static.LoginURL }}"><i class="fas fa-sign-in-alt fa-sm fa-fw mr-2 text-gray-400"></i> Login</a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div><!--/.navbar-collapse -->
|
||||
</div>
|
||||
</nav>
|
Reference in New Issue
Block a user