2022-09-02 23:58:55 +00:00
|
|
|
{% extends "default.html" %}
|
2022-11-19 22:20:38 +00:00
|
|
|
{% block pagetitle %}Hats{% endblock %}
|
2022-09-02 23:58:55 +00:00
|
|
|
{% block pagetype %}message{% endblock %}
|
|
|
|
|
2022-11-21 08:52:22 +00:00
|
|
|
{% block banner %}
|
2023-09-15 11:01:04 +00:00
|
|
|
<div class="container-fluid bg-white sticky shop-tabs" style="padding-bottom: 0 !important">
|
2022-09-18 17:12:28 +00:00
|
|
|
<div class="row box-shadow-bottom">
|
2022-09-19 18:30:54 +00:00
|
|
|
<div class="col p-0">
|
2023-09-15 11:01:04 +00:00
|
|
|
<div class="container" style="padding-bottom: 0">
|
|
|
|
<div class="row box-shadow-bottom bg-white" style="justify-content: center">
|
2023-02-19 09:34:10 +00:00
|
|
|
<a class="btn btn-primary btn-block m-0 shop-tab" href="/shop/awards">
|
2022-09-18 17:12:28 +00:00
|
|
|
<span class="mr-auto ml-auto"><i class="fas fa-gift mr-2"></i>AWARDS</span>
|
|
|
|
</a>
|
2023-02-19 09:34:10 +00:00
|
|
|
<a class="btn btn-primary btn-block m-0 shop-tab active" href="/shop/hats">
|
2022-09-18 17:12:28 +00:00
|
|
|
<span class="mr-auto ml-auto"><i class="fas fa-hat-cowboy mr-2"></i>HATS</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2023-05-03 17:26:44 +00:00
|
|
|
<header id="shop-header" class="container text-center pb-0">
|
2024-08-13 16:44:26 +00:00
|
|
|
<img id="shop-banner" class="mt-5" alt="shop banner" src="{{SITE_FULL_IMAGES}}/i/hats.webp?h=8">
|
2023-05-03 17:26:44 +00:00
|
|
|
<ul id="shop-stats" class="my-1 my-md-2">
|
2024-06-21 17:09:27 +00:00
|
|
|
<li class="mt-2">Number of hats you bought: {{v.num_of_owned_hats|commas}}</li>
|
|
|
|
<li>Number of hats you designed: {{v.num_of_designed_hats|commas}}</li>
|
|
|
|
<li>Number of hats: {{num_of_hats|commas}}</li>
|
2024-03-09 11:39:13 +00:00
|
|
|
<li>Currency you spent on hats: {{v.currency_spent_on_hats|commas}}</li>
|
|
|
|
<li>Total currency spent on hats: {{sales|commas}}</li>
|
|
|
|
<li>Your current coins: {{v.coins|commas}}</li>
|
2023-05-03 17:26:44 +00:00
|
|
|
{% if FEATURES['MARSEYBUX'] %}
|
2024-03-09 11:39:13 +00:00
|
|
|
<li>Your current marseybux: {{v.marseybux|commas}}</li>
|
2023-05-03 17:26:44 +00:00
|
|
|
{% endif %}
|
|
|
|
</ul>
|
2022-09-03 01:11:10 +00:00
|
|
|
</header>
|
|
|
|
{% endblock %}
|
|
|
|
|
2022-09-02 23:58:55 +00:00
|
|
|
{% block content %}
|
2024-08-03 20:02:39 +00:00
|
|
|
{% if FEATURES['HAT_SUBMISSIONS'] %}
|
|
|
|
<a href="/submit/hats" class="btn btn-primary btn-block mt-4 mb-5">Submit Hats</a>
|
|
|
|
{% endif %}
|
|
|
|
|
2022-12-29 14:20:27 +00:00
|
|
|
<script defer src="{{'js/hats.js' | asset}}"></script>
|
2022-09-03 20:45:06 +00:00
|
|
|
|
2023-05-03 17:26:44 +00:00
|
|
|
<div class="overflow-x-auto mt-3 mb-5">
|
2024-02-12 14:21:51 +00:00
|
|
|
<table class="datatable d-none shop">
|
2024-02-12 14:18:13 +00:00
|
|
|
<thead>
|
2022-09-02 23:58:55 +00:00
|
|
|
<tr>
|
2024-02-02 18:12:32 +00:00
|
|
|
<th class="disable-sort-click">Hat</th>
|
2024-04-06 06:24:16 +00:00
|
|
|
<th class="disable-sort-click">Name</th>
|
|
|
|
<th class="disable-sort-click">Description</th>
|
2022-11-11 13:52:18 +00:00
|
|
|
{% if SITE == 'rdrama.net' %}
|
2024-04-06 06:24:16 +00:00
|
|
|
<th class="disable-sort-click">Author</a></th>
|
2022-09-02 23:58:55 +00:00
|
|
|
{% endif %}
|
2024-04-06 06:24:16 +00:00
|
|
|
<th class="disable-sort-click">Owners</th>
|
|
|
|
<th class="disable-sort-click">Price</th>
|
2024-02-02 18:12:32 +00:00
|
|
|
<th class="disable-sort-click">Actions</th>
|
2024-04-06 06:24:16 +00:00
|
|
|
<th class="disable-sort-click">Added on</th>
|
2024-02-02 18:12:32 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
{% for hat, user in hats %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<div class="profile-pic-75-wrapper mt-4">
|
|
|
|
<img loading="lazy" alt="avatar" src="{{v.profile_url}}" class="profile-pic-75">
|
2024-08-13 16:44:26 +00:00
|
|
|
<img loading="lazy" alt="{{hat.name}}" class="profile-pic-75-hat" src="{{SITE_FULL_IMAGES}}/i/hats/{{hat.name}}.webp?h=8">
|
2022-09-03 19:11:02 +00:00
|
|
|
</div>
|
2024-02-02 18:12:32 +00:00
|
|
|
</td>
|
|
|
|
<td>{{hat.name}}</td>
|
|
|
|
<td>{{hat.censored_description(v)}}</td>
|
|
|
|
{% if SITE == 'rdrama.net' %}
|
|
|
|
<td>{% include "user_in_table.html" %}</td>
|
2022-09-02 23:58:55 +00:00
|
|
|
{% endif %}
|
2024-06-21 17:09:27 +00:00
|
|
|
<td><a href="/hat_owners/{{hat.id}}">{{hat.number_sold|commas}}</a></td>
|
|
|
|
<td>{{hat.price|commas}}</td>
|
2024-02-02 18:12:32 +00:00
|
|
|
<td class="shop-table-actions" style="width:unset">
|
|
|
|
{% if hat.id not in owned_hat_ids and hat.is_purchasable %}
|
|
|
|
<div id="if-not-owned-{{hat.id}}">
|
|
|
|
<button type="button" id="buy-{{hat.id}}" class="btn btn-success {% if v.coins+v.marseybux < hat.price %}disabled{% endif %}" data-areyousure="postToastSwitch(this, '/buy_hat/{{hat.id}}', 'if-not-owned-{{hat.id}}', 'if-owned-{{hat.id}}', 'd-none')" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)">Buy</button>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-09-03 19:11:02 +00:00
|
|
|
|
2024-02-02 18:12:32 +00:00
|
|
|
<div id="if-owned-{{hat.id}}" {% if hat.id not in owned_hat_ids %}class="d-none"{% endif %}>
|
|
|
|
<button type="button" id="equip-{{hat.id}}" class="equip {% if hat.id in v.equipped_hat_ids %}d-none{% endif %} btn btn-success" data-nonce="{{g.nonce}}" data-onclick="equip_hat(this, '{{hat.id}}', '{{hat.name}}')">Equip</button>
|
2023-09-07 08:41:39 +00:00
|
|
|
|
2024-02-02 18:12:32 +00:00
|
|
|
<button type="button" id="unequip-{{hat.id}}" class="unequip {% if hat.id not in v.equipped_hat_ids %}d-none{% endif %} btn btn-success" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this, '/unequip_hat/{{hat.id}}', 'equip-{{hat.id}}', 'unequip-{{hat.id}}', 'd-none')">Unequip</button>
|
|
|
|
</div>
|
|
|
|
</td>
|
2022-09-18 17:18:44 +00:00
|
|
|
|
2024-02-23 21:25:00 +00:00
|
|
|
<td data-sort="{{hat.created_utc}}" data-time="{{hat.created_utc}}"></td>
|
2024-02-02 18:12:32 +00:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2023-01-01 11:36:20 +00:00
|
|
|
|
2024-02-01 18:24:22 +00:00
|
|
|
<link rel="stylesheet" href="{{('css/datatables.css') | asset}}">
|
|
|
|
<script defer src="{{'js/vendor/jquery.js' | asset}}"></script>
|
|
|
|
<script defer src="{{'js/vendor/datatables.js' | asset}}"></script>
|
2023-05-05 03:13:17 +00:00
|
|
|
{% endblock %}
|