18 lines
1.4 KiB
HTML
18 lines
1.4 KiB
HTML
{% extends "minecraft_manager/dashboard.html" %}
|
|
{% load csrf_html %}
|
|
{% load getattribute %}
|
|
{% block title %}Bots{% endblock %}
|
|
{% block section %}
|
|
<div id="content">
|
|
<!-- {{ form.status }} -->
|
|
{% for bot in form.bots %}
|
|
<p>{{ bot.name }}: <span class="label {% if form|getattribute:bot.name is True %}label-success{% else %}label-danger{% endif %}">{% if form|getattribute:bot.name is True %}Started{% else %}Stopped{% endif %}</span></p>
|
|
<form action="" method="post">{% autoescape off %}{% get_csrf_html request %}{% endautoescape %}
|
|
<button class="btn btn-primary{% if form|getattribute:bot.name is True %} disabled{% endif %}" type="submit" name="{{ bot.name }}" value="start" {% if form|getattribute:bot.name is True %} disabled="disabled"{% endif %}>Start</button>
|
|
<button class="btn btn-primary{% if form|getattribute:bot.name is False %} disabled{% endif %}" type="submit" name="{{ bot.name }}" value="stop" {% if form|getattribute:bot.name is False %}disabled="disabled"{% endif %}>Stop</button>
|
|
<button class="btn btn-primary{% if form|getattribute:bot.name is False %} disabled{% endif %}" type="submit" name="{{ bot.name }}" value="restart" {% if form|getattribute:bot.name is False %}disabled="disabled"{% endif %}>Restart</button>
|
|
</form>
|
|
<br/>
|
|
{% endfor %}
|
|
</div>
|
|
{% endblock section %} |