mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-06 10:11:27 +03:00
Survey responses!
and some small changes/fixes
This commit is contained in:
114
src/commands/extra/settings.schema.json
Normal file
114
src/commands/extra/settings.schema.json
Normal 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"
|
||||
]
|
||||
}
|
67
src/commands/extra/survey.template.html
Normal file
67
src/commands/extra/survey.template.html
Normal 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>
|
Reference in New Issue
Block a user