about summary refs log tree commit diff
path: root/hosted/edit.html
diff options
context:
space:
mode:
Diffstat (limited to 'hosted/edit.html')
-rw-r--r--hosted/edit.html43
1 files changed, 33 insertions, 10 deletions
diff --git a/hosted/edit.html b/hosted/edit.html
index e95872e..4e49b20 100644
--- a/hosted/edit.html
+++ b/hosted/edit.html
@@ -1,3 +1,4 @@
+{{define "edit"}}
 <!DOCTYPE html>
 <html>
     <head>
@@ -23,7 +24,7 @@
                         <a class="nav-link" href="/view">View</a>
                     </li>
                     <li class="nav-item">
-                        <a class="nav-link" href="/edit">Edit</a>
+                        <a class="nav-link" href="/editSelect">Edit</a>
                     </li>
                 </ul>
                 <div class="btn-toolbar" role="toolbar">
@@ -34,15 +35,37 @@
                 </div>
             </div>
         </nav>
-        <main class="container" role="main">
-            <div class="jumbotron">
-                <h1 class="display-4">Hello.</h1>
-                <h3>Welcome to the circus-manager</h3>
-                <p>You can create, view and edit challenges here</p>
-                <hr>
-                <a class="btn btn-primary btn-lg" href="/create"
-                    role="button">Create a new challenge!</a>
+            <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>
+                      <td><a href="/edit?uuid={{.UUID}}" class="btn btn-primary" role="button">Edit</a></td>
+                    </tr>
+                    {{end}}
+                  </tbody>
+                </table>
             </div>
-        </main>
     </body>
 </html>
+{{end}}