Survey responses!

and some small changes/fixes
This commit is contained in:
Isaac
2021-05-19 15:24:02 +01:00
parent 053fcdb4b8
commit 20ac8bff73
9 changed files with 340 additions and 40 deletions

View File

@@ -0,0 +1,114 @@
{
"type": "object",
"properties": {
"categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"claiming": {
"type": "boolean"
},
"image": {
"type": [
"string",
"null"
]
},
"max_per_member": {
"type": "number"
},
"name": {
"type": "string"
},
"name_format": {
"type": "string"
},
"opening_message": {
"type": "string"
},
"opening_questions": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"ping": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"require_topic": {
"type": "boolean"
},
"roles": {
"type": "array",
"items": {
"type": "string"
}
},
"survey": {
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"opening_message",
"roles"
]
}
},
"colour": {
"type": "string"
},
"command_prefix": {
"type": "string"
},
"error_colour": {
"type": "string"
},
"footer": {
"type": "string"
},
"locale": {
"type": "string"
},
"log_messages": {
"type": "boolean"
},
"success_colour": {
"type": "string"
},
"surveys": {
"type": "object"
},
"tags": {
"type": "object"
}
},
"required": [
"categories",
"colour",
"command_prefix",
"error_colour",
"footer",
"locale",
"log_messages",
"success_colour",
"surveys",
"tags"
]
}

View File

@@ -0,0 +1,67 @@
<!DOCTYPE html>
<html>
<head>
<title>{{survey}} Survey Responses | Discord Tickets</title>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1, user-scalable=no'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css'>
<link rel='stylesheet' href='https://jenil.github.io/bulmaswatch/darkly/bulmaswatch.min.css'>
</head>
<body>
<section class='section'>
<container class='container box has-text-centered'>
<div class='content'>
<h1>{{survey}} survey responses</h1>
</div>
<div class='level'>
<div class='level-item has-text-centered'>
<div class='box'>
<p class='title'>{{count.responses}}</p>
<p class='heading'>Responses</p>
</div>
</div>
<div class='level-item has-text-centered'>
<div class='box'>
<p class='title'>{{count.users}}</p>
<p class='heading'>Users</p>
</div>
</div>
</div>
<div class='table-container'>
<table class='table is-bordered is-striped is-hoverable is-fullwidth'>
<thead>
<tr>
{{#columns}}
<th>{{.}}</th>
{{/columns}}
</tr>
</thead>
<tbody>
{{#responses}}
<tr>
{{#.}}
<td>{{.}}</td>
{{/.}}
</tr>
{{/responses}}
</tbody>
<tfoot>
<tr>
{{#columns}}
<th>{{.}}</th>
{{/columns}}
</tr>
</tfoot>
</table>
</div>
</container>
</section>
</body>
</html>