1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
cyberplanificateur/app/templates/dashboard.html

113 lines
3.8 KiB
HTML
Raw Permalink Normal View History

{% extends "template.html" %}
{% block content %}
<!-- Main -->
<article id="main">
<header>
<h2>Dashboard</h2>
<p>Your personal dashboard</p>
</header>
<section class="wrapper style5">
<div class="inner">
<h3>Current automatized tweets</h3>
<hr />
2019-04-29 15:53:18 +02:00
{% if current_user.twitter_api.first() %}
<table>
<thead>
<tr>
<th class="align-center">Tweet</th>
<th class="align-center">Slots</th>
<th class="align-center">Keywords</th>
<th class="align-center">Actions</th>
</tr>
</thead>
<tbody>
{% for t in tweets %}
<tr>
<td><blockquote>{{ t['text'] }}</blockquote></td>
<td class="align-center">{{ t['slots'] }}</td>
<td class="align-center">{{ t['keywords'] }}</td>
<td class="align-right"><a href="https://cyberplanificateur.flifloo.fr/dashboard?twrm={{ t['id']}}" class="button primary">Disable</a>
<a href="https://cyberplanificateur.flifloo.fr/dashboard?twrm={{ t['id']}}&delet=True" class="button">Delet</a></td>
</tr>
{% endfor %}
</tbody>
</table>
2019-04-29 15:53:18 +02:00
{% else %}
<h4>Twitter API not connected</h4>
{% endif %}
<hr />
<h3>Add an automatized tweet</h3>
<hr />
2019-04-29 15:53:18 +02:00
{% if current_user.twitter_api.first() %}
<form action = "https://cyberplanificateur.flifloo.fr/dashboard" method = "POST">
<section>
<div class="row">
<div class="col-6 col-12-medium">
{% for t in timeline %}
<div class="col-4 col-12-small">
<input type="radio" id="{{ t['id'] }}" name="tweet" value="{{ t['id'] }}">
<label for="{{ t['id'] }}">{{ t['text'] }}</label>
</div>
{% endfor %}
</div>
<div class="col-6 col-12-medium">
<input type="text" name="slots" placeholder="Slots number" />
<input type="text" name="keywords" placeholder="Keywords (separate with a comma)" />
</div>
</div>
</section>
2019-04-29 15:53:18 +02:00
<input type="submit" value="Select" class="button primary">
</form>
2019-04-29 15:53:18 +02:00
{% else %}
<h4>Twitter API not connected</h4>
{% endif %}
<hr />
<h3>Trello board</h3>
<hr />
2019-04-29 15:53:18 +02:00
{% if current_user.trello_api.first() %}
<section>
<div class="row">
<div class="col-6 col-12-medium">
<h4>Choose a board</h4>
<form action="https://cyberplanificateur.flifloo.fr/dashboard" method="POST">
{% for b in boards %}
<div class="col-4 col-12-small">
2019-04-29 15:53:18 +02:00
<input type="radio" id="{{ b['id'] }}" name="board" value="{{ b['id'] }}" {% if b['select'] %} checked="checked" {% endif %}>
<label for="{{ b['id'] }}">{{ b['text'] }}</label>
</div>
{% endfor %}
<input type="submit" value="Select" class="button primary">
</form>
</div>
<div class="col-6 col-12-medium">
<h4>Choose a column</h4>
2019-04-29 15:53:18 +02:00
{% if columns %}
<form action="https://cyberplanificateur.flifloo.fr/dashboard" method="POST">
{% for c in columns %}
<div class="col-4 col-12-small">
2019-04-29 15:53:18 +02:00
<input type="radio" id="{{ c['id'] }}" name="column" value="{{ c['id'] }}" {% if c['select'] %} checked="checked" {% endif %}>
<label for="{{ c['id'] }}">{{ c['text'] }}</label>
</div>
{% endfor %}
<input type="submit" value="Select" class="button primary">
</form>
2019-04-29 15:53:18 +02:00
{% else %}
<p>No board set yet</p>
{% endif %}
</div>
</div>
</section>
2019-04-29 15:53:18 +02:00
{% else %}
<h4>Trello API not connected</h4>
{% endif %}
<hr />
</div>
</section>
</article>
{% endblock %}