diff options
Diffstat (limited to 'web/templates/drafts/drafts.tmpl')
-rw-r--r-- | web/templates/drafts/drafts.tmpl | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/web/templates/drafts/drafts.tmpl b/web/templates/drafts/drafts.tmpl new file mode 100644 index 0000000..e0e5c10 --- /dev/null +++ b/web/templates/drafts/drafts.tmpl @@ -0,0 +1,84 @@ +<!DOCTYPE html> +<html lang="en"> +{{template "head"}} +<body> +{{template "header" .}} + +<style> + td:hover { + cursor: pointer; + } +</style> + +<div class="container mb-5"> + <div class="row"> + <div class="col-12"> + + + <h1>Drafts</h1> + + <table id="table_id" class="drafts-data-table table table-hover"> + <thead> + <tr> + <th>ID</th> + <th>Title</th> + <th>Requester</th> + <th>Date</th> + <th>Bug Ready</th> + <th>Approved</th> + <th>Workflow</th> + <th>Permissions</th> + </tr> + </thead> + <tbody> + + {{ range .Drafts}} + <tr> + <td>{{.Id}}</td> + <td>{{.Title}}</td> + <td>{{.Creator.Nick}}</td> + <td>{{.Created}}</td> + <td> + <span class="badge badge-secondary float-right mr-2" style="background: none;border: 1px solid {{if .Status.BugReady }}green{{else}}darkred{{end}};padding-top:4px!important;padding-bottom:1.6px;"> + <svg class="" style="width:13px;height:13px" viewBox="0 0 24 24"> + <path fill="{{if .Status.BugReady }}green{{else}}darkred{{end}}" d="M20,8H17.19C16.74,7.2 16.12,6.5 15.37,6L17,4.41L15.59,3L13.42,5.17C12.96,5.06 12.5,5 12,5C11.5,5 11.05,5.06 10.59,5.17L8.41,3L7,4.41L8.62,6C7.87,6.5 7.26,7.21 6.81,8H4V10H6.09C6.03,10.33 6,10.66 6,11V12H4V14H6V15C6,15.34 6.03,15.67 6.09,16H4V18H6.81C8.47,20.87 12.14,21.84 15,20.18C15.91,19.66 16.67,18.9 17.19,18H20V16H17.91C17.97,15.67 18,15.34 18,15V14H20V12H18V11C18,10.66 17.97,10.33 17.91,10H20V8M16,15A4,4 0 0,1 12,19A4,4 0 0,1 8,15V11A4,4 0 0,1 12,7A4,4 0 0,1 16,11V15M14,10V12H10V10H14M10,14H14V16H10V14Z" /> + </svg> + <span class="" style="color:{{if .Status.BugReady }}green{{else}}darkred{{end}};">{{if .Status.BugReady }}READY{{else}}NOT READY{{end}}</span> + </span> + + </td> + <td> + <span class="badge badge-secondary float-right mr-2" style="background: none;border: 1px solid {{if eq .Status.Approval "declined" }}darkred{{else if eq .Status.Approval "approved"}}green{{else if eq .Status.Approval "comments"}}orange{{else}}grey{{end}};"> + <i class="fa fa-circle mr-1" aria-hidden="true" style="font-size: 0.8rem;color: {{if eq .Status.Approval "declined" }}darkred{{else if eq .Status.Approval "approved"}}green{{else if eq .Status.Approval "comments"}}orange{{else}}grey{{end}};"></i> + <span class="text-uppercase" style="color:{{if eq .Status.Approval "declined" }}darkred{{else if eq .Status.Approval "approved"}}green{{else if eq .Status.Approval "comments"}}orange{{else}}grey{{end}};">{{.Status.Approval}}</span> + </span> + </td> + <td> + <span class="badge badge-danger float-right mr-2" style="background: none;border: 1px solid {{if eq .Status.WorkflowStatus "commented" }}blue{{else if eq .Status.WorkflowStatus "own"}}green{{else if eq .Status.WorkflowStatus "approved"}}green{{else}}darkred{{end}};"> + <i class="fa {{if eq .Status.WorkflowStatus "commented" }}fa-comments-o{{else if eq .Status.WorkflowStatus "own"}}fa-user{{else if eq .Status.WorkflowStatus "approved"}}fa-check-circle-o{{else}}fa-times-circle{{end}} mr-1" aria-hidden="true" style="font-size: 0.8rem;color: {{if eq .Status.WorkflowStatus "commented" }}blue{{else if eq .Status.WorkflowStatus "own"}}green{{else if eq .Status.WorkflowStatus "approved"}}green{{else}}darkred{{end}};"></i> + <span class="text-uppercase" style="color:{{if eq .Status.WorkflowStatus "commented" }}blue{{else if eq .Status.WorkflowStatus "own"}}green{{else if eq .Status.WorkflowStatus "approved"}}green{{else}}darkred{{end}};">{{.Status.WorkflowStatus}}</span> + </span> + </td> + <td> + <span class="badge badge-secondary float-right" style="background: none;border: 1px solid {{ if eq .Status.Permission "public"}}green{{else}}black{{end}};"> + <i class="fa {{ if eq .Status.Permission "public"}}fa-globe{{else}}fa-user-secret{{end}} mr-1" aria-hidden="true" style="font-size: 0.8rem;color: {{ if eq .Status.Permission "public"}}green{{else}}black{{end}};"></i> + <span style="color: {{ if eq .Status.Permission "public"}}green{{else}}black{{end}};">{{ if eq .Status.Permission "public"}}PUBLIC{{else}}CONFIDENTAL{{end}}</span> + </span> + </td> + </tr> + {{end}} + </tbody> + </table> + + + </div> + </div> +</div> + + +{{template "footer" .}} + +<script src="assets/drafts.js"></script> + +</body> +</html> |