first init of this template.
This commit is contained in:
27
teamsnap/templates/teamsnap/availabilities.html
Normal file
27
teamsnap/templates/teamsnap/availabilities.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% extends "base.html" %}{% load static %}
|
||||
{% block title %} {{ title }}{% endblock %}
|
||||
{% block page_heading %}Schedule{% endblock %}
|
||||
{% block content %}
|
||||
{% load tz %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sm">
|
||||
{# <thead>#}
|
||||
{# </thead>#}
|
||||
<tbody>
|
||||
{% for event in events %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{% url 'teamsnap_event' id=event.data.id team_id=schedule.html %}">{{ event.data.formatted_title }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ event.data.start_date | localtime}}
|
||||
</td>
|
||||
<td>
|
||||
{{ event.data.location_name }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,116 +0,0 @@
|
||||
{% extends "base.html" %}{% load static %}
|
||||
{% block title %} {{ event.data.formatted_title }}{% endblock %}
|
||||
{% block page_heading %}{{ event.data.formatted_title }}{% endblock %}
|
||||
{% block page_subheading %}{{ event.data.start_date }}, {{ event.data.location_name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h6>Lineup</h6>
|
||||
<form method="post" action="{% url 'teamsnap_submit_lineup' team_id=team_id event_id=event_id %}">
|
||||
{{ formset.management_form }}
|
||||
{% csrf_token %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sm" id="table-event-lineup">
|
||||
<tbody id="tablebody-event-lineup">
|
||||
{% for form in formset %}
|
||||
{% if form.event_lineup_entry_id.value %}
|
||||
<tr>
|
||||
{{ form.event_lineup_entry_id.as_hidden }}
|
||||
{{ form.event_lineup_id.as_hidden }}
|
||||
{{ form.event_id.as_hidden }}
|
||||
{{ form.member_id.as_hidden }}
|
||||
{{ form.sequence.as_hidden }}
|
||||
{{ form.label.as_hidden }}
|
||||
{{ form.member_name.as_hidden }}
|
||||
|
||||
<td class="col-1 px-1">
|
||||
{{ forloop.counter }}
|
||||
</td>
|
||||
<td class="col-auto">
|
||||
{{ form.member_name.value }}
|
||||
</td>
|
||||
<td class="col-3">
|
||||
<div class="form-select-sm">{{ form.label }}</div>
|
||||
</td>
|
||||
<td class="col-1">
|
||||
<div class="d-flex">
|
||||
<div class="px-1">
|
||||
<i class="bi bi-dash-circle text-danger"></i>
|
||||
{{ form.DELETE.as_hidden }}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="col-1 drag-handle">
|
||||
<i class="bi bi-grip-vertical text-secondary"></i>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<input class="btn btn-success" type="submit" value="Submit">
|
||||
</form>
|
||||
<h6>Bench</h6>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sm">
|
||||
{# <thead>#}
|
||||
{# <th scope="row">#}
|
||||
{# <td>Status</td>#}
|
||||
{# <td>Last</td>#}
|
||||
{# <td>First</td>#}
|
||||
{# </th>#}
|
||||
{# </thead>#}
|
||||
|
||||
{% for availability in availablities %}
|
||||
{% if availability.data.member_is_non_player is False %}
|
||||
<tr>
|
||||
<td class="col-1">
|
||||
{% if availability.data.status_code == 1 %}
|
||||
<i class="bi bi-check-circle-fill text-success"></i>
|
||||
{% endif %}
|
||||
{% if availability.data.status_code == 0 %}
|
||||
<i class="bi bi-x-circle-fill text-danger"></i>
|
||||
{% endif %}
|
||||
{% if availability.data.status_code == None %}
|
||||
<i class="bi bi-circle"></i>
|
||||
{% endif %}
|
||||
{% if availability.data.status_code == 2 %}
|
||||
<i class="bi bi-circle-half text-info"></i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="col-auto">
|
||||
{{ availability.data.member_first_name }} {{ availability.data.member_last_name }}
|
||||
</td>
|
||||
<td class="col-3">
|
||||
</td>
|
||||
<td class="col-1">
|
||||
<div class="d-flex">
|
||||
<div class="px-1">
|
||||
<i class="bi bi-plus-circle"></i>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script src="{% static 'js/Sortable.js' %}"></script>
|
||||
<script id="sortable">
|
||||
var lineup = new Sortable.create(
|
||||
document.getElementById('tablebody-event-lineup'), {
|
||||
animation: 150,
|
||||
ghostClass:"ghost",
|
||||
handle: ".drag-handle",
|
||||
group:{
|
||||
put:true,
|
||||
pull:true
|
||||
},
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
76
teamsnap/templates/teamsnap/event/instagen.html
Normal file
76
teamsnap/templates/teamsnap/event/instagen.html
Normal file
@@ -0,0 +1,76 @@
|
||||
<html lang="en">
|
||||
{% extends "base.html" %}{% load static %}
|
||||
{% block title %} {{ event.data.formatted_title }} - Instagenerator{% endblock %}
|
||||
{% block page_heading %}
|
||||
<div class="row d-inline-flex">
|
||||
<div class="col">
|
||||
<img src="{% static 'teamsnap/ig/graphics/hounds-insta.jpg' %}" class="mx-auto d-block img-fluid shadow-sm" style="height:30px;border-radius: 8px;">
|
||||
</div>
|
||||
<div class="col text-nowrap px-0">Hounds Instagenerator</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block page_subheading %}{{ event.data.formatted_title }}, {{ event.data.start_date }}, {{ event.data.location_name }}{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<form method="get" action="generate">
|
||||
|
||||
<div class="mb-3">
|
||||
<select hidden class="form-select" name="game_id" id="game_id">
|
||||
<optgroup label="Events">
|
||||
<option value="" disabled="disabled">Select an event...</option>
|
||||
<option selected value="{{event.data.id}}">{{event.data.formatted_title}}</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<legend class="">Background</legend>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="background" id="backgroundLocation" checked value="location">
|
||||
<label class="form-check-label" for="backgroundLocation">
|
||||
Location
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="background" id="backgroundTransparent" value="transparent">
|
||||
<label class="form-check-label" for="backgroundTransparent">
|
||||
Transparent
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="background" id="badge_only" value="badge">
|
||||
<label class="form-check-label" for="badge_only">
|
||||
Badge only
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<legend class="">Layout</legend>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="dimensions" id="square" checked value="1080x1080">
|
||||
<label class="form-check-label" for="square">
|
||||
Square
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="dimensions" id="portrait" value="1080x1920">
|
||||
<label class="form-check-label" for="portrait">
|
||||
Portrait
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="dimensions" id="portrait" value="1920x1080">
|
||||
<label class="form-check-label" for="portrait">
|
||||
Landscape
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-lg-flex justify-content-lg-end align-items-lg-center mb-3">
|
||||
<button type="submit" class="btn btn-primary btn-block">Get Image</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
12
teamsnap/templates/teamsnap/lineup/edit.html
Normal file
12
teamsnap/templates/teamsnap/lineup/edit.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends "base.html" %}{% load static %}
|
||||
{% block title %} {{ event.data.formatted_title }}{% endblock %}
|
||||
{% block page_heading %}{{ event.data.formatted_title }}{% endblock %}
|
||||
{% block page_subheading %}{{ event.data.start_date }}, {{ event.data.location_name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'teamsnap/lineup/widgets/lineup.html' with formset_lineup=formset_lineup formset_bench=formset_bench%}
|
||||
|
||||
<script src="{% static 'js/Sortable.js' %}"></script>
|
||||
<script src="{% static 'teamsnap/js/lineup-table.js' %}"></script>
|
||||
|
||||
{% endblock %}
|
||||
95
teamsnap/templates/teamsnap/lineup/multiple_choose.html
Normal file
95
teamsnap/templates/teamsnap/lineup/multiple_choose.html
Normal file
@@ -0,0 +1,95 @@
|
||||
{% extends "base.html" %}{% load static %}
|
||||
{% block title %} {{ title }}{% endblock %}
|
||||
|
||||
{% csrf_token %}
|
||||
|
||||
{% block page_heading %}
|
||||
<div class="row d-inline-flex">
|
||||
<div class="col">
|
||||
Schedule
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<form method="get" action="{% url 'teamsnap_edit_multiple_lineups' team_id=team_id%}">
|
||||
{{ formset.management_form }}
|
||||
<input class="btn btn-sm btn-outline-primary text-nowrap" type="submit" value="Submit">
|
||||
{% load tz %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sm">
|
||||
{# <thead>#}
|
||||
{# </thead>#}
|
||||
<tbody>
|
||||
{% for form in formset %}
|
||||
<tr>
|
||||
{{ form.event_id }}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- create_normal.html :: part 4 -->
|
||||
|
||||
<script type='text/javascript'>
|
||||
function updateElementIndex(el, prefix, ndx) {
|
||||
var id_regex = new RegExp('(' + prefix + '-\\d+)');
|
||||
var replacement = prefix + '-' + ndx;
|
||||
if ($(el).attr("for")) $(el).attr("for", $(el).attr("for").replace(id_regex, replacement));
|
||||
if (el.id) el.id = el.id.replace(id_regex, replacement);
|
||||
if (el.name) el.name = el.name.replace(id_regex, replacement);
|
||||
}
|
||||
function cloneMore(selector, prefix) {
|
||||
var newElement = $(selector).clone(true);
|
||||
var total = $('#id_' + prefix + '-TOTAL_FORMS').val();
|
||||
newElement.find(':input:not([type=button]):not([type=submit]):not([type=reset])').each(function() {
|
||||
var name = $(this).attr('name').replace('-' + (total-1) + '-', '-' + total + '-');
|
||||
var id = 'id_' + name;
|
||||
$(this).attr({'name': name, 'id': id}).val('').removeAttr('checked');
|
||||
});
|
||||
newElement.find('label').each(function() {
|
||||
var forValue = $(this).attr('for');
|
||||
if (forValue) {
|
||||
forValue = forValue.replace('-' + (total-1) + '-', '-' + total + '-');
|
||||
$(this).attr({'for': forValue});
|
||||
}
|
||||
});
|
||||
total++;
|
||||
$('#id_' + prefix + '-TOTAL_FORMS').val(total);
|
||||
$(selector).after(newElement);
|
||||
var conditionRow = $('.form-row:not(:last)');
|
||||
conditionRow.find('.btn.add-form-row')
|
||||
.removeClass('btn-success').addClass('btn-danger')
|
||||
.removeClass('add-form-row').addClass('remove-form-row')
|
||||
.html('<span class="glyphicon glyphicon-minus" aria-hidden="true"></span>');
|
||||
return false;
|
||||
}
|
||||
function deleteForm(prefix, btn) {
|
||||
var total = parseInt($('#id_' + prefix + '-TOTAL_FORMS').val());
|
||||
if (total > 1){
|
||||
btn.closest('.form-row').remove();
|
||||
var forms = $('.form-row');
|
||||
$('#id_' + prefix + '-TOTAL_FORMS').val(forms.length);
|
||||
for (var i=0, formCount=forms.length; i<formCount; i++) {
|
||||
$(forms.get(i)).find(':input').each(function() {
|
||||
updateElementIndex(this, prefix, i);
|
||||
});
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
$(document).on('click', '.add-form-row', function(e){
|
||||
e.preventDefault();
|
||||
cloneMore('.form-row:last', 'form');
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '.remove-form-row', function(e){
|
||||
e.preventDefault();
|
||||
deleteForm('form', $(this));
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
45
teamsnap/templates/teamsnap/lineup/multiple_choose_2.html
Normal file
45
teamsnap/templates/teamsnap/lineup/multiple_choose_2.html
Normal file
@@ -0,0 +1,45 @@
|
||||
{% extends "base.html" %}{% load static %}
|
||||
{% block title %} {{ title }}{% endblock %}
|
||||
|
||||
{% csrf_token %}
|
||||
|
||||
{% block page_heading %}
|
||||
<div class="row d-inline-flex">
|
||||
<div class="col">
|
||||
Schedule
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<form method="get" action="{% url 'teamsnap_edit_multiple_lineups' team_id=team_id%}">
|
||||
{{ formset.management_form }}
|
||||
<input class="btn btn-sm btn-outline-primary text-nowrap" type="submit" value="Submit">
|
||||
{% load tz %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sm">
|
||||
{# <thead>#}
|
||||
{# </thead>#}
|
||||
<tbody>
|
||||
{% for form in formset %}
|
||||
{{ form.event_id.as_hidden }}
|
||||
<tr>
|
||||
<td>
|
||||
{{ form.checked }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{% url 'teamsnap_view_event' event_id=form.event.data.id team_id=request.user.profile.teamsnapsettings.managed_team.id%}">{{ form.event.data.formatted_title }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ form.event.data.start_date | localtime}}
|
||||
</td>
|
||||
<td>
|
||||
{{ form.event.data.location_name }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
100
teamsnap/templates/teamsnap/lineup/multiple_edit.html
Normal file
100
teamsnap/templates/teamsnap/lineup/multiple_edit.html
Normal file
@@ -0,0 +1,100 @@
|
||||
{% extends "base.html" %}{% load static %}
|
||||
{% block title %} Edit Lineups {% endblock %}
|
||||
{% block page_heading %}Edit Lineups{% endblock %}
|
||||
{% block page_subheading %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{# <div class="container overflow-scroll mx-0 px-0">#}
|
||||
{# <div class="row flex-row flex-nowrap">#}
|
||||
{# {% for event_data in contexts %}#}
|
||||
{# <div class="col border-start border-end">#}
|
||||
{# <div class = "border-bottom">#}
|
||||
{# <h4>{{ event_data.event.data.formatted_title }}</h4>#}
|
||||
{# <h6 class="text-muted" >{{ event_data.data.start_date }}</h6>#}
|
||||
{# </div>#}
|
||||
{# {% include 'teamsnap/lineup/widgets/lineup.html' with formset_lineup=event_data.formset_lineup formset_bench=event_data.formset_bench event_id=event_data.event.data.id %}#}
|
||||
{# </div>#}
|
||||
{# {% endfor %}#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
<div class="container overflow-scroll">
|
||||
<div class="row flex-row flex-nowrap">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
{% for event_data in contexts %}
|
||||
<td>
|
||||
<h4>{{ event_data.event.data.formatted_title }}</h4>
|
||||
<h6 class="text-muted" >{{ event_data.data.start_date }}</h6>
|
||||
{% with 'P C 1B 2B 3B SS LF CF RF EH DH' as position_list %}
|
||||
{% for position in position_list.split %}
|
||||
<span class="position-status fw-bold small px-1" id="position-status-{{ position }}">{{ position }}</span>
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bg-light" colspan="{{ contexts|length }}"><h4>Lineup</h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
{% for event_data in contexts %}
|
||||
<td class="align-top">
|
||||
{% include 'teamsnap/lineup/widgets/lineup_table.html' with formset=event_data.formset_lineup table_id="players-lineup" %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bg-light" colspan="{{ contexts|length }}"><h4>Bench</h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
{% for event_data in contexts %}
|
||||
<td class="align-top">
|
||||
{% include 'teamsnap/lineup/widgets/lineup_table.html' with formset=event_data.formset_bench table_id="players-bench" %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bg-light" colspan="{{ contexts|length }}"><h4>Out</h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
{% for event_data in contexts %}
|
||||
<td class="align-top">
|
||||
{% include 'teamsnap/lineup/widgets/lineup_table.html' with formset=event_data.formset_out table_id="players-bench" %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
{# <div class="align-content-start">#}
|
||||
{# <div class = "bg-light rounded-3 p-2">#}
|
||||
{# <div class="row">#}
|
||||
{# {% with 'P C 1B 2B 3B SS LF CF RF EH DH' as position_list %}#}
|
||||
{# {% for position in position_list.split %}#}
|
||||
{# <span class="position-status fw-bold small px-1" id="position-status-{{ position }}">{{ position }}</span>#}
|
||||
{# {% endfor %}#}
|
||||
{# {% endwith %}#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{# <form method="post" action="{% url 'teamsnap_submit_lineup' team_id=team_id event_id=event_id%}">#}
|
||||
{# {{ formset.management_form }}#}
|
||||
{# {% csrf_token %}#}
|
||||
|
||||
{# <h4 class="border-bottom">Lineup</h4>#}
|
||||
{# {% include 'teamsnap/lineup/widgets/lineup_table.html' with formset=formset_lineup table_id="players-lineup" %}#}
|
||||
{# <input class="btn btn-success" type="submit" value="Submit">#}
|
||||
{##}
|
||||
{# <h4 class="border-bottom">Bench</h4>#}
|
||||
{# {% include 'teamsnap/lineup/widgets/lineup_table.html' with formset=formset_bench table_id="players-bench" %}#}
|
||||
{##}
|
||||
{# <h4 class="border-bottom">Out</h4>#}
|
||||
{# {% include 'teamsnap/lineup/widgets/lineup_table.html' with formset=formset_out table_id="players-out" %}#}
|
||||
|
||||
{# </form>#}
|
||||
<script src="{% static 'js/Sortable.js' %}"></script>
|
||||
<script src="{% static 'teamsnap/js/lineup-table.js' %}"></script>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
28
teamsnap/templates/teamsnap/lineup/widgets/lineup.html
Normal file
28
teamsnap/templates/teamsnap/lineup/widgets/lineup.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<div>
|
||||
<div class="align-content-start">
|
||||
<div class = "bg-light rounded-3 p-2">
|
||||
{# <div class="row">#}
|
||||
{% with 'P C 1B 2B 3B SS LF CF RF EH DH' as position_list %}
|
||||
{% for position in position_list.split %}
|
||||
<span class="position-status fw-bold small px-1" id="position-status-{{ position }}">{{ position }}</span>
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
{# </div>#}
|
||||
</div>
|
||||
</div>
|
||||
<form method="post" action="{% url 'teamsnap_submit_lineup' team_id=team_id event_id=event_id%}">
|
||||
{{ formset.management_form }}
|
||||
{% csrf_token %}
|
||||
|
||||
<h4 class="border-bottom">Lineup</h4>
|
||||
{% include 'teamsnap/lineup/widgets/lineup_table.html' with formset=formset_lineup table_id="players-lineup" %}
|
||||
<input class="btn btn-success" type="submit" value="Submit">
|
||||
|
||||
<h4 class="border-bottom">Bench</h4>
|
||||
{% include 'teamsnap/lineup/widgets/lineup_table.html' with formset=formset_bench table_id="players-bench" %}
|
||||
|
||||
<h4 class="border-bottom">Out</h4>
|
||||
{% include 'teamsnap/lineup/widgets/lineup_table.html' with formset=formset_out table_id="players-out" %}
|
||||
|
||||
</form>
|
||||
</div>
|
||||
59
teamsnap/templates/teamsnap/lineup/widgets/lineup_table.html
Normal file
59
teamsnap/templates/teamsnap/lineup/widgets/lineup_table.html
Normal file
@@ -0,0 +1,59 @@
|
||||
<table class="table table-sm my-0" style="min-height: 1rem" id="table-{{ table_id }}">
|
||||
<tbody id="tbody-{{ table_id }}">
|
||||
{% for form in formset %}
|
||||
<tr data-player-id="{{ form.member.data.id }}"
|
||||
data-position="{{ form.label.value }}"
|
||||
data-order="{{ form.sequence.value }}">
|
||||
{{ form.event_lineup_entry_id.as_hidden }}
|
||||
{{ form.event_lineup_id.as_hidden }}
|
||||
{{ form.event_id.as_hidden }}
|
||||
{{ form.member_id.as_hidden }}
|
||||
{{ form.sequence.as_hidden }}
|
||||
{{ form.label.as_hidden }}
|
||||
{{ form.member_name.as_hidden }}
|
||||
<th class="col-1" id="sequence-member-{{ form.member.data.id }}">
|
||||
{{ form.sequence.value | add:"1" }}
|
||||
</th>
|
||||
<td class="col-1">
|
||||
<div class="mx-1">
|
||||
<span id="player-order-{{ form.member.id }}" class="lineup-sequence-value">
|
||||
{% if form.order.value > 0 %} {{ form.order.value | add:"1" }} {% endif %}
|
||||
</span>
|
||||
|
||||
<span id="player-availability-{{ form.member.id }}" class="member-availability-status small">
|
||||
{% if form.availability.data.status_code == 2 %}
|
||||
<i class="bi bi-question-circle-fill text-info"></i>
|
||||
{% elif form.availability.data.status_code == 1 %}
|
||||
<i class="bi bi-check-circle-fill text-success"></i>
|
||||
{% elif form.availability.data.status_code == 0 %}
|
||||
<i class="bi bi-x-circle-fill text-danger"></i>
|
||||
{% else %}
|
||||
<i class="bi bi-question-circle"></i>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<th class="">
|
||||
<div class="text-nowrap">
|
||||
<span class="d-none d-md-inline-block">
|
||||
{{ form.member.data.first_name }}
|
||||
</span>
|
||||
{{ form.member.data.last_name }}
|
||||
<span class="small text-muted fw-light d-none d-lg-inline-block">
|
||||
#{{ form.member.data.jersey_number }}
|
||||
</span>
|
||||
</div>
|
||||
{# <br><code><small>{{ form.statline }}</small></code>#}
|
||||
</th>
|
||||
<td class="col-2">
|
||||
{{ form.label }}
|
||||
</td>
|
||||
<td class="col-1 drag-handle">
|
||||
<i class="bi bi-grip-vertical text-secondary"></i>
|
||||
</td>
|
||||
{# <td>{{ form.instance.position }}</td>#}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
22
teamsnap/templates/teamsnap/location/view.html
Normal file
22
teamsnap/templates/teamsnap/location/view.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{% extends "base.html" %}{% load static %}
|
||||
{% block title %} {{ location.data.name }}{% endblock %}
|
||||
{% block page_heading %}{{ location.data.name }}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sm">
|
||||
{# <thead>#}
|
||||
{# </thead>#}
|
||||
<tbody>
|
||||
{% for key, value in location.data.items %}
|
||||
<tr>
|
||||
<th scope="col">
|
||||
{{ key }}
|
||||
</th>
|
||||
<td>
|
||||
{{ value }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
22
teamsnap/templates/teamsnap/opponent.html
Normal file
22
teamsnap/templates/teamsnap/opponent.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{% extends "base.html" %}{% load static %}
|
||||
{% block title %} {{ opponent.data.name }}{% endblock %}
|
||||
{% block page_heading %}{{ opponent.data.name }}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sm">
|
||||
{# <thead>#}
|
||||
{# </thead>#}
|
||||
<tbody>
|
||||
{% for key, value in opponent.data.items %}
|
||||
<tr>
|
||||
<th scope="col">
|
||||
{{ key }}
|
||||
</th>
|
||||
<td>
|
||||
{{ value }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
47
teamsnap/templates/teamsnap/schedule.html
Normal file
47
teamsnap/templates/teamsnap/schedule.html
Normal file
@@ -0,0 +1,47 @@
|
||||
{% extends "base.html" %}{% load static %}
|
||||
{% block title %} {{ title }}{% endblock %}
|
||||
{% block page_heading %}
|
||||
<div class="row d-inline-flex">
|
||||
<div class="col">
|
||||
Schedule
|
||||
</div>
|
||||
<div hidden class="col">
|
||||
<div class="container m-2">
|
||||
<div class="container m-2">
|
||||
<div class="btn-group">
|
||||
<form action="">
|
||||
<a class="btn btn-sm btn-outline-primary text-nowrap" href="{% url 'teamsnap_schedule' team_id=team_id%}?filters=no_past">No Past Events</a>
|
||||
<button class="btn btn-sm btn-outline-primary text-nowrap">Games Only</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
{% load tz %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sm">
|
||||
{# <thead>#}
|
||||
{# </thead>#}
|
||||
<tbody>
|
||||
{% for event in events %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{% url 'teamsnap_view_event' event_id=event.data.id team_id=request.user.profile.teamsnapsettings.managed_team.id%}">{{ event.data.formatted_title }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ event.data.start_date | localtime}}
|
||||
</td>
|
||||
<td>
|
||||
{{ event.data.location_name }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
137
teamsnap/templates/teamsnap/view_event.html
Normal file
137
teamsnap/templates/teamsnap/view_event.html
Normal file
@@ -0,0 +1,137 @@
|
||||
{% extends "base.html" %}{% load static %}
|
||||
{% block title %} {{ event.data.formatted_title }}{% endblock %}
|
||||
{% block page_heading %}{{ event.data.formatted_title }}{% endblock %}
|
||||
{% block page_subheading %}{{ event.data.start_date }}, {{ event.data.location_name }}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table table-striped table-sm">
|
||||
{# <thead>#}
|
||||
{# </thead>#}
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
Date
|
||||
</th>
|
||||
<td>
|
||||
{{ event.data.start_date }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
Opponent
|
||||
</th>
|
||||
<td>
|
||||
<a href="{% url 'teamsnap_opponent' team_id=request.user.profile.teamsnapsettings.managed_team.id id=event.data.opponent_id %}">{{ event.data.opponent_name }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
Location
|
||||
</th>
|
||||
<td>
|
||||
<a href="{% url 'teamsnap_location' team_id=request.user.profile.teamsnapsettings.managed_team.id id=event.data.location_id %}">{{ event.data.location_name }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<h3>Availabilities</h3>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sm">
|
||||
{# <thead>#}
|
||||
{# <th scope="row">#}
|
||||
{# <td>Status</td>#}
|
||||
{# <td>Last</td>#}
|
||||
{# <td>First</td>#}
|
||||
{# </th>#}
|
||||
{# </thead>#}
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="col" class="col-1">
|
||||
<i class="bi bi-check-circle-fill text-success"></i>
|
||||
</th>
|
||||
<td>
|
||||
{{ availability_summary.data.player_going_count }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="col" class="col-1">
|
||||
<i class="bi bi-question-circle-fill text-info"></i>
|
||||
</th>
|
||||
<td>
|
||||
{{ availability_summary.data.player_maybe_count }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="col" class="col-1">
|
||||
<i class="bi bi-x-circle-fill text-danger"></i>
|
||||
</th>
|
||||
<td>
|
||||
{{ availability_summary.data.player_not_going_count }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="col" class="col-1">
|
||||
<i class="bi bi-question-circle"></i>
|
||||
</th>
|
||||
<td>
|
||||
{{ availability_summary.data.player_unknown_count }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="">
|
||||
<h3>Lineup Entries</h3>
|
||||
<a class="btn btn-primary btn-sm" href="{% url 'teamsnap_edit_lineup' event_id=event.data.id team_id=request.user.profile.teamsnapsettings.managed_team.id%}" role="button">Edit</a>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sm">
|
||||
{# <thead>#}
|
||||
{# <th scope="row">#}
|
||||
{# <td>Status</td>#}
|
||||
{# <td>Last</td>#}
|
||||
{# <td>First</td>#}
|
||||
{# </th>#}
|
||||
{# </thead>#}
|
||||
<tbody>
|
||||
{% for lineup_entry in lineup_entries %}
|
||||
<tr>
|
||||
<td class="col-1">
|
||||
{{ lineup_entry.data.sequence }}
|
||||
</td>
|
||||
<td>
|
||||
{{ lineup_entry.data.member_name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ lineup_entry.data.label }}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<h3>Functions</h3>
|
||||
<div class="">
|
||||
<form method="get" action="{% url "teamsnap_image_generator_generate" team_id=request.user.profile.teamsnapsettings.managed_team.id event_id=event.data.id %}">
|
||||
<select hidden class="form-select" name="game_id" id="game_id">
|
||||
<optgroup label="Events">
|
||||
<option value="" disabled="disabled">Select an event...</option>
|
||||
<option selected value="{{event.data.id}}">{{event.data.formatted_title}}</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
<input hidden class="form-check-input" type="radio" name="background" id="backgroundLocation" checked value="location">
|
||||
<input hidden class="form-check-input" type="radio" name="dimensions" id="square" checked value="1080x1080">
|
||||
<button type="submit" class="btn btn-primary btn-block"><i class="bi bi-instagram"></i></button>
|
||||
</form>
|
||||
<a class="btn btn-primary" href="{% url "teamsnap_image_generator" team_id=request.user.profile.teamsnapsettings.managed_team.id event_id=event.data.id %}" role="button"><div class="d-inline-block"><i class="bi bi-instagram"></i> <i class="bi bi-three-dots"></i></div></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user