|
|
|
@ -165,6 +165,60 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="user-section" style="background: white; border: 1px solid #dee2e6; border-radius: 12px; padding: 25px; margin: 20px 0;"> |
|
|
|
|
|
|
|
<h3 style="margin: 0 0 20px 0; color: #495057; display: flex; align-items: center; gap: 10px;"> |
|
|
|
|
|
|
|
👤 User Statistics |
|
|
|
|
|
|
|
</h3> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Recent Users --> |
|
|
|
|
|
|
|
<div style="background: #f8f9fa; border-radius: 8px; padding: 20px; grid-column: span 2;"> |
|
|
|
|
|
|
|
<h4 style="margin: 0 0 15px 0; display: flex; justify-content: space-between; align-items: center;"> |
|
|
|
|
|
|
|
<span>Recently Registered App Users</span> |
|
|
|
|
|
|
|
<a href="{% url 'admin:tournaments_customuser_changelist' %}" style="font-size: 14px; text-decoration: none; color: #007bff; display: flex; align-items: center;"> |
|
|
|
|
|
|
|
View All Users <span style="margin-left: 5px; font-size: 16px;">→</span> |
|
|
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
</h4> |
|
|
|
|
|
|
|
<div style="overflow-x: auto;"> |
|
|
|
|
|
|
|
<table style="width: 100%; border-collapse: collapse;"> |
|
|
|
|
|
|
|
<thead> |
|
|
|
|
|
|
|
<tr style="border-bottom: 2px solid #dee2e6;"> |
|
|
|
|
|
|
|
<th style="padding: 8px 12px; text-align: left;">Name</th> |
|
|
|
|
|
|
|
<th style="padding: 8px 12px; text-align: left;">Email</th> |
|
|
|
|
|
|
|
<th style="padding: 8px 12px; text-align: left;">Origin</th> |
|
|
|
|
|
|
|
<th style="padding: 8px 12px; text-align: left;">Club</th> |
|
|
|
|
|
|
|
<th style="padding: 8px 12px; text-align: left;">Date Joined</th> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
</thead> |
|
|
|
|
|
|
|
<tbody> |
|
|
|
|
|
|
|
{% for user in recent_app_users %} |
|
|
|
|
|
|
|
<tr style="border-bottom: 1px solid #dee2e6;"> |
|
|
|
|
|
|
|
<td style="padding: 8px 12px;">{{ user.first_name }} {{ user.last_name }}</td> |
|
|
|
|
|
|
|
<td style="padding: 8px 12px;">{{ user.email }}</td> |
|
|
|
|
|
|
|
<td style="padding: 8px 12px;"> |
|
|
|
|
|
|
|
{% if user.origin == 0 %} |
|
|
|
|
|
|
|
<span style="padding: 2px 6px; background: #6c757d; color: white; border-radius: 4px; font-size: 12px;">Admin</span> |
|
|
|
|
|
|
|
{% elif user.origin == 1 %} |
|
|
|
|
|
|
|
<span style="padding: 2px 6px; background: #28a745; color: white; border-radius: 4px; font-size: 12px;">Site</span> |
|
|
|
|
|
|
|
{% elif user.origin == 2 %} |
|
|
|
|
|
|
|
<span style="padding: 2px 6px; background: #007bff; color: white; border-radius: 4px; font-size: 12px;">App</span> |
|
|
|
|
|
|
|
{% else %} |
|
|
|
|
|
|
|
<span style="padding: 2px 6px; background: #6c757d; color: white; border-radius: 4px; font-size: 12px;">Unknown</span> |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
<td style="padding: 8px 12px;">{{ user.latest_event_club_name }}</td> |
|
|
|
|
|
|
|
<td style="padding: 8px 12px;">{{ user.date_joined|date:"M d, Y H:i" }}</td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
{% empty %} |
|
|
|
|
|
|
|
<tr> |
|
|
|
|
|
|
|
<td colspan="5" style="padding: 12px; text-align: center;">No recent users found.</td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
</tbody> |
|
|
|
|
|
|
|
</table> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- New User Statistics --> |
|
|
|
<!-- New User Statistics --> |
|
|
|
<div class="user-section" style="background: white; border: 1px solid #dee2e6; border-radius: 12px; padding: 25px; margin: 20px 0;"> |
|
|
|
<div class="user-section" style="background: white; border: 1px solid #dee2e6; border-radius: 12px; padding: 25px; margin: 20px 0;"> |
|
|
|
<h3 style="margin: 0 0 20px 0; color: #495057; display: flex; align-items: center; gap: 10px;"> |
|
|
|
<h3 style="margin: 0 0 20px 0; color: #495057; display: flex; align-items: center; gap: 10px;"> |
|
|
|
@ -219,52 +273,6 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Recent Users --> |
|
|
|
|
|
|
|
<div style="background: #f8f9fa; border-radius: 8px; padding: 20px; grid-column: span 2;"> |
|
|
|
|
|
|
|
<h4 style="margin: 0 0 15px 0; display: flex; justify-content: space-between; align-items: center;"> |
|
|
|
|
|
|
|
<span>Recently Registered App Users</span> |
|
|
|
|
|
|
|
<a href="{% url 'admin:tournaments_customuser_changelist' %}" style="font-size: 14px; text-decoration: none; color: #007bff; display: flex; align-items: center;"> |
|
|
|
|
|
|
|
View All Users <span style="margin-left: 5px; font-size: 16px;">→</span> |
|
|
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
</h4> |
|
|
|
|
|
|
|
<div style="overflow-x: auto;"> |
|
|
|
|
|
|
|
<table style="width: 100%; border-collapse: collapse;"> |
|
|
|
|
|
|
|
<thead> |
|
|
|
|
|
|
|
<tr style="border-bottom: 2px solid #dee2e6;"> |
|
|
|
|
|
|
|
<th style="padding: 8px 12px; text-align: left;">Name</th> |
|
|
|
|
|
|
|
<th style="padding: 8px 12px; text-align: left;">Email</th> |
|
|
|
|
|
|
|
<th style="padding: 8px 12px; text-align: left;">Origin</th> |
|
|
|
|
|
|
|
<th style="padding: 8px 12px; text-align: left;">Date Joined</th> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
</thead> |
|
|
|
|
|
|
|
<tbody> |
|
|
|
|
|
|
|
{% for user in recent_app_users %} |
|
|
|
|
|
|
|
<tr style="border-bottom: 1px solid #dee2e6;"> |
|
|
|
|
|
|
|
<td style="padding: 8px 12px;">{{ user.first_name }} {{ user.last_name }}</td> |
|
|
|
|
|
|
|
<td style="padding: 8px 12px;">{{ user.email }}</td> |
|
|
|
|
|
|
|
<td style="padding: 8px 12px;"> |
|
|
|
|
|
|
|
{% if user.origin == 0 %} |
|
|
|
|
|
|
|
<span style="padding: 2px 6px; background: #6c757d; color: white; border-radius: 4px; font-size: 12px;">Admin</span> |
|
|
|
|
|
|
|
{% elif user.origin == 1 %} |
|
|
|
|
|
|
|
<span style="padding: 2px 6px; background: #28a745; color: white; border-radius: 4px; font-size: 12px;">Site</span> |
|
|
|
|
|
|
|
{% elif user.origin == 2 %} |
|
|
|
|
|
|
|
<span style="padding: 2px 6px; background: #007bff; color: white; border-radius: 4px; font-size: 12px;">App</span> |
|
|
|
|
|
|
|
{% else %} |
|
|
|
|
|
|
|
<span style="padding: 2px 6px; background: #6c757d; color: white; border-radius: 4px; font-size: 12px;">Unknown</span> |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
<td style="padding: 8px 12px;">{{ user.latest_event_club_name }}</td> |
|
|
|
|
|
|
|
<td style="padding: 8px 12px;">{{ user.date_joined|date:"M d, Y H:i" }}</td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
{% empty %} |
|
|
|
|
|
|
|
<tr> |
|
|
|
|
|
|
|
<td colspan="4" style="padding: 12px; text-align: center;">No recent users found.</td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
</tbody> |
|
|
|
|
|
|
|
</table> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|