{{define "view"}} <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> </head> <body> <nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4"> <a class="navbar-brand" href="/">Circus manager</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarCollapse"> <ul class="navbar-nav mr-auto"> <li class="nav-item active"> <a class="nav-link" href="/">Home <span class="sr-only">(current)</span></a> </li> <li class="nav-item"> <a class="nav-link" href="/create">Create</a> </li> <li class="nav-item"> <a class="nav-link" href="/view">View</a> </li> <li class="nav-item"> <a class="nav-link" href="/editSelect">Edit</a> </li> </ul> <div class="btn-toolbar" role="toolbar"> <div class="btn-group mr-2" role="group"> <button class="btn btn-danger my-2 my-sm-0" onclick="logoutThenRedirect()">Logout (currently unsupported)</button> </div> </div> </div> </nav> <div class="table-responsive" style="padding: 20px;"> <table class="table table-sm table-hover"> <thead> <tr> <th scope="col">UUID</th> <th scope="col">Name</th> <th scope="col">Description</th> <th scope="col">Flag</th> <th scope="col">Container</th> <th scope="col">Category</th> <th scope="col">Points</th> <th scope="col">Static</th> </tr> </thead> <tbody> {{range .Challenge}} <tr> <td>{{.UUID}}</td> <td>{{.Name}}</th> <td>{{.Description}}</td> <td>{{.Flag}}</td> <td>{{.Container}}</td> <td>{{.Category}}</td> <td>{{.Points}}</td> <td>{{.Static}}</td> </tr> {{end}} </tbody> </table> </div> </body> </html> {{end}}