furmeet-bot/webproj/templates/control_panel.haml

60 lines
2.2 KiB
Plaintext
Raw Normal View History

2020-07-09 20:39:12 +00:00
- extends 'base.haml'
- block 'title'
Control Panel | {{ block.super }}
- block 'headerText'
Control Panel
- block 'content'
2020-07-10 04:57:06 +00:00
.cardSection
.cardTitle
%h3 Your chats
2020-09-01 21:54:51 +00:00
- if tg_user.manages.all
2020-07-10 04:57:06 +00:00
%em.textMuted
2020-09-01 21:54:51 +00:00
Chats you can manage:
2020-07-10 04:57:06 +00:00
%ul
2020-09-01 21:54:51 +00:00
- for group in tg_user.manages.all
2020-07-10 04:57:06 +00:00
- spaceless
%li
%a{'href': "{% url 'manage_group' group.id %}"}
= group.telegram_title
%small ({{ group.telegram_id }})
- else
- spaceless
%em.textMuted
2020-09-02 00:38:34 +00:00
You cannot manage any group the bot is in.
2020-07-10 04:57:06 +00:00
.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