import other kontor repos into directories
This commit is contained in:
committed by
Thomas Peetz
parent
28746adfbb
commit
b424e95e05
@@ -0,0 +1,24 @@
|
||||
<!--comics.html-->
|
||||
{{ template "header.html" .}}
|
||||
{{ template "comics/menu.html" .}}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"><a href="/comics/comic">Comics</a></li>
|
||||
<li role="presentation"><a href="/comics/publisher">Publishers</a></li>
|
||||
<li role="presentation" class="active"><a href="/comics/artist">Artists</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<table class="table">
|
||||
<caption>Comic Artists</caption>
|
||||
<tr><th scope="col">Name</th></tr>
|
||||
{{range .payload }}
|
||||
<tr><td><a href="/comics/artist/view/{{.ID.Hex}}">{{.Name}}</a></td></tr>
|
||||
{{end}}
|
||||
</table>
|
||||
<div class="panel-body">
|
||||
<a href="/comics/artist/create">Add entry</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Embed the footer.html template at this location-->
|
||||
{{ template "footer.html" .}}
|
||||
@@ -0,0 +1,34 @@
|
||||
{{ template "header.html" .}}
|
||||
{{ template "comics/menu.html" .}}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation" class="active"><a href="/comics/comic">Comics</a></li>
|
||||
<li role="presentation"><a href="/comics/publisher">Publishers</a></li>
|
||||
<li role="presentation"><a href="/comics/artist">Artists</a></li>
|
||||
</ul>
|
||||
<div class="panel-body">
|
||||
{{ if .ErrorTitle}}
|
||||
<p class="bg-danger">
|
||||
{{.ErrorTitle}}: {{.ErrorMessage}}
|
||||
</p>
|
||||
{{end}}
|
||||
<form action="/comics/comic/validate" method="POST">
|
||||
<div class="form-group">
|
||||
<label for="title">Title</label>
|
||||
{{ if .payload.Title }}
|
||||
<input type="text" class="form-control" id="title" name="title" value={{.payload.Title}}>
|
||||
{{ else }}
|
||||
<input type="text" class="form-control" id="title" name="title" placeholder="Title">
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" value="true" name="completed" id="completed" {{ if .payload.Completed }}checked{{end}}>
|
||||
<label class="form-check-label" for="completed">Completed</label>
|
||||
</div>
|
||||
<input type="hidden" name="comicid" id="comicid" value={{.payload.ID.Hex}}>
|
||||
<button type="submit" class="btn btn-primary" name="action" value={{.action}}>{{.action}}</button>
|
||||
{{ if eq .action "Save" }}
|
||||
<button type="submit" class="btn btn-primary" name="action" value="Delete">Delete</button>
|
||||
{{ end }}
|
||||
</form>
|
||||
</div>
|
||||
{{ template "footer.html" .}}
|
||||
@@ -0,0 +1,24 @@
|
||||
<!--comics.html-->
|
||||
{{ template "header.html" .}}
|
||||
{{ template "comics/menu.html" .}}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation" class="active"><a href="/comics/comic">Comics</a></li>
|
||||
<li role="presentation"><a href="/comics/publisher">Publishers</a></li>
|
||||
<li role="presentation"><a href="/comics/artist">Artists</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<table class="table">
|
||||
<caption>List of Comics</caption>
|
||||
<tr><th scope="col">Name</th></tr>
|
||||
{{range .payload }}
|
||||
<tr><td><a href="/comics/comic/view/{{.ID.Hex}}">{{.Title}}</a></td></tr>
|
||||
{{end}}
|
||||
</table>
|
||||
<div class="panel-body">
|
||||
<a href="/comics/comic/create">Add entry</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Embed the footer.html template at this location-->
|
||||
{{ template "footer.html" .}}
|
||||
@@ -0,0 +1,38 @@
|
||||
{{ define "comics/menu.html" }}
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
||||
<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="/">Kontor</a>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{ if .is_logged_in }}
|
||||
<li class="active"><a href="/comics/">Comics <span class="sr-only">(current)</span></a></li>
|
||||
<li><a href="/library/">Library</a></li>
|
||||
<li><a href="/office">HomeOffice</a></li>
|
||||
<li><a href="/tradingcards">Trading Cards</a></li>
|
||||
<li><a href="/tysc">TradeYourSportsCards</a></li>
|
||||
{{end}}
|
||||
{{ if not .is_logged_in }}
|
||||
<li><a href="/user/login"><span class="glyphicon glyphicon-off" aria-hidden="true"></span></a></li>
|
||||
{{end}}
|
||||
{{ if .is_admin }}
|
||||
<li><a href="/admin/">Admin</a></li>
|
||||
{{ end }}
|
||||
{{ if .is_logged_in }}
|
||||
<li><a href="/user/logout"><span class="glyphicon glyphicon-off" aria-hidden="true"></span></a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,32 @@
|
||||
{{ define "comics/publisher.html" }}
|
||||
{{ template "header.html" .}}
|
||||
{{ template "comics/menu.html" .}}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"><a href="/comics/comic">Comics</a></li>
|
||||
<li role="presentation" class="active"><a href="/comics/publisher">Publishers</a></li>
|
||||
<li role="presentation"><a href="/comics/artist">Artists</a></li>
|
||||
</ul>
|
||||
<div class="panel-body">
|
||||
{{ if .ErrorTitle}}
|
||||
<p class="bg-danger">
|
||||
{{.ErrorTitle}}: {{.ErrorMessage}}
|
||||
</p>
|
||||
{{end}}
|
||||
<form action="/comics/publisher/validate" method="POST">
|
||||
<div class="form-group">
|
||||
<label for="name">Name</label>
|
||||
{{ if .payload.Name }}
|
||||
<input type="text" class="form-control" id="name" name="name" value={{.payload.Name}}>
|
||||
{{ else }}
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="Name">
|
||||
{{ end }}
|
||||
</div>
|
||||
<input type="hidden" name="publisherid" id="publisherid" value={{.payload.ID.Hex}}>
|
||||
<button type="submit" class="btn btn-primary" name="action" value={{.action}}>{{.action}}</button>
|
||||
{{ if eq .action "Save" }}
|
||||
<button type="submit" class="btn btn-primary" name="action" value="Delete">Delete</button>
|
||||
{{ end }}
|
||||
</form>
|
||||
</div>
|
||||
{{ template "footer.html" .}}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,25 @@
|
||||
<!--comics/publishers.html-->
|
||||
{{ define "comics/publishers.html" }}
|
||||
{{ template "header.html" .}}
|
||||
{{ template "comics/menu.html" .}}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"><a href="/comics/comic">Comics</a></li>
|
||||
<li role="presentation" class="active"><a href="/comics/publisher">Publishers</a></li>
|
||||
<li role="presentation"><a href="/comics/artist">Artists</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<table class="table">
|
||||
<caption>Comic Publishers</caption>
|
||||
<tr><th scope="col">Name</th></tr>
|
||||
{{range .payload }}
|
||||
<tr><td><a href="/comics/publisher/view/{{.ID.Hex}}">{{.Name}}</a></td></tr>
|
||||
{{end}}
|
||||
</table>
|
||||
<div class="panel-body">
|
||||
<a href="/comics/publisher/create">Add entry</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ template "footer.html" .}}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,34 @@
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
||||
<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="/">Kontor</a>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{ if .is_logged_in }}
|
||||
<li><a href="/comics/">Comics</a></li>
|
||||
<li><a href="/library/">Library</a></li>
|
||||
<li><a href="/office">HomeOffice</a></li>
|
||||
<li><a href="/tradingcards">Trading Cards</a></li>
|
||||
<li><a href="/tysc">TradeYourSportsCards</a></li>
|
||||
{{end}}
|
||||
{{ if not .is_logged_in }}
|
||||
<li><a href="/user/login"><span class="glyphicon glyphicon-off" aria-hidden="true"></span></a></li>
|
||||
{{end}}
|
||||
{{ if .is_logged_in }}
|
||||
<li class="active"><a href="/admin/">Admin<span class="sr-only">(current)</a></li>
|
||||
<li><a href="/user/logout"><span class="glyphicon glyphicon-off" aria-hidden="true"></span></a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>
|
||||
@@ -0,0 +1,11 @@
|
||||
<!--admin.html-->
|
||||
{{ define "kontor/admin.html" }}
|
||||
{{ template "header.html" .}}
|
||||
{{ template "admin-menu.html" .}}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation" class="active"><a href="/admin/user">User</a></li>
|
||||
<li role="presentation"><a href="/admin/data">Data</a></li>
|
||||
</ul>
|
||||
|
||||
{{ template "footer.html" .}}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,40 @@
|
||||
{{ define "kontor/create-user.html" }}
|
||||
{{ template "header.html" .}}
|
||||
{{ template "admin-menu.html" .}}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation" class="active"><a href="/admin/user">User</a></li>
|
||||
<li role="presentation"><a href="/admin/data">Data</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="panel panel-default col-sm-6">
|
||||
<div class="panel-body">
|
||||
<!--If there's an error, display the error-->
|
||||
{{ if .ErrorTitle}}
|
||||
<p class="bg-danger">
|
||||
{{.ErrorTitle}}: {{.ErrorMessage}}
|
||||
</p>
|
||||
{{end}}
|
||||
<!--Create a form that POSTs to the `/u/register` route-->
|
||||
<form class="form" action="/admin/user/create" method="POST">
|
||||
<div class="form-group">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" class="form-control" id="username" name="username" placeholder="Username">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="firstname">First Name</label>
|
||||
<input type="text" class="form-control" id="firstname" name="firstname" placeholder="First Name">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password" class="form-control" id="password" placeholder="Password">
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="admin">
|
||||
<label class="form-check-label" for="admin">Administrator</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Add</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{ template "footer.html" .}}
|
||||
{{end}}
|
||||
@@ -0,0 +1,29 @@
|
||||
{{ define "kontor/data-upload.html" }}
|
||||
{{ template "header.html" .}}
|
||||
{{ template "admin-menu.html" .}}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"><a href="/admin/user">User</a></li>
|
||||
<li role="presentation" class="active"><a href="/admin/data">Data</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="panel panel-default col-sm-6">
|
||||
<div class="panel-body">
|
||||
<!--If there's an error, display the error-->
|
||||
{{ if .ErrorTitle}}
|
||||
<p class="bg-danger">
|
||||
{{.ErrorTitle}}: {{.ErrorMessage}}
|
||||
</p>
|
||||
{{end}}
|
||||
<!--Create a form that POSTs to the `/u/register` route-->
|
||||
<form class="form" action="/admin/data" method="POST" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<label for="datafile">Data File</label>
|
||||
<input type="file" class="form-control" id="datafile" name="datafile" placeholder="Data File">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Upload</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ template "footer.html" .}}
|
||||
{{end}}
|
||||
@@ -0,0 +1,26 @@
|
||||
<!--footer.html-->
|
||||
|
||||
|
||||
<nav class="navbar navbar-default navbar-fixed-bottom">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<p class="col-lg-12">
|
||||
<ul class="list-inline">
|
||||
|
||||
<li><a href="/">Kontor</a></li>
|
||||
<li class="footer-menu-divider">⋅</li>
|
||||
{{ if not .is_logged_in }}
|
||||
<li><a href="/user/login">Login</a></li>
|
||||
{{end}}
|
||||
{{ if .is_logged_in }}
|
||||
<li><a href="/user/logout">Logout</a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
<p class="copyright text-muted small">Version {{ .version }} Copyright © 2018. All Rights Reserved</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
<!--header.html-->
|
||||
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!--Use the `title` variable to set the title of the page-->
|
||||
<title>{{ .title }}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<!--Use bootstrap to make the application look decent-->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
||||
<script async src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
|
||||
</head>
|
||||
|
||||
<body class="container">
|
||||
@@ -0,0 +1,17 @@
|
||||
<!--index.html-->
|
||||
{{ define "kontor/index.html" }}
|
||||
<!--Embed the header.html template at this location-->
|
||||
{{ template "header.html" .}}
|
||||
<!--Embed the menu.html template at this location-->
|
||||
{{ template "menu.html" . }}
|
||||
|
||||
<div>
|
||||
{{ if .InfoMessage}}
|
||||
<p class="bg-info">{{.InfoMessage}}</p>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<!--Embed the footer.html template at this location-->
|
||||
{{ template "footer.html" .}}
|
||||
|
||||
{{ end }}
|
||||
@@ -0,0 +1,12 @@
|
||||
<!--login-successful.html-->
|
||||
|
||||
<!--Embed the header.html template at this location-->
|
||||
{{ template "header.html" .}}
|
||||
{{ template "menu.html" . }}
|
||||
|
||||
<div>
|
||||
You have successfully logged in.
|
||||
</div>
|
||||
|
||||
<!--Embed the footer.html template at this location-->
|
||||
{{ template "footer.html" .}}
|
||||
@@ -0,0 +1,35 @@
|
||||
<!--login.html-->
|
||||
|
||||
<!--Embed the header.html template at this location-->
|
||||
{{ template "header.html" .}}
|
||||
{{ template "menu.html" . }}
|
||||
|
||||
<h1>Login</h1>
|
||||
|
||||
|
||||
<div class="panel panel-default col-sm-6">
|
||||
<div class="panel-body">
|
||||
<!--If there's an error, display the error-->
|
||||
{{ if .ErrorTitle}}
|
||||
<p class="bg-danger">
|
||||
{{.ErrorTitle}}: {{.ErrorMessage}}
|
||||
</p>
|
||||
{{end}}
|
||||
<!--Create a form that POSTs to the `/u/login` route-->
|
||||
<form class="form" action="/user/login" method="POST">
|
||||
<div class="form-group">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" class="form-control" id="username" name="username" placeholder="Username">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" class="form-control" id="password" name="password" placeholder="Password">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--Embed the footer.html template at this location-->
|
||||
{{ template "footer.html" .}}
|
||||
@@ -0,0 +1,36 @@
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
||||
<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="/">Kontor</a>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{ if .is_logged_in }}
|
||||
<li><a href="/comics">Comics</a></li>
|
||||
<li><a href="/library">Library</a></li>
|
||||
<li><a href="/office">HomeOffice</a></li>
|
||||
<li><a href="/tradingcards">Trading Cards</a></li>
|
||||
<li><a href="/tysc">TradeYourSportsCards</a></li>
|
||||
{{end}}
|
||||
{{ if not .is_logged_in }}
|
||||
<li><a href="/user/login"><span class="glyphicon glyphicon-off" aria-hidden="true"></span></a></li>
|
||||
{{end}}
|
||||
{{ if .is_admin }}
|
||||
<li><a href="/admin/">Admin</a></li>
|
||||
{{end}}
|
||||
{{ if .is_logged_in }}
|
||||
<li><a href="/user/logout"><span class="glyphicon glyphicon-off" aria-hidden="true"></span></a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>
|
||||
@@ -0,0 +1,59 @@
|
||||
{{ define "kontor/user-detail.html" }}
|
||||
{{ template "header.html" .}}
|
||||
{{ template "admin-menu.html" .}}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation" class="active"><a href="/admin/user">User</a></li>
|
||||
<li role="presentation"><a href="/admin/data">Data</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="panel-body">
|
||||
<!--If there's an error, display the error-->
|
||||
{{ if .ErrorTitle}}
|
||||
<p class="bg-danger">
|
||||
{{.ErrorTitle}}: {{.ErrorMessage}}
|
||||
</p>
|
||||
{{end}}
|
||||
<form action="/admin/user/view" method="POST">
|
||||
<div class="form-group">
|
||||
<label for="username">Username</label>
|
||||
{{ if .payload.Username }}
|
||||
<input type="text" class="form-control" id="username" name="username" value={{.payload.Username}}>
|
||||
{{ else }}
|
||||
<input type="text" class="form-control" id="username" name="username" placeholder="Username">
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="firstname">First Name</label>
|
||||
{{ if .payload.Firstname }}
|
||||
<input type="text" class="form-control" id="firstname" name="firstname" value={{.payload.Firstname}}>
|
||||
{{ else }}
|
||||
<input type="text" class="form-control" id="firstname" name="firstname" placeholder="First Name">
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="lastname">Last Name</label>
|
||||
{{ if .payload.Lastname }}
|
||||
<input type="text" class="form-control" id="lastname" name="lastname" value={{.payload.Lastname}}>
|
||||
{{ else }}
|
||||
<input type="text" class="form-control" id="lastname" name="lastname" placeholder="Last Name">
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password" class="form-control" id="password" placeholder="Password">
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" value="true" name="admin" id="admin" {{ if .payload.IsAdmin }}checked{{end}}>
|
||||
<label class="form-check-label" for="admin">Administrator</label>
|
||||
</div>
|
||||
<input type="hidden" name="userid" id="userid" value={{.payload.ID.Hex}}>
|
||||
<button type="submit" class="btn btn-primary" name="action" value={{.action}}>{{.action}}</button>
|
||||
{{ if eq .action "Save" }}
|
||||
<button type="submit" class="btn btn-primary" name="action" value="Delete">Delete</button>
|
||||
{{ end }}
|
||||
</form>
|
||||
</div>
|
||||
{{ template "footer.html" .}}
|
||||
{{end}}
|
||||
@@ -0,0 +1,38 @@
|
||||
{{ define "kontor/users.html" }}
|
||||
{{ template "header.html" .}}
|
||||
{{ template "admin-menu.html" .}}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation" class="active"><a href="/admin/user">User</a></li>
|
||||
<li role="presentation"><a href="/admin/data">Data</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="panel panel-default container">
|
||||
<table class="table">
|
||||
<caption>Registered users of Kontor</caption>
|
||||
<tr>
|
||||
<th scope="col">Username</th>
|
||||
<th scope="col">First Name</th>
|
||||
<th scope="col">Last Name</th>
|
||||
<th scope="col">Administrator</th>
|
||||
</tr>
|
||||
{{range .payload }}
|
||||
<tr>
|
||||
<td><a href="/admin/user/view/{{.ID.Hex}}">{{.Username}}</a></td>
|
||||
<td>{{.Firstname}}</td>
|
||||
<td>{{.Lastname}}</td>
|
||||
{{ if .IsAdmin}}
|
||||
<td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span></td>
|
||||
{{end}}
|
||||
{{ if not .IsAdmin }}
|
||||
<td><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></td>
|
||||
{{end}}
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
<div class="panel-body">
|
||||
<a href="/admin/user/create">Add entry</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ template "footer.html" .}}
|
||||
{{end}}
|
||||
@@ -0,0 +1,25 @@
|
||||
<!--books.html-->
|
||||
{{ define "library/authors.html" }}
|
||||
{{ template "header.html" .}}
|
||||
{{ template "library/menu.html" .}}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"><a href="/library/book">Books</a></li>
|
||||
<li role="presentation" class="active"><a href="/library/author">Authors</a></li>
|
||||
<li role="presentation"><a href="/library/publisher">Publishers</a></li>
|
||||
</ul>
|
||||
<div class="panel panel-default">
|
||||
<table class="table">
|
||||
<caption>Liste der Autoren</caption>
|
||||
<tr><th scope="col">Name</th></tr>
|
||||
{{range .payload }}
|
||||
<tr><td><a href="/library/author/view/{{.ID.Hex}}">{{.Name}}</a></td></tr>
|
||||
{{end}}
|
||||
</table>
|
||||
<div class="panel-body">
|
||||
<a href="/library/author/create">Add entry</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Embed the footer.html template at this location-->
|
||||
{{ template "footer.html" .}}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,25 @@
|
||||
<!--index.html-->
|
||||
{{ define "library/books.html" }}
|
||||
{{ template "header.html" .}}
|
||||
{{ template "library/menu.html" . }}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation" class="active"><a href="/library/book">Books</a></li>
|
||||
<li role="presentation"><a href="/library/author">Authors</a></li>
|
||||
<li role="presentation"><a href="/library/publisher">Publishers</a></li>
|
||||
</ul>
|
||||
<div class="panel panel-default">
|
||||
<table class="table">
|
||||
<caption>Liste der Bücher</caption>
|
||||
<tr><th scope="col">Title</th></tr>
|
||||
{{range .payload }}
|
||||
<tr><td><a href="/library/book/view/{{.ID.Hex}}">{{.Title}}</a></td></tr>
|
||||
{{end}}
|
||||
</table>
|
||||
<div class="panel-body">
|
||||
<a href="/library/book/create">Add entry</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ template "footer.html" .}}
|
||||
|
||||
{{ end }}
|
||||
@@ -0,0 +1,38 @@
|
||||
{{ define "library/menu.html" }}
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
||||
<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="/">Kontor</a>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{ if .is_logged_in }}
|
||||
<li><a href="/comics/">Comics</a></li>
|
||||
<li class="active"><a href="/library/">Library<span class="sr-only">(current)</span></a></li>
|
||||
<li><a href="/office">HomeOffice</a></li>
|
||||
<li><a href="/tradingcards">Trading Cards</a></li>
|
||||
<li><a href="/tysc">TradeYourSportsCards</a></li>
|
||||
{{end}}
|
||||
{{ if not .is_logged_in }}
|
||||
<li><a href="/user/login"><span class="glyphicon glyphicon-off" aria-hidden="true"></span></a></li>
|
||||
{{end}}
|
||||
{{ if .is_admin }}
|
||||
<li><a href="/admin/">Admin</a></li>
|
||||
{{ end }}
|
||||
{{ if .is_logged_in }}
|
||||
<li><a href="/user/logout"><span class="glyphicon glyphicon-off" aria-hidden="true"></span></a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,32 @@
|
||||
{{ define "library/publisher.html" }}
|
||||
{{ template "header.html" .}}
|
||||
{{ template "library/menu.html" .}}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"><a href="/library/book">Books</a></li>
|
||||
<li role="presentation"><a href="/library/author">Authors</a></li>
|
||||
<li role="presentation" class="active"><a href="/library/publisher">Publishers</a></li>
|
||||
</ul>
|
||||
<div class="panel-body">
|
||||
{{ if .ErrorTitle}}
|
||||
<p class="bg-danger">
|
||||
{{.ErrorTitle}}: {{.ErrorMessage}}
|
||||
</p>
|
||||
{{end}}
|
||||
<form action="/library/publisher/validate" method="POST">
|
||||
<div class="form-group">
|
||||
<label for="name">Name</label>
|
||||
{{ if .payload.Name }}
|
||||
<input type="text" class="form-control" id="name" name="name" value={{.payload.Name}}>
|
||||
{{ else }}
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="Name">
|
||||
{{ end }}
|
||||
</div>
|
||||
<input type="hidden" name="publisherid" id="publisherid" value={{.payload.ID.Hex}}>
|
||||
<button type="submit" class="btn btn-primary" name="action" value={{.action}}>{{.action}}</button>
|
||||
{{ if eq .action "Save" }}
|
||||
<button type="submit" class="btn btn-primary" name="action" value="Delete">Delete</button>
|
||||
{{ end }}
|
||||
</form>
|
||||
</div>
|
||||
{{ template "footer.html" .}}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,24 @@
|
||||
<!--library/publishers.html-->
|
||||
{{ define "library/publishers.html" }}
|
||||
{{ template "header.html" .}}
|
||||
{{ template "library/menu.html" .}}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"><a href="/library/book">Books</a></li>
|
||||
<li role="presentation"><a href="/library/author">Authors</a></li>
|
||||
<li role="presentation" class="active"><a href="/library/publisher">Publishers</a></li>
|
||||
</ul>
|
||||
<div class="panel panel-default">
|
||||
<table class="table">
|
||||
<caption>Liste der Verlage</caption>
|
||||
<tr><th scope="col">Name</th></tr>
|
||||
{{range .payload }}
|
||||
<tr><td><a href="/library/publisher/view/{{.ID.Hex}}">{{.Name}}</a></td></tr>
|
||||
{{end}}
|
||||
</table>
|
||||
<div class="panel-body">
|
||||
<a href="/library/publisher/create">Add entry</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ template "footer.html" .}}
|
||||
{{end}}
|
||||
@@ -0,0 +1,10 @@
|
||||
<!--index.html-->
|
||||
{{ define "office/index.html" }}
|
||||
{{ template "header.html" .}}
|
||||
{{ template "office/menu.html" . }}
|
||||
|
||||
<h1>Home Office</h1>
|
||||
|
||||
{{ template "footer.html" .}}
|
||||
|
||||
{{ end }}
|
||||
@@ -0,0 +1,38 @@
|
||||
{{ define "office/menu.html" }}
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
||||
<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="/">Kontor</a>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{ if .is_logged_in }}
|
||||
<li><a href="/comics/">Comics</a></li>
|
||||
<li><a href="/library/">Library</a></li>
|
||||
<li class="active"><a href="/office">HomeOffice<span class="sr-only">(current)</span></a></li>
|
||||
<li><a href="/tradingcards">Trading Cards</a></li>
|
||||
<li><a href="/tysc">TradeYourSportsCards</a></li>
|
||||
{{end}}
|
||||
{{ if not .is_logged_in }}
|
||||
<li><a href="/user/register">Register</a></li>
|
||||
{{end}}
|
||||
{{ if not .is_logged_in }}
|
||||
<li><a href="/user/login"><span class="glyphicon glyphicon-off" aria-hidden="true"></span></a></li>
|
||||
{{end}}
|
||||
{{ if .is_logged_in }}
|
||||
<li><a href="/user/logout"><span class="glyphicon glyphicon-off" aria-hidden="true"></span></a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,10 @@
|
||||
<!--index.html-->
|
||||
{{ define "tradingcards/index.html" }}
|
||||
{{ template "header.html" .}}
|
||||
{{ template "tradingcards/menu.html" . }}
|
||||
|
||||
<h1>Trading Cards</h1>
|
||||
|
||||
{{ template "footer.html" .}}
|
||||
|
||||
{{ end }}
|
||||
@@ -0,0 +1,38 @@
|
||||
{{ define "tradingcards/menu.html" }}
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
||||
<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="/">Kontor</a>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{ if .is_logged_in }}
|
||||
<li><a href="/comics/">Comics</a></li>
|
||||
<li><a href="/library/">Library</a></li>
|
||||
<li><a href="/office">HomeOffice</a></li>
|
||||
<li class="active"><a href="/tradingcards">Trading Cards<span class="sr-only">(current)</span></a></li>
|
||||
<li><a href="/tysc">TradeYourSportsCards</a></li>
|
||||
{{end}}
|
||||
{{ if not .is_logged_in }}
|
||||
<li><a href="/user/register">Register</a></li>
|
||||
{{end}}
|
||||
{{ if not .is_logged_in }}
|
||||
<li><a href="/user/login"><span class="glyphicon glyphicon-off" aria-hidden="true"></span></a></li>
|
||||
{{end}}
|
||||
{{ if .is_logged_in }}
|
||||
<li><a href="/user/logout"><span class="glyphicon glyphicon-off" aria-hidden="true"></span></a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,16 @@
|
||||
{{ define "tysc/index.html" }}
|
||||
{{ template "header.html" .}}
|
||||
{{ template "tysc/menu.html" . }}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"><a href="/tysc/sport">Sports</a></li>
|
||||
<li role="presentation"><a href="/tysc/position">Positions</a></li>
|
||||
<li role="presentation"><a href="/tysc/team">Teams</a></li>
|
||||
<li role="presentation"><a href="/tysc/player">Players</a></li>
|
||||
<li role="presentation"><a href="/tysc/manufacturer">Manufacturers</a></li>
|
||||
<li role="presentation"><a href="/tysc/cardset">Series</a></li>
|
||||
<li role="presentation"><a href="/tysc/parallelset">Parallel Sets</a></li>
|
||||
<li role="presentation"><a href="/tysc/insertset">Inserts</a></li>
|
||||
<li role="presentation"><a href="/tysc/card">Cards</a></li>
|
||||
</ul>
|
||||
{{ template "footer.html" .}}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,38 @@
|
||||
{{ define "tysc/menu.html" }}
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
||||
<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="/">Kontor</a>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{ if .is_logged_in }}
|
||||
<li><a href="/comics/">Comics</a></li>
|
||||
<li><a href="/library/">Library</a></li>
|
||||
<li><a href="/office">HomeOffice</a></li>
|
||||
<li><a href="/tradingcards">Trading Cards</a></li>
|
||||
<li class="active"><a href="/tysc">TradeYourSportsCards<span class="sr-only">(current)</span></a></li>
|
||||
{{end}}
|
||||
{{ if not .is_logged_in }}
|
||||
<li><a href="/user/register">Register</a></li>
|
||||
{{end}}
|
||||
{{ if not .is_logged_in }}
|
||||
<li><a href="/user/login"><span class="glyphicon glyphicon-off" aria-hidden="true"></span></a></li>
|
||||
{{end}}
|
||||
{{ if .is_logged_in }}
|
||||
<li><a href="/user/logout"><span class="glyphicon glyphicon-off" aria-hidden="true"></span></a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,28 @@
|
||||
{{ define "tysc/sports.html" }}
|
||||
{{ template "header.html" .}}
|
||||
{{ template "tysc/menu.html" .}}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"><a href="/tysc/sport">Sports</a></li>
|
||||
<li role="presentation"><a href="/tysc/position">Positions</a></li>
|
||||
<li role="presentation"><a href="/tysc/team">Teams</a></li>
|
||||
<li role="presentation"><a href="/tysc/player">Players</a></li>
|
||||
<li role="presentation"><a href="/tysc/manufacturer">Manufacturers</a></li>
|
||||
<li role="presentation"><a href="/tysc/cardset">Series</a></li>
|
||||
<li role="presentation"><a href="/tysc/parallelset">Parallel Sets</a></li>
|
||||
<li role="presentation"><a href="/tysc/insertset">Inserts</a></li>
|
||||
<li role="presentation"><a href="/tysc/card">Cards</a></li>
|
||||
</ul>
|
||||
<div class="panel panel-default">
|
||||
<table class="table">
|
||||
<caption>List of Amertican Sports</caption>
|
||||
<tr><th scope="col">Name</th></tr>
|
||||
{{range .payload }}
|
||||
<tr><td><a href="/tysc/sport/view/{{.ID.Hex}}">{{.Name}}</a></td></tr>
|
||||
{{end}}
|
||||
</table>
|
||||
<div class="panel-body">
|
||||
<a href="/tysc/sport/create">Add entry</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ template "footer.html" .}}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user