-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from EarthSchlange/add_player_list_without_dj…
…ango_tables2 add player list without django tables2
- Loading branch information
Showing
6 changed files
with
194 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
from agagd_core.views import beta as agagd_beta_views | ||
from django.conf.urls import url | ||
from agagd_core.views import beta | ||
from django.urls import path | ||
|
||
urlpatterns = (url(r"$", agagd_beta_views.index),) | ||
# Note: Based of request for single qoutes. | ||
# fmt: off | ||
beta_patterns = ([ | ||
path('', beta.index, name='index'), | ||
path('players/', beta.list_all_players, name='players_list'), | ||
], 'beta') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{% extends "base.beta.html" %} | ||
|
||
{% block content %} | ||
<section id="list-all-players-block" class="container"> | ||
<section class="row"> | ||
<section class="col-sm-12 col-md-12 col-lg-12"> | ||
<h5 class="table-headers list-all-players-table-headers">Members Ratings</h5> | ||
|
||
<div class="list-all-players-table"> | ||
<table class="table"> | ||
<thead class="thead-dark"> | ||
<tr> | ||
<th scope="col">#</th> | ||
{% for player_column in list_all_players_columns %} | ||
<th scope="col" {% if player_column.attrs %} class="{{ player_column.attrs }}" {% endif %}>{{ player_column.name }}</th> | ||
{% endfor %} | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
{% for player_data in list_all_players_data %} | ||
<tr> | ||
<th scope="row"> | ||
{{ forloop.counter0|add:list_all_players_data.start_index }} | ||
</th> | ||
<td> | ||
<a href="/player/{{ player_data.member_id }}"> | ||
{{ player_data.full_name }} ({{ player_data.member_id }}) | ||
</a> | ||
</td> | ||
<td> | ||
{% if player_data.chapters__name %} | ||
<a href="/chapter/{{ player_data.chapter_id }}">{{ player_data.chapters__name }}</a> | ||
{% else %} | ||
— | ||
{% endif %} | ||
</td> | ||
<td class="{{ mobile_column_attrs }}">{{ player_data.state }}</td> | ||
<td class="{{ mobile_column_attrs }}"> | ||
{{ player_data.type }} | ||
</td> | ||
<td> | ||
{{ player_data.players__rating }} | ||
</td> | ||
<td class="{{ mobile_column_attrs }}"> | ||
{{ player_data.players__sigma }} | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
|
||
<nav aria-label="Table Page Navigation"> | ||
|
||
{% if list_all_players_data.has_other_pages %} | ||
<ul class="pagination justify-content-center"> | ||
{% if list_all_players_data.has_previous %} | ||
<li class="previous page-item"> | ||
<a href="?pg={{ list_all_players_data.previous_page_number }}" class="page-link">«</a> | ||
</li> | ||
{% endif %} | ||
|
||
{% for page_number in list_all_players_data.paginator.page_range %} | ||
<li class="page-item {% if list_all_players_data.number == page_number %} active {% endif %}"> | ||
<a href="?pg={{ page_number }}" class="page-link">{{ page_number }}</a> | ||
</li> | ||
{% endfor %} | ||
|
||
{% if list_all_players_data.has_next %} | ||
<li class="next page-item"> | ||
<a href="?pg={{ list_all_players_data.next_page_number }}" class="page-link">»</a> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
{% endif %} | ||
</nav> | ||
</div> | ||
</section> | ||
</section> | ||
</section> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,15 @@ | |
|
||
<html> | ||
<head> | ||
<title>{% block title %} AGAGD | American Go Game Database {% endblock title %}</title> | ||
<title> | ||
{% block title %} | ||
{% if page_title %} | ||
{{ "AGAGD | "|add:page_title }} | ||
{% else %} | ||
AGAGD | American Go Game Database | ||
{% endif %} | ||
{% endblock title %} | ||
</title> | ||
{% block css %} | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous"> | ||
{% endblock %} | ||
|
@@ -58,23 +66,32 @@ <h6 class="header-subtext"> | |
<footer class="footer mx-3"> | ||
<nav class="footer-nav"> | ||
{% block footer_nav %} | ||
<h5>Ratings</h5> | ||
<ul class="list-unstyled"> | ||
<li> | ||
<a href="/information/">Information</a> | ||
</li> | ||
<section class="container footer-nav-sections"> | ||
<section class="row"> | ||
<div class="col-12 col-md-3"> | ||
<h5>Ratings</h5> | ||
<ul class="list-unstyled"> | ||
<li> | ||
<a href="{% url 'beta:players_list' %}">Members Ratings</a> | ||
</li> | ||
<li> | ||
<a href="/information/">Information</a> | ||
</li> | ||
|
||
<li> | ||
<a href="/qualifications/">Qualifications</a> | ||
</li> | ||
</ul> | ||
<li> | ||
<a href="/qualifications/">Qualifications</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</section> | ||
</section> | ||
{% endblock footer_nav %} | ||
</nav> | ||
|
||
<section class="footer-copy"> | ||
{% block footer_copy %} | ||
<div class="footer-copyright text-center">© 2020 <a href="https://www.usgo.org">American Go Association</a></div> | ||
{% endblock footer_copy %} | ||
{% endblock footer_copy %} | ||
</section> | ||
</footer> | ||
</section> | ||
|