2017-07-27 22:55:28 +02:00
|
|
|
{% extends 'site_layout.html.j2' %}
|
2017-08-04 06:09:14 +02:00
|
|
|
{% set title="Manage Guilds as Administrator" %}
|
2017-07-27 22:55:28 +02:00
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<h1>Manage Guilds (Admin)</h1>
|
2017-08-16 21:48:59 +02:00
|
|
|
<p class="flow-text">Select a server to configure Titan Embeds. <strong>(Total server count: {{ servers|length }})</strong></p>
|
2018-07-23 07:25:00 +02:00
|
|
|
<div class="col s12">
|
|
|
|
<div class="card-panel indigo lighten-5 z-depth-3 hoverable">
|
|
|
|
<p class="black-text flow-text">Filter by ID</p>
|
|
|
|
<div class="row">
|
|
|
|
<div class="input-field col s12">
|
|
|
|
<input id="guild_id" type="text" class="validate black-text">
|
|
|
|
<label for="guild_id">Server/Embed ID</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-27 22:55:28 +02:00
|
|
|
<div class="row">
|
|
|
|
{% for server in servers %}
|
2018-07-23 07:25:00 +02:00
|
|
|
<div class="col l4 m6 s12 guild-card" data-guildid="{{ server.guild_id }}">
|
2017-07-27 22:55:28 +02:00
|
|
|
<div class="card-panel indigo lighten-5 z-depth-3 hoverable">
|
|
|
|
<div class="row valign-wrapper">
|
|
|
|
<div class="col s3">
|
|
|
|
{% if server.icon %}
|
2017-07-27 23:15:24 +02:00
|
|
|
<img src="{{ icon_generate(server.guild_id, server.icon) }}" alt="" class="circle responsive-img">
|
2017-07-27 22:55:28 +02:00
|
|
|
{% else %}
|
|
|
|
<span class="black-text">No icon :(</span>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="col s7">
|
|
|
|
<span class="black-text">
|
2018-01-24 06:42:47 +01:00
|
|
|
<p class="flow-text truncate">{{ server.name|e }}</p>
|
2017-07-27 23:15:24 +02:00
|
|
|
<a class="waves-effect waves-light btn" href="{{url_for('admin.administrate_guild', guild_id=server['guild_id'])}}">Modify</a>
|
2017-07-27 22:55:28 +02:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-07-23 07:25:00 +02:00
|
|
|
<div class="s12 black-text">
|
|
|
|
<p>ID: <code>{{ server.guild_id }}</code></p>
|
|
|
|
</div>
|
2017-07-27 22:55:28 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
2018-07-23 07:25:00 +02:00
|
|
|
{% block script %}
|
|
|
|
<script>
|
|
|
|
$("#guild_id").keyup(function() {
|
|
|
|
var guildid = this.value.trim();
|
|
|
|
var cards = document.getElementsByClassName("guild-card");
|
|
|
|
for (var i = 0; i < cards.length; i++) {
|
|
|
|
if (cards[i].dataset.guildid.indexOf(guildid) > -1) {
|
|
|
|
cards[i].style.display = "";
|
|
|
|
} else {
|
|
|
|
cards[i].style.display = "none";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|