furmeet-bot/webproj/templates/control_panel.haml

60 lines
2.2 KiB
Plaintext

- extends 'base.haml'
- block 'title'
Control Panel | {{ block.super }}
- block 'headerText'
Control Panel
- block 'content'
.cardSection
.cardTitle
%h3 Your chats
- if tg_user.manages.all
%em.textMuted
Chats you can manage:
%ul
- for group in tg_user.manages.all
- spaceless
%li
%a{'href': "{% url 'manage_group' group.id %}"}
= group.telegram_title
%small ({{ group.telegram_id }})
- else
- spaceless
%em.textMuted
You cannot manage any group the bot is in.
.cardSection
.cardTitle
%h3 Your bots
%ul
- spaceless
- for bot in tg_user.bots.all
%li
= bot.as_user.name
@{{ bot.telegram_username }}
%small ({{ bot.telegram_id }})
%big.btn-outline.btn-outline-danger
%a{'href': "{% url 'control_panel_delete_bot' bot.id %}"}<
%i.fa.fa-times.clr-danger
%li.textMuted
@{{ settings.BOT_NAME }} (the shared bot)
%div
%form.singleLinerPair{'method': 'POST', 'action': "{% url 'control_panel_add_bot' %}"}
%input{'type': 'text', 'placeholder': 'bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11', 'name': 'token'}/
%button.btn.btn-success
%i.fa.fa-plus
- csrf_token
.cardSection
.cardTitle
%h3 Delete your account
%p<
To delete your account, type "
%em> Yes, delete my account and all its data
" on the box below and submit.
%form.singleLinerPair{'method': 'POST', 'action': "{% url 'control_panel_delete_account' %}"}
%input{'type': 'text', 'placeholder': 'Yes, delete my account and all its data', 'name': 'confirmation'}/
%button.btn.btn-danger
%i.fa.fa-trash
- csrf_token