134 lines
7.1 KiB
HTML
134 lines
7.1 KiB
HTML
<details id="room">
|
|
<summary role="button"><img src="/res/icons/bedroom.svg" class="icon"/> Accomodation & Roommates {% if not order.room_confirmed %}<span class="status">⚠️</span>{% endif %}</summary>
|
|
<h2 style="margin-bottom:0;">Your room {% if room_members %}- {{room_members[0].ans('room_name')}}{% endif %}</h2>
|
|
<p><b>Room's type:</b> {{ROOM_TYPE_NAMES[order.bed_in_room]}}.</p>
|
|
<p class="notice" style="background:#0881c0"><b>Note! </b> Only people with the same room type can be roommates. If you need help, contact the <a href="https://furizon.net/contact/">Furizon's Staff</a>.</p>
|
|
|
|
{# Show alert if room owner has wrong people inside #}
|
|
|
|
{# {% if room_members and quota.get_left(len(room_members)) == 0 and (not order.room_confirmed) %} #}
|
|
{# <p class="notice">⚠️ Your room contains {{len(room_members)}} people inside, but sadly there are no more {{[None,'single','double','triple','quadruple','quintuple'][len(room_members)]}} rooms. You need to add or remove people until you reach the size of an available room if you want to confirm it.</p> #}
|
|
{# {% endif %} #}
|
|
|
|
{# Show alert if room was not confirmed #}
|
|
{% if order.room_id and not order.room_confirmed %}
|
|
<p class="notice">⚠️ Your room hasn't been confirmed yet. Unconfirmed rooms are subject to changes by the staff as we optimize for hotel capacity.</p>
|
|
{% endif %}
|
|
|
|
{# Show notice if the room is confirmed #}
|
|
{% if order.room_confirmed %}
|
|
{# <p class="notice" style="background:#060">✅ Your <strong>{{[None,'single','double','triple','quadruple','quintuple'][len(room_members)]}}</strong> room has been confirmed</p> #}
|
|
<p class="notice" style="background:#060">✅ Your <strong>{{[None,'single','double','triple','quadruple','quintuple'][order.room_person_no]}}</strong> room has been confirmed</p>
|
|
{% endif %}
|
|
|
|
{# Show roommates if room is set #}
|
|
{% set room = namespace(forbidden=false) %}
|
|
{% if order.room_id %}
|
|
<div class="grid people" style="padding-bottom:1em;">
|
|
{% for person in room_members %}
|
|
<div style="margin-bottom: 1em;">
|
|
{% with current=order, order=person, imgSrc='/res/propic/' + (person.ans('propic') or 'default.png'), effects = true, flag = true %}
|
|
{% include 'blocks/propic.html' %}
|
|
{% endwith %}
|
|
<h3>{{person.ans('fursona_name')}}</h3>
|
|
{% if person.code == order.room_id %}<p><strong style="color:#c6f">ROOM OWNER</strong></p>{% endif %}
|
|
<p>{{person.ans('staff_title') if person.ans('staff_title') else ''}} {{'Fursuiter' if person.is_fursuiter}}</p>
|
|
{% if person.status == 'pending' %}
|
|
<p><strong style="color:red;">UNPAID</strong></p>
|
|
{% endif %}
|
|
{% if order.room_owner and person.code != order.code and (not order.room_confirmed) %}<a href="/manage/room/kick/{{person.code}}">KICK</a>{% endif %}
|
|
</div>
|
|
|
|
{% if person.status != 'paid' %}
|
|
{% set room.forbidden = True %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{# {% if order.room_id == order.code and not order.room_confirmed and len(room_members) < 5%} #}
|
|
{% if order.room_id == order.code and not order.room_confirmed and len(room_members) < order.room_person_no %}
|
|
<div>
|
|
<a href="javascript:document.getElementById('modal-roominvite').setAttribute('open', 'true');">
|
|
<div class="propic-container">
|
|
<img class="propic" src="/res/new.png" />
|
|
<h3>Invite</h3>
|
|
<p>Get room code</p>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% elif order.pending_room %}
|
|
<p>You have have asked to join the room of another member. Wait for them to confirm or reject your request.</p>
|
|
<a role="button" href="/manage/room/cancel_request">Cancel pending join request</a>
|
|
{% else %}
|
|
<p class="notice">🎲 If you don't join a room or create your one within the room deadline, we will randomly put you into a room with free spots.</p>
|
|
<p>To join a room, ask somebody to send you their room code.</p>
|
|
<p class="grid">
|
|
<a role="button" href="/manage/room/create">Create a room</a>
|
|
<a role="button" href="javascript:document.getElementById('modal-joinroom').setAttribute('open', 'true');">Join a room</a>
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% if order.room_owner and not order.room_confirmed %}
|
|
{% if room.forbidden %}
|
|
<p class="notice">⚠️ There are roommates for which a payment was not received yet, you will be able to confirm this room only once all payments are completed.</p>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<p class="grid grid_2x2">
|
|
{% if order.room_owner %}
|
|
|
|
{% if not order.room_confirmed %}
|
|
{# <a role="button" {% if not room.forbidden and quota.get_left(len(room_members)) > 0 %}href="javascript:document.getElementById('modal-roomconfirm').setAttribute('open', 'true');"{% endif %}>Confirm <strong>{{[None,'single','double','triple','quadruple','quintuple'][len(room_members)]}}</strong> room</a> #}
|
|
|
|
<a style="grid-area: 1 / 1 / 2 / 2;" role="button" href="javascript:document.getElementById('modal-roomrename').setAttribute('open', 'true');">Rename room</a>
|
|
<a style="grid-area: 1 / 2 / 2 / 3;" href="/manage/room/delete" role="button" {{'disabled' if (len(room_members) > 1) else ''}} >Delete room</a>
|
|
<a style="grid-area: 2 / 1 / 3 / 3; display:block;" role="button" {% if not room.forbidden and len(room_members) == order.room_person_no %}href="javascript:document.getElementById('modal-roomconfirm').setAttribute('open', 'true');"{% endif %}>Confirm <strong>{{[None,'single','double','triple','quadruple','quintuple'][order.room_person_no]}}</strong> room</a>
|
|
{% else %}
|
|
{# <a style="grid-area: 1 / 1 / 2 / 2;" role="button" href="javascript:navigator.share({title: 'Furizon room', text:'Viewing room {{order.room_name}}', url: `${window.location.protocol}//${window.location.host}/manage/room/view/{{order.code}}}`});">Share</a> #}
|
|
{% endif %}
|
|
{% else %}
|
|
{% if order.room_id and not order.room_confirmed %}
|
|
<a href="/manage/room/leave" role="button">Leave room</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
</p>
|
|
|
|
{# Pending roommates #}
|
|
{% if pending_roommates %}
|
|
<h4>Pending roommates</h4>
|
|
<p>These people have asked to join your room.</p>
|
|
<table>
|
|
{% for person in pending_roommates %}
|
|
<tr>
|
|
<td style="width:4em;"><img style="width:2em;height:2em;" class="propic" src="/res/propic/{{person.ans('propic') or 'default.png'}}" /></td>
|
|
<td>{{person.name}}</td>
|
|
{% if person.status == 'pending' %}
|
|
<td><strong style="color:red;">UNPAID</strong></td>
|
|
{% endif %}
|
|
{% if order.room_owner %}
|
|
<td style="width:1%;white-space: nowrap;"><a role="button" href="/manage/room/approve/{{person.code}}">Approve</a></td>
|
|
<td style="width:1%;white-space: nowrap;"><a role="button" href="/manage/room/reject/{{person.code}}">Reject</a></td>
|
|
{% endif %}
|
|
</tr>
|
|
</div>
|
|
|
|
{% if person.status != 'paid' %}
|
|
{% set room.forbidden = True %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
|
|
{# Room availability is always shown #}
|
|
{# <h4>Room availability</h4> #}
|
|
{# <table> #}
|
|
{# {% for q in quota.data['results'] if 'Room' in q['name'] %} #}
|
|
{# <tr {% if q['available_number'] == 0 %}style="text-decoration:line-through;"{% endif %}> #}
|
|
{# <td>{{q['name']}}</td> #}
|
|
{# <td>{{q['available_number']}} left</td> #}
|
|
{# </tr> #}
|
|
{# {% endfor %} #}
|
|
{# </table> #}
|
|
</details>
|