add edit_lineup dashboard
This commit is contained in:
2
.idea/runConfigurations/runserver_plus.xml
generated
2
.idea/runConfigurations/runserver_plus.xml
generated
@@ -17,7 +17,7 @@
|
|||||||
<option name="launchJavascriptDebuger" value="false" />
|
<option name="launchJavascriptDebuger" value="false" />
|
||||||
<option name="port" value="8000" />
|
<option name="port" value="8000" />
|
||||||
<option name="host" value="127.0.0.1" />
|
<option name="host" value="127.0.0.1" />
|
||||||
<option name="additionalOptions" value="--cert-file ./certs/127.0.0.1.crt" />
|
<option name="additionalOptions" value="--cert-file ./certs/benchcoach.ascorrea.com+4.pem --key-file certs/benchcoach.ascorrea.com+4-key.pem" />
|
||||||
<option name="browserUrl" value="https://127.0.0.1:8000/" />
|
<option name="browserUrl" value="https://127.0.0.1:8000/" />
|
||||||
<option name="runTestServer" value="false" />
|
<option name="runTestServer" value="false" />
|
||||||
<option name="runNoReload" value="false" />
|
<option name="runNoReload" value="false" />
|
||||||
|
|||||||
5051
benchcoach/static/css/bootstrap-grid.css
vendored
Normal file
5051
benchcoach/static/css/bootstrap-grid.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5050
benchcoach/static/css/bootstrap-grid.rtl.css
vendored
Normal file
5050
benchcoach/static/css/bootstrap-grid.rtl.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
485
benchcoach/static/css/bootstrap-reboot.css
vendored
Normal file
485
benchcoach/static/css/bootstrap-reboot.css
vendored
Normal file
@@ -0,0 +1,485 @@
|
|||||||
|
/*!
|
||||||
|
* Bootstrap Reboot v5.1.3 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2021 The Bootstrap Authors
|
||||||
|
* Copyright 2011-2021 Twitter, Inc.
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
|
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||||
|
*/
|
||||||
|
:root {
|
||||||
|
--bs-blue: #0d6efd;
|
||||||
|
--bs-indigo: #6610f2;
|
||||||
|
--bs-purple: #6f42c1;
|
||||||
|
--bs-pink: #d63384;
|
||||||
|
--bs-red: #dc3545;
|
||||||
|
--bs-orange: #fd7e14;
|
||||||
|
--bs-yellow: #ffc107;
|
||||||
|
--bs-green: #198754;
|
||||||
|
--bs-teal: #20c997;
|
||||||
|
--bs-cyan: #0dcaf0;
|
||||||
|
--bs-white: #fff;
|
||||||
|
--bs-gray: #6c757d;
|
||||||
|
--bs-gray-dark: #343a40;
|
||||||
|
--bs-gray-100: #f8f9fa;
|
||||||
|
--bs-gray-200: #e9ecef;
|
||||||
|
--bs-gray-300: #dee2e6;
|
||||||
|
--bs-gray-400: #ced4da;
|
||||||
|
--bs-gray-500: #adb5bd;
|
||||||
|
--bs-gray-600: #6c757d;
|
||||||
|
--bs-gray-700: #495057;
|
||||||
|
--bs-gray-800: #343a40;
|
||||||
|
--bs-gray-900: #212529;
|
||||||
|
--bs-primary: #0d6efd;
|
||||||
|
--bs-secondary: #6c757d;
|
||||||
|
--bs-success: #198754;
|
||||||
|
--bs-info: #0dcaf0;
|
||||||
|
--bs-warning: #ffc107;
|
||||||
|
--bs-danger: #dc3545;
|
||||||
|
--bs-light: #f8f9fa;
|
||||||
|
--bs-dark: #212529;
|
||||||
|
--bs-primary-rgb: 13, 110, 253;
|
||||||
|
--bs-secondary-rgb: 108, 117, 125;
|
||||||
|
--bs-success-rgb: 25, 135, 84;
|
||||||
|
--bs-info-rgb: 13, 202, 240;
|
||||||
|
--bs-warning-rgb: 255, 193, 7;
|
||||||
|
--bs-danger-rgb: 220, 53, 69;
|
||||||
|
--bs-light-rgb: 248, 249, 250;
|
||||||
|
--bs-dark-rgb: 33, 37, 41;
|
||||||
|
--bs-white-rgb: 255, 255, 255;
|
||||||
|
--bs-black-rgb: 0, 0, 0;
|
||||||
|
--bs-body-color-rgb: 33, 37, 41;
|
||||||
|
--bs-body-bg-rgb: 255, 255, 255;
|
||||||
|
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||||
|
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||||
|
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
|
||||||
|
--bs-body-font-family: var(--bs-font-sans-serif);
|
||||||
|
--bs-body-font-size: 1rem;
|
||||||
|
--bs-body-font-weight: 400;
|
||||||
|
--bs-body-line-height: 1.5;
|
||||||
|
--bs-body-color: #212529;
|
||||||
|
--bs-body-bg: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: no-preference) {
|
||||||
|
:root {
|
||||||
|
scroll-behavior: smooth;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: var(--bs-body-font-family);
|
||||||
|
font-size: var(--bs-body-font-size);
|
||||||
|
font-weight: var(--bs-body-font-weight);
|
||||||
|
line-height: var(--bs-body-line-height);
|
||||||
|
color: var(--bs-body-color);
|
||||||
|
text-align: var(--bs-body-text-align);
|
||||||
|
background-color: var(--bs-body-bg);
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
margin: 1rem 0;
|
||||||
|
color: inherit;
|
||||||
|
background-color: currentColor;
|
||||||
|
border: 0;
|
||||||
|
opacity: 0.25;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr:not([size]) {
|
||||||
|
height: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h6, h5, h4, h3, h2, h1 {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: calc(1.375rem + 1.5vw);
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
h1 {
|
||||||
|
font-size: 2.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: calc(1.325rem + 0.9vw);
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
h2 {
|
||||||
|
font-size: 2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: calc(1.3rem + 0.6vw);
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
h3 {
|
||||||
|
font-size: 1.75rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: calc(1.275rem + 0.3vw);
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
h4 {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h5 {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h6 {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
abbr[title],
|
||||||
|
abbr[data-bs-original-title] {
|
||||||
|
-webkit-text-decoration: underline dotted;
|
||||||
|
text-decoration: underline dotted;
|
||||||
|
cursor: help;
|
||||||
|
-webkit-text-decoration-skip-ink: none;
|
||||||
|
text-decoration-skip-ink: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
address {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
font-style: normal;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol,
|
||||||
|
ul {
|
||||||
|
padding-left: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol,
|
||||||
|
ul,
|
||||||
|
dl {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol ol,
|
||||||
|
ul ul,
|
||||||
|
ol ul,
|
||||||
|
ul ol {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dt {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
b,
|
||||||
|
strong {
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
small {
|
||||||
|
font-size: 0.875em;
|
||||||
|
}
|
||||||
|
|
||||||
|
mark {
|
||||||
|
padding: 0.2em;
|
||||||
|
background-color: #fcf8e3;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub,
|
||||||
|
sup {
|
||||||
|
position: relative;
|
||||||
|
font-size: 0.75em;
|
||||||
|
line-height: 0;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub {
|
||||||
|
bottom: -0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
sup {
|
||||||
|
top: -0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #0d6efd;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
color: #0a58ca;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre,
|
||||||
|
code,
|
||||||
|
kbd,
|
||||||
|
samp {
|
||||||
|
font-family: var(--bs-font-monospace);
|
||||||
|
font-size: 1em;
|
||||||
|
direction: ltr /* rtl:ignore */;
|
||||||
|
unicode-bidi: bidi-override;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
display: block;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
overflow: auto;
|
||||||
|
font-size: 0.875em;
|
||||||
|
}
|
||||||
|
pre code {
|
||||||
|
font-size: inherit;
|
||||||
|
color: inherit;
|
||||||
|
word-break: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-size: 0.875em;
|
||||||
|
color: #d63384;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
a > code {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
kbd {
|
||||||
|
padding: 0.2rem 0.4rem;
|
||||||
|
font-size: 0.875em;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #212529;
|
||||||
|
border-radius: 0.2rem;
|
||||||
|
}
|
||||||
|
kbd kbd {
|
||||||
|
padding: 0;
|
||||||
|
font-size: 1em;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
figure {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
img,
|
||||||
|
svg {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
caption-side: bottom;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
caption {
|
||||||
|
padding-top: 0.5rem;
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
color: #6c757d;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
text-align: inherit;
|
||||||
|
text-align: -webkit-match-parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead,
|
||||||
|
tbody,
|
||||||
|
tfoot,
|
||||||
|
tr,
|
||||||
|
td,
|
||||||
|
th {
|
||||||
|
border-color: inherit;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:focus:not(:focus-visible) {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
input,
|
||||||
|
button,
|
||||||
|
select,
|
||||||
|
optgroup,
|
||||||
|
textarea {
|
||||||
|
margin: 0;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
select {
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
[role=button] {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
select:disabled {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
[list]::-webkit-calendar-picker-indicator {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
[type=button],
|
||||||
|
[type=reset],
|
||||||
|
[type=submit] {
|
||||||
|
-webkit-appearance: button;
|
||||||
|
}
|
||||||
|
button:not(:disabled),
|
||||||
|
[type=button]:not(:disabled),
|
||||||
|
[type=reset]:not(:disabled),
|
||||||
|
[type=submit]:not(:disabled) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-moz-focus-inner {
|
||||||
|
padding: 0;
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldset {
|
||||||
|
min-width: 0;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
legend {
|
||||||
|
float: left;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
font-size: calc(1.275rem + 0.3vw);
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
legend {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
legend + * {
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-datetime-edit-fields-wrapper,
|
||||||
|
::-webkit-datetime-edit-text,
|
||||||
|
::-webkit-datetime-edit-minute,
|
||||||
|
::-webkit-datetime-edit-hour-field,
|
||||||
|
::-webkit-datetime-edit-day-field,
|
||||||
|
::-webkit-datetime-edit-month-field,
|
||||||
|
::-webkit-datetime-edit-year-field {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-inner-spin-button {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type=search] {
|
||||||
|
outline-offset: -2px;
|
||||||
|
-webkit-appearance: textfield;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* rtl:raw:
|
||||||
|
[type="tel"],
|
||||||
|
[type="url"],
|
||||||
|
[type="email"],
|
||||||
|
[type="number"] {
|
||||||
|
direction: ltr;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
::-webkit-search-decoration {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-color-swatch-wrapper {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-file-upload-button {
|
||||||
|
font: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
::file-selector-button {
|
||||||
|
font: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-file-upload-button {
|
||||||
|
font: inherit;
|
||||||
|
-webkit-appearance: button;
|
||||||
|
}
|
||||||
|
|
||||||
|
output {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
iframe {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
summary {
|
||||||
|
display: list-item;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
progress {
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
[hidden] {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
||||||
482
benchcoach/static/css/bootstrap-reboot.rtl.css
vendored
Normal file
482
benchcoach/static/css/bootstrap-reboot.rtl.css
vendored
Normal file
@@ -0,0 +1,482 @@
|
|||||||
|
/*!
|
||||||
|
* Bootstrap Reboot v5.1.3 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2021 The Bootstrap Authors
|
||||||
|
* Copyright 2011-2021 Twitter, Inc.
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
|
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||||
|
*/
|
||||||
|
:root {
|
||||||
|
--bs-blue: #0d6efd;
|
||||||
|
--bs-indigo: #6610f2;
|
||||||
|
--bs-purple: #6f42c1;
|
||||||
|
--bs-pink: #d63384;
|
||||||
|
--bs-red: #dc3545;
|
||||||
|
--bs-orange: #fd7e14;
|
||||||
|
--bs-yellow: #ffc107;
|
||||||
|
--bs-green: #198754;
|
||||||
|
--bs-teal: #20c997;
|
||||||
|
--bs-cyan: #0dcaf0;
|
||||||
|
--bs-white: #fff;
|
||||||
|
--bs-gray: #6c757d;
|
||||||
|
--bs-gray-dark: #343a40;
|
||||||
|
--bs-gray-100: #f8f9fa;
|
||||||
|
--bs-gray-200: #e9ecef;
|
||||||
|
--bs-gray-300: #dee2e6;
|
||||||
|
--bs-gray-400: #ced4da;
|
||||||
|
--bs-gray-500: #adb5bd;
|
||||||
|
--bs-gray-600: #6c757d;
|
||||||
|
--bs-gray-700: #495057;
|
||||||
|
--bs-gray-800: #343a40;
|
||||||
|
--bs-gray-900: #212529;
|
||||||
|
--bs-primary: #0d6efd;
|
||||||
|
--bs-secondary: #6c757d;
|
||||||
|
--bs-success: #198754;
|
||||||
|
--bs-info: #0dcaf0;
|
||||||
|
--bs-warning: #ffc107;
|
||||||
|
--bs-danger: #dc3545;
|
||||||
|
--bs-light: #f8f9fa;
|
||||||
|
--bs-dark: #212529;
|
||||||
|
--bs-primary-rgb: 13, 110, 253;
|
||||||
|
--bs-secondary-rgb: 108, 117, 125;
|
||||||
|
--bs-success-rgb: 25, 135, 84;
|
||||||
|
--bs-info-rgb: 13, 202, 240;
|
||||||
|
--bs-warning-rgb: 255, 193, 7;
|
||||||
|
--bs-danger-rgb: 220, 53, 69;
|
||||||
|
--bs-light-rgb: 248, 249, 250;
|
||||||
|
--bs-dark-rgb: 33, 37, 41;
|
||||||
|
--bs-white-rgb: 255, 255, 255;
|
||||||
|
--bs-black-rgb: 0, 0, 0;
|
||||||
|
--bs-body-color-rgb: 33, 37, 41;
|
||||||
|
--bs-body-bg-rgb: 255, 255, 255;
|
||||||
|
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||||
|
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||||
|
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
|
||||||
|
--bs-body-font-family: var(--bs-font-sans-serif);
|
||||||
|
--bs-body-font-size: 1rem;
|
||||||
|
--bs-body-font-weight: 400;
|
||||||
|
--bs-body-line-height: 1.5;
|
||||||
|
--bs-body-color: #212529;
|
||||||
|
--bs-body-bg: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: no-preference) {
|
||||||
|
:root {
|
||||||
|
scroll-behavior: smooth;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: var(--bs-body-font-family);
|
||||||
|
font-size: var(--bs-body-font-size);
|
||||||
|
font-weight: var(--bs-body-font-weight);
|
||||||
|
line-height: var(--bs-body-line-height);
|
||||||
|
color: var(--bs-body-color);
|
||||||
|
text-align: var(--bs-body-text-align);
|
||||||
|
background-color: var(--bs-body-bg);
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
margin: 1rem 0;
|
||||||
|
color: inherit;
|
||||||
|
background-color: currentColor;
|
||||||
|
border: 0;
|
||||||
|
opacity: 0.25;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr:not([size]) {
|
||||||
|
height: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h6, h5, h4, h3, h2, h1 {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: calc(1.375rem + 1.5vw);
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
h1 {
|
||||||
|
font-size: 2.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: calc(1.325rem + 0.9vw);
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
h2 {
|
||||||
|
font-size: 2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: calc(1.3rem + 0.6vw);
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
h3 {
|
||||||
|
font-size: 1.75rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: calc(1.275rem + 0.3vw);
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
h4 {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h5 {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h6 {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
abbr[title],
|
||||||
|
abbr[data-bs-original-title] {
|
||||||
|
-webkit-text-decoration: underline dotted;
|
||||||
|
text-decoration: underline dotted;
|
||||||
|
cursor: help;
|
||||||
|
-webkit-text-decoration-skip-ink: none;
|
||||||
|
text-decoration-skip-ink: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
address {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
font-style: normal;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol,
|
||||||
|
ul {
|
||||||
|
padding-right: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol,
|
||||||
|
ul,
|
||||||
|
dl {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol ol,
|
||||||
|
ul ul,
|
||||||
|
ol ul,
|
||||||
|
ul ol {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dt {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
b,
|
||||||
|
strong {
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
small {
|
||||||
|
font-size: 0.875em;
|
||||||
|
}
|
||||||
|
|
||||||
|
mark {
|
||||||
|
padding: 0.2em;
|
||||||
|
background-color: #fcf8e3;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub,
|
||||||
|
sup {
|
||||||
|
position: relative;
|
||||||
|
font-size: 0.75em;
|
||||||
|
line-height: 0;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub {
|
||||||
|
bottom: -0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
sup {
|
||||||
|
top: -0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #0d6efd;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
color: #0a58ca;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre,
|
||||||
|
code,
|
||||||
|
kbd,
|
||||||
|
samp {
|
||||||
|
font-family: var(--bs-font-monospace);
|
||||||
|
font-size: 1em;
|
||||||
|
direction: ltr ;
|
||||||
|
unicode-bidi: bidi-override;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
display: block;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
overflow: auto;
|
||||||
|
font-size: 0.875em;
|
||||||
|
}
|
||||||
|
pre code {
|
||||||
|
font-size: inherit;
|
||||||
|
color: inherit;
|
||||||
|
word-break: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-size: 0.875em;
|
||||||
|
color: #d63384;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
a > code {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
kbd {
|
||||||
|
padding: 0.2rem 0.4rem;
|
||||||
|
font-size: 0.875em;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #212529;
|
||||||
|
border-radius: 0.2rem;
|
||||||
|
}
|
||||||
|
kbd kbd {
|
||||||
|
padding: 0;
|
||||||
|
font-size: 1em;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
figure {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
img,
|
||||||
|
svg {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
caption-side: bottom;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
caption {
|
||||||
|
padding-top: 0.5rem;
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
color: #6c757d;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
text-align: inherit;
|
||||||
|
text-align: -webkit-match-parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead,
|
||||||
|
tbody,
|
||||||
|
tfoot,
|
||||||
|
tr,
|
||||||
|
td,
|
||||||
|
th {
|
||||||
|
border-color: inherit;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:focus:not(:focus-visible) {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
input,
|
||||||
|
button,
|
||||||
|
select,
|
||||||
|
optgroup,
|
||||||
|
textarea {
|
||||||
|
margin: 0;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
select {
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
[role=button] {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
select:disabled {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
[list]::-webkit-calendar-picker-indicator {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
[type=button],
|
||||||
|
[type=reset],
|
||||||
|
[type=submit] {
|
||||||
|
-webkit-appearance: button;
|
||||||
|
}
|
||||||
|
button:not(:disabled),
|
||||||
|
[type=button]:not(:disabled),
|
||||||
|
[type=reset]:not(:disabled),
|
||||||
|
[type=submit]:not(:disabled) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-moz-focus-inner {
|
||||||
|
padding: 0;
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldset {
|
||||||
|
min-width: 0;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
legend {
|
||||||
|
float: right;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
font-size: calc(1.275rem + 0.3vw);
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
legend {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
legend + * {
|
||||||
|
clear: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-datetime-edit-fields-wrapper,
|
||||||
|
::-webkit-datetime-edit-text,
|
||||||
|
::-webkit-datetime-edit-minute,
|
||||||
|
::-webkit-datetime-edit-hour-field,
|
||||||
|
::-webkit-datetime-edit-day-field,
|
||||||
|
::-webkit-datetime-edit-month-field,
|
||||||
|
::-webkit-datetime-edit-year-field {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-inner-spin-button {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type=search] {
|
||||||
|
outline-offset: -2px;
|
||||||
|
-webkit-appearance: textfield;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="tel"],
|
||||||
|
[type="url"],
|
||||||
|
[type="email"],
|
||||||
|
[type="number"] {
|
||||||
|
direction: ltr;
|
||||||
|
}
|
||||||
|
::-webkit-search-decoration {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-color-swatch-wrapper {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-file-upload-button {
|
||||||
|
font: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
::file-selector-button {
|
||||||
|
font: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-file-upload-button {
|
||||||
|
font: inherit;
|
||||||
|
-webkit-appearance: button;
|
||||||
|
}
|
||||||
|
|
||||||
|
output {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
iframe {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
summary {
|
||||||
|
display: list-item;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
progress {
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
[hidden] {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
/*# sourceMappingURL=bootstrap-reboot.rtl.css.map */
|
||||||
4866
benchcoach/static/css/bootstrap-utilities.css
vendored
Normal file
4866
benchcoach/static/css/bootstrap-utilities.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4857
benchcoach/static/css/bootstrap-utilities.rtl.css
vendored
Normal file
4857
benchcoach/static/css/bootstrap-utilities.rtl.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
11266
benchcoach/static/css/bootstrap.css
vendored
Normal file
11266
benchcoach/static/css/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
11242
benchcoach/static/css/bootstrap.rtl.css
vendored
Normal file
11242
benchcoach/static/css/bootstrap.rtl.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
38
benchcoach/static/css/paper.css
Normal file
38
benchcoach/static/css/paper.css
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
@page { margin: 0 }
|
||||||
|
body { margin: 0 }
|
||||||
|
.sheet {
|
||||||
|
margin: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
box-sizing: border-box;
|
||||||
|
page-break-after: always;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Paper sizes **/
|
||||||
|
body.A3 .sheet { width: 297mm; height: 419mm }
|
||||||
|
body.A3.landscape .sheet { width: 420mm; height: 296mm }
|
||||||
|
body.A4 .sheet { width: 210mm; height: 296mm }
|
||||||
|
body.A4.landscape .sheet { width: 297mm; height: 209mm }
|
||||||
|
body.A5 .sheet { width: 148mm; height: 209mm }
|
||||||
|
body.A5.landscape .sheet { width: 210mm; height: 147mm }
|
||||||
|
body.letter .sheet { width: 216mm; height: 279mm }
|
||||||
|
body.letter.landscape .sheet { width: 280mm; height: 215mm }
|
||||||
|
body.legal .sheet { width: 216mm; height: 356mm }
|
||||||
|
body.legal.landscape .sheet { width: 357mm; height: 215mm }
|
||||||
|
|
||||||
|
/** Padding area **/
|
||||||
|
.sheet.padding-10mm { padding: 10mm }
|
||||||
|
.sheet.padding-15mm { padding: 15mm }
|
||||||
|
.sheet.padding-20mm { padding: 20mm }
|
||||||
|
.sheet.padding-25mm { padding: 25mm }
|
||||||
|
|
||||||
|
/** Fix for Chrome issue #273306 **/
|
||||||
|
@media print {
|
||||||
|
body.A3.landscape { width: 420mm }
|
||||||
|
body.A3, body.A4.landscape { width: 297mm }
|
||||||
|
body.A4, body.A5.landscape { width: 210mm }
|
||||||
|
body.A5 { width: 148mm }
|
||||||
|
body.letter, body.legal { width: 216mm }
|
||||||
|
body.letter.landscape { width: 280mm }
|
||||||
|
body.legal.landscape { width: 357mm }
|
||||||
|
}
|
||||||
@@ -14,4 +14,9 @@
|
|||||||
|
|
||||||
.navbar-brand {
|
.navbar-brand {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-navbar {
|
||||||
|
background: #212529;
|
||||||
}
|
}
|
||||||
|
|||||||
23
benchcoach/static/images/benchcoach.svg
Normal file
23
benchcoach/static/images/benchcoach.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 59 KiB |
1
benchcoach/static/images/teamsnap.svg
Normal file
1
benchcoach/static/images/teamsnap.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 5.8 KiB |
3783
benchcoach/static/js/Sortable.js
Normal file
3783
benchcoach/static/js/Sortable.js
Normal file
File diff suppressed because it is too large
Load Diff
6812
benchcoach/static/js/bootstrap.bundle.js
vendored
Normal file
6812
benchcoach/static/js/bootstrap.bundle.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4999
benchcoach/static/js/bootstrap.esm.js
vendored
Normal file
4999
benchcoach/static/js/bootstrap.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5046
benchcoach/static/js/bootstrap.js
vendored
Normal file
5046
benchcoach/static/js/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10627
benchcoach/static/js/chart.esm.js
Normal file
10627
benchcoach/static/js/chart.esm.js
Normal file
File diff suppressed because it is too large
Load Diff
13269
benchcoach/static/js/chart.js
Normal file
13269
benchcoach/static/js/chart.js
Normal file
File diff suppressed because it is too large
Load Diff
7
benchcoach/static/js/helpers.esm.js
Normal file
7
benchcoach/static/js/helpers.esm.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
/*!
|
||||||
|
* Chart.js v3.7.1
|
||||||
|
* https://www.chartjs.org
|
||||||
|
* (c) 2022 Chart.js Contributors
|
||||||
|
* Released under the MIT License
|
||||||
|
*/
|
||||||
|
export { H as HALF_PI, aX as INFINITY, P as PI, aW as PITAU, aZ as QUARTER_PI, aY as RAD_PER_DEG, T as TAU, a_ as TWO_THIRDS_PI, Q as _addGrace, V as _alignPixel, a0 as _alignStartEnd, p as _angleBetween, a$ as _angleDiff, _ as _arrayUnique, a6 as _attachContext, aq as _bezierCurveTo, an as _bezierInterpolation, av as _boundSegment, al as _boundSegments, a3 as _capitalize, ak as _computeSegments, a7 as _createResolver, aH as _decimalPlaces, aP as _deprecated, a8 as _descriptors, af as _elementsEqual, M as _factorize, aJ as _filterBetween, F as _getParentNode, U as _int16Range, ah as _isBetween, ag as _isClickEvent, K as _isDomSupported, z as _isPointInArea, w as _limitValue, aI as _longestText, aK as _lookup, x as _lookupByKey, S as _measureText, aN as _merger, aO as _mergerIf, aw as _normalizeAngle, ao as _pointInLine, ai as _readValueToProps, A as _rlookupByKey, aD as _setMinAndMaxByKey, am as _steppedInterpolation, ap as _steppedLineTo, az as _textX, $ as _toLeftRightCenter, aj as _updateBezierControlPoints, as as addRoundedRectPath, aG as almostEquals, aF as almostWhole, O as callback, ad as clearCanvas, W as clipArea, aM as clone, c as color, h as createContext, ab as debounce, j as defined, aC as distanceBetweenPoints, ar as drawPoint, D as each, e as easingEffects, N as finiteOrDefault, aU as fontString, o as formatNumber, B as getAngleFromPoint, aL as getHoverColor, E as getMaximumSize, y as getRelativePosition, ax as getRtlAdapter, aT as getStyle, b as isArray, g as isFinite, a5 as isFunction, k as isNullOrUndef, q as isNumber, i as isObject, l as listenArrayEvents, L as log10, a2 as merge, a9 as mergeIf, aE as niceNum, aB as noop, ay as overrideTextDirection, G as readUsedSize, X as renderText, r as requestAnimFrame, a as resolve, f as resolveObjectKey, aA as restoreTextDirection, ac as retinaScale, ae as setsEqual, s as sign, aR as splineCurve, aS as splineCurveMonotone, J as supportsEventListenerOptions, I as throttled, R as toDegrees, n as toDimension, Z as toFont, aQ as toFontString, aV as toLineHeight, C as toPadding, m as toPercentage, t as toRadians, at as toTRBL, au as toTRBLCorners, aa as uid, Y as unclipArea, u as unlistenArrayEvents, v as valueOrDefault } from './chunks/helpers.segment.js';
|
||||||
@@ -1 +1,432 @@
|
|||||||
/* Project specific Javascript goes here. */
|
/* Project specific Javascript goes here. */
|
||||||
|
function positionSelectChanged(elem) {
|
||||||
|
let row = elem.parentElement.parentElement
|
||||||
|
let original_table = elem.parentElement.parentElement.parentElement
|
||||||
|
let lineup_table = document.getElementById('lineup')
|
||||||
|
let bench_table = document.getElementById('bench')
|
||||||
|
let dhd_table = document.getElementById('dhd')
|
||||||
|
let player_order = row.querySelector('[id^="player-order"]')
|
||||||
|
let player_available = row.querySelector('[id^="player-availability"]')
|
||||||
|
|
||||||
|
console.dir(original_table == bench_table)
|
||||||
|
if (elem.value == "P" && original_table == bench_table ) {
|
||||||
|
dhd_table.appendChild(row)
|
||||||
|
player_order.classList.remove('d-none')
|
||||||
|
// player_available.classList.add('d-none')
|
||||||
|
refresh_lineup_order()
|
||||||
|
}
|
||||||
|
else if (elem.value && original_table == dhd_table ) {
|
||||||
|
dhd_table.appendChild(row)
|
||||||
|
player_order.classList.remove('d-none')
|
||||||
|
// player_available.classList.add('d-none')
|
||||||
|
refresh_lineup_order()
|
||||||
|
}
|
||||||
|
else if (elem.value) {
|
||||||
|
lineup_table.appendChild(row)
|
||||||
|
player_order.classList.remove('d-none')
|
||||||
|
// player_available.classList.add('d-none')
|
||||||
|
refresh_lineup_order()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
bench_table.prepend(row)
|
||||||
|
// player_order.classList.add('d-none')
|
||||||
|
player_available.classList.remove('d-none')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function colorPositions() {
|
||||||
|
for (bcLineup of document.getElementsByClassName("benchcoach-lineup")) {
|
||||||
|
var player_rows = bcLineup.querySelectorAll('tr');
|
||||||
|
// player_rows.push.apply(player_rows, document.getElementsByClassName('benchcoach-lineup').querySelectorAll('tr'));
|
||||||
|
// player_rows.push.apply(player_rows, document.getElementsByClassName('benchcoach-bench').querySelectorAll('tr'));
|
||||||
|
var label_value_array = []
|
||||||
|
player_rows.forEach(function (player_row, index) {
|
||||||
|
if (player_row.querySelector('[name$="label"]')) {
|
||||||
|
label_value_array.push(
|
||||||
|
player_row.querySelector('select[name$="label"]').value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
bcLineup.querySelectorAll('[id^="position-status"]').forEach(function (position_status, index) {
|
||||||
|
if (label_value_array.includes(position_status.innerHTML)) {
|
||||||
|
if (position_status.classList.contains("text-danger")) {
|
||||||
|
position_status.classList.remove('text-danger')
|
||||||
|
}
|
||||||
|
position_status.classList.add('text-success')
|
||||||
|
} else {
|
||||||
|
if (position_status.classList.contains("text-success")) {
|
||||||
|
position_status.classList.remove('text-success')
|
||||||
|
}
|
||||||
|
position_status.classList.add('text-danger')
|
||||||
|
}
|
||||||
|
// console.dir(position_status)
|
||||||
|
})
|
||||||
|
// console.dir(label_value_array)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function refresh_lineup_order (itemEl){
|
||||||
|
let bcLineup = itemEl.closest(".benchcoach-lineup")
|
||||||
|
var player_rows = []
|
||||||
|
for (tbody of bcLineup.querySelectorAll("[class*='tbody-benchcoach-starting']")){
|
||||||
|
for (row of tbody.rows){
|
||||||
|
player_rows.push(row)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < player_rows.length; i++) {
|
||||||
|
var player_order = player_rows[i].querySelector('[id^="sequence"]')
|
||||||
|
var form_element_order = player_rows[i].querySelector('[id$="sequence"]')
|
||||||
|
player_order.innerText = parseInt(player_rows[i].dataset.order)
|
||||||
|
player_rows[i].dataset.order = i
|
||||||
|
form_element_order.value = i
|
||||||
|
player_order.innerHTML = i+1
|
||||||
|
}
|
||||||
|
var player_rows = bcLineup.getElementsByClassName("tbody-benchcoach-bench")[0].rows
|
||||||
|
for (let i = 0; i < player_rows.length; i++) {
|
||||||
|
var player_order = player_rows[i].querySelector('[id^="sequence"]')
|
||||||
|
var form_element_order = player_rows[i].querySelector('[id$="sequence"]')
|
||||||
|
player_rows[i].dataset.order = null
|
||||||
|
form_element_order.value = null
|
||||||
|
player_order.innerHTML = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function sendToClipboard(itemEl){
|
||||||
|
let bcLineup = itemEl.closest(".benchcoach-lineup")
|
||||||
|
player_rows = bcLineup.querySelectorAll("[data-position=P]")
|
||||||
|
lineup_export = []
|
||||||
|
if (player_rows.length > 0){
|
||||||
|
lineup_export.push(player_rows[0].dataset.playerName)
|
||||||
|
lineup_export.push("","")
|
||||||
|
} else {
|
||||||
|
lineup_export.push("","","")
|
||||||
|
}
|
||||||
|
|
||||||
|
lineup_export.push("")
|
||||||
|
for (position of [
|
||||||
|
'C',
|
||||||
|
'1B',
|
||||||
|
'2B',
|
||||||
|
'3B',
|
||||||
|
'SS',
|
||||||
|
'LF',
|
||||||
|
'CF',
|
||||||
|
'RF',
|
||||||
|
'DH',
|
||||||
|
]
|
||||||
|
) {
|
||||||
|
var player_rows = bcLineup.querySelectorAll(`[data-position=${CSS.escape(position)}]`)
|
||||||
|
if (player_rows.length > 0){
|
||||||
|
lineup_export.push(player_rows[0].dataset.playerName)
|
||||||
|
} else {
|
||||||
|
lineup_export.push('')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (position of [
|
||||||
|
'EH',
|
||||||
|
]
|
||||||
|
) {
|
||||||
|
var player_rows = bcLineup.querySelectorAll(`[data-position=${CSS.escape(position)}]`)
|
||||||
|
for (var i = 0; i < 2; i++) {
|
||||||
|
if (i < player_rows.length){
|
||||||
|
lineup_export.push(player_rows[i].dataset.playerName)
|
||||||
|
} else {
|
||||||
|
lineup_export.push("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (position of [
|
||||||
|
'DR',
|
||||||
|
]
|
||||||
|
) {
|
||||||
|
let player_rows = bcLineup.querySelectorAll(`[data-position=${CSS.escape(position)}]`)
|
||||||
|
if (player_rows.length > 0){
|
||||||
|
lineup_export.push(player_rows[0].dataset.playerName)
|
||||||
|
} else {
|
||||||
|
lineup_export.push('')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
lineup_export.push("")
|
||||||
|
lineup_export.push("","")
|
||||||
|
lineup_export.push("")
|
||||||
|
|
||||||
|
for (var i = 0; i < 11; i++) {
|
||||||
|
let player_rows = bcLineup.querySelector('.table-benchcoach-startinglineup').querySelectorAll(`[data-order=${CSS.escape(i)}]`)
|
||||||
|
if (player_rows.length > 0){
|
||||||
|
lineup_export.push(player_rows[0].dataset.playerName)
|
||||||
|
} else {
|
||||||
|
lineup_export.push("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
console.dir(lineup_export)
|
||||||
|
var textArea = document.createElement("textarea");
|
||||||
|
textArea.value = lineup_export.join("\n");
|
||||||
|
|
||||||
|
// Avoid scrolling to bottom
|
||||||
|
textArea.style.top = "0";
|
||||||
|
textArea.style.left = "0";
|
||||||
|
textArea.style.position = "fixed";
|
||||||
|
|
||||||
|
document.body.appendChild(textArea);
|
||||||
|
textArea.focus();
|
||||||
|
textArea.select();
|
||||||
|
|
||||||
|
try {
|
||||||
|
var successful = document.execCommand('copy');
|
||||||
|
var msg = successful ? 'successful' : 'unsuccessful';
|
||||||
|
console.log('Copying text command was ' + msg);
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Oops, unable to copy', err);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.body.removeChild(textArea);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
benchcoach_lineups = document.getElementsByClassName("benchcoach-lineup")
|
||||||
|
for (bcLineup of document.getElementsByClassName("benchcoach-lineup")) {
|
||||||
|
var startinglineup = new Sortable.create(
|
||||||
|
bcLineup.getElementsByClassName("tbody-benchcoach-startinglineup")[0], {
|
||||||
|
animation: 150,
|
||||||
|
handle: ".drag-handle",
|
||||||
|
ghostClass:"ghost",
|
||||||
|
group:{
|
||||||
|
name:bcLineup.id,
|
||||||
|
put:[bcLineup.id],
|
||||||
|
pull:[bcLineup.id]
|
||||||
|
},
|
||||||
|
onAdd: function (/**Event*/evt) {
|
||||||
|
// Add to Lineup
|
||||||
|
var itemEl = evt.item; // dragged HTMLElement
|
||||||
|
var player_order = itemEl.querySelector('[id^="sequence-member"]')
|
||||||
|
var player_available =itemEl.querySelector('[class^="member-availability-status"]')
|
||||||
|
refresh_lineup_order(itemEl)
|
||||||
|
if (player_order.classList.contains('d-none')){
|
||||||
|
player_order.classList.remove('d-none')
|
||||||
|
}
|
||||||
|
// player_available.classList.add('d-none')
|
||||||
|
},
|
||||||
|
onUpdate: function (/**Event*/evt) {
|
||||||
|
console.log('update to lineup')
|
||||||
|
var itemEl = evt.item; // dragged HTMLElement
|
||||||
|
refresh_lineup_order(itemEl)
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
var bench = new Sortable.create(
|
||||||
|
bcLineup.getElementsByClassName("tbody-benchcoach-bench")[0], {
|
||||||
|
animation: 150,
|
||||||
|
ghostClass:"ghost",
|
||||||
|
sort: false,
|
||||||
|
handle: ".drag-handle",
|
||||||
|
// handle: ".bars-move",
|
||||||
|
group:{
|
||||||
|
name:bcLineup.id,
|
||||||
|
put:[bcLineup.id],
|
||||||
|
pull:[bcLineup.id]
|
||||||
|
},
|
||||||
|
onAdd: function (/**Event*/evt) {
|
||||||
|
var itemEl = evt.item; // dragged HTMLElement
|
||||||
|
var player_order = itemEl.querySelector('[id^="sequence-member"]')
|
||||||
|
var player_available =itemEl.querySelector('[class^="member-availability-status"]')
|
||||||
|
refresh_lineup_order(itemEl)
|
||||||
|
// player_order.classList.add('d-none')
|
||||||
|
if (player_order.classList.contains('d-none')){
|
||||||
|
player_available.classList.remove('d-none')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var positionalonlylineup = new Sortable.create(
|
||||||
|
bcLineup.getElementsByClassName("tbody-benchcoach-startingpositionalonly")[0], {
|
||||||
|
handle: ".drag-handle",
|
||||||
|
group:{
|
||||||
|
name:bcLineup.id,
|
||||||
|
put:[bcLineup.id],
|
||||||
|
pull:[bcLineup.id]
|
||||||
|
},
|
||||||
|
onAdd: function (/**Event*/evt) {
|
||||||
|
var itemEl = evt.item; // dragged HTMLElement
|
||||||
|
var player_order = itemEl.querySelector('[id^="sequence-member"]')
|
||||||
|
var position_only = itemEl.querySelector('[id$="position_only"]')
|
||||||
|
position_only.value = true
|
||||||
|
var player_available =itemEl.querySelector('[class^="member-availability-status"]')
|
||||||
|
refresh_lineup_order(itemEl)
|
||||||
|
// player_order.classList.add('d-none')
|
||||||
|
if (player_order.classList.contains('d-none')){
|
||||||
|
player_available.classList.remove('d-none')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onRemove: function (/**Event*/evt) {
|
||||||
|
var itemEl = evt.item; // dragged HTMLElement
|
||||||
|
var player_order = itemEl.querySelector('[id^="sequence-member"]')
|
||||||
|
var player_available =itemEl.querySelector('[class^="member-availability-status"]')
|
||||||
|
var position_only = itemEl.querySelector('[id$="position_only"]')
|
||||||
|
position_only.value = false
|
||||||
|
|
||||||
|
if (player_order.classList.contains('d-none')){
|
||||||
|
player_available.classList.remove('d-none')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onUpdate: function (/**Event*/evt) {
|
||||||
|
var itemEl = evt.item; // dragged HTMLElement
|
||||||
|
refresh_lineup_order(itemEl)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function copyEmailTable(itemEl, subject, recipients){
|
||||||
|
// Create container for the HTML
|
||||||
|
// [1]
|
||||||
|
let bcLineup = itemEl.closest(".benchcoach-lineup")
|
||||||
|
var container = document.createElement('div')
|
||||||
|
var tbl = document.createElement('table')
|
||||||
|
|
||||||
|
let thead = tbl.createTHead()
|
||||||
|
let thead_row = thead.insertRow()
|
||||||
|
let thead_row_cell = thead_row.insertCell()
|
||||||
|
thead_row_cell.appendChild(document.createElement("h3").appendChild(document.createTextNode("STARTING LINEUP")))
|
||||||
|
thead_row_cell.colSpan=3;
|
||||||
|
thead_row_cell.classList.add('title-cell')
|
||||||
|
var tbody = tbl.createTBody()
|
||||||
|
for (row of bcLineup.querySelector(".table-benchcoach-startinglineup").rows) {
|
||||||
|
let tr = tbody.insertRow()
|
||||||
|
cell = tr.insertCell()
|
||||||
|
cell.classList.add('sequence-cell')
|
||||||
|
cell.appendChild(document.createTextNode((parseInt(row.dataset.order) + 1)))
|
||||||
|
cell = tr.insertCell()
|
||||||
|
cell.appendChild(document.createTextNode(row.dataset.playerName))
|
||||||
|
cell.classList.add('name-cell')
|
||||||
|
tr.insertCell().appendChild(document.createTextNode(row.dataset.position))
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bcLineup.querySelector('.table-benchcoach-startingpositionalonly').rows.length > 0) {
|
||||||
|
var tr = tbody.insertRow()
|
||||||
|
cell = tr.insertCell()
|
||||||
|
cell.colSpan=3
|
||||||
|
cell.appendChild(document.createTextNode("STARTING (POS. ONLY)"))
|
||||||
|
cell.classList.add('title-cell')
|
||||||
|
|
||||||
|
for (row of bcLineup.querySelector('.table-benchcoach-startingpositionalonly').rows) {
|
||||||
|
var tr = tbody.insertRow()
|
||||||
|
cell = tr.insertCell()
|
||||||
|
cell.classList.add('sequence-cell')
|
||||||
|
cell.appendChild(document.createTextNode(""))
|
||||||
|
cell=tr.insertCell()
|
||||||
|
cell.appendChild(document.createTextNode(row.dataset.playerName))
|
||||||
|
cell.classList.add('name-cell')
|
||||||
|
tr.insertCell().appendChild(document.createTextNode(row.dataset.position))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bcLineup.querySelector('.table-benchcoach-bench').rows.length > 0) {
|
||||||
|
var tr = tbody.insertRow()
|
||||||
|
cell = tr.insertCell()
|
||||||
|
cell.colSpan=3
|
||||||
|
cell.appendChild(document.createTextNode("SUBS"))
|
||||||
|
cell.classList.add('title-cell')
|
||||||
|
|
||||||
|
for (row of bcLineup.querySelector('.table-benchcoach-bench').rows) {
|
||||||
|
var tr = tbody.insertRow()
|
||||||
|
cell = tr.insertCell()
|
||||||
|
cell.classList.add('sequence-cell')
|
||||||
|
availability_status = {
|
||||||
|
None: "UNK",
|
||||||
|
"0": "NO",
|
||||||
|
"2": "MAY",
|
||||||
|
"1":"YES"
|
||||||
|
}[row.dataset.availabilityStatuscode]
|
||||||
|
cell.appendChild(document.createTextNode(availability_status))
|
||||||
|
cell=tr.insertCell()
|
||||||
|
cell.appendChild(document.createTextNode(row.dataset.playerName))
|
||||||
|
cell.classList.add('name-cell')
|
||||||
|
tr.insertCell().appendChild(document.createTextNode(""))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bcLineup.querySelector('.table-benchcoach-out').rows.length > 0) {
|
||||||
|
var tr = tbody.insertRow()
|
||||||
|
cell = tr.insertCell()
|
||||||
|
cell.colSpan=3
|
||||||
|
cell.appendChild(document.createTextNode("OUT"))
|
||||||
|
cell.classList.add('title-cell')
|
||||||
|
|
||||||
|
for (row of bcLineup.querySelector('.table-benchcoach-out').rows) {
|
||||||
|
var tr = tbody.insertRow()
|
||||||
|
cell = tr.insertCell()
|
||||||
|
cell.classList.add('sequence-cell')
|
||||||
|
availability_status = {
|
||||||
|
"None": "UNK",
|
||||||
|
"0": "NO",
|
||||||
|
"1": "MAY",
|
||||||
|
"2":"YES"
|
||||||
|
}[row.dataset.availabilityStatuscode]
|
||||||
|
cell.appendChild(document.createTextNode(availability_status))
|
||||||
|
tr.insertCell().appendChild(document.createTextNode(row.dataset.playerName))
|
||||||
|
tr.insertCell().appendChild(document.createTextNode(""))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
container.appendChild(tbl)
|
||||||
|
for (cell of container.getElementsByClassName('title-cell')){
|
||||||
|
cell.setAttribute (
|
||||||
|
"style",
|
||||||
|
"font-weight:bold;background-color:#323669;color:#fff;padding:2px 5px;"
|
||||||
|
)}
|
||||||
|
|
||||||
|
for (cell of container.getElementsByClassName('sequence-cell')){
|
||||||
|
cell.setAttribute (
|
||||||
|
"style",
|
||||||
|
"font-weight:bold;padding:2px 5px;"
|
||||||
|
)}
|
||||||
|
|
||||||
|
for (cell of container.getElementsByClassName('name-cell')){
|
||||||
|
cell.setAttribute (
|
||||||
|
"style",
|
||||||
|
"width:200px;"
|
||||||
|
)}
|
||||||
|
|
||||||
|
// Detect all style sheets of the page
|
||||||
|
var activeSheets = Array.prototype.slice.call(document.styleSheets)
|
||||||
|
.filter(function (sheet) {
|
||||||
|
return !sheet.disabled
|
||||||
|
})
|
||||||
|
|
||||||
|
// Mount the container to the DOM to make `contentWindow` available
|
||||||
|
// [3]
|
||||||
|
document.body.appendChild(container)
|
||||||
|
|
||||||
|
// Copy to clipboard
|
||||||
|
// [4]
|
||||||
|
window.getSelection().removeAllRanges()
|
||||||
|
|
||||||
|
var range = document.createRange()
|
||||||
|
range.selectNode(container)
|
||||||
|
window.getSelection().addRange(range)
|
||||||
|
|
||||||
|
// [5.1]
|
||||||
|
document.execCommand('copy')
|
||||||
|
|
||||||
|
// [5.2]
|
||||||
|
for (var i = 0; i < activeSheets.length; i++) activeSheets[i].disabled = true
|
||||||
|
|
||||||
|
// [5.3]
|
||||||
|
// document.execCommand('copy')
|
||||||
|
|
||||||
|
// [5.4]
|
||||||
|
for (var i = 0; i < activeSheets.length; i++) activeSheets[i].disabled = false
|
||||||
|
|
||||||
|
// Remove the container
|
||||||
|
// [6]
|
||||||
|
document.body.removeChild(container)
|
||||||
|
subject_encoded = encodeURIComponent(subject)
|
||||||
|
window.open("readdle-spark://compose?recipient=manager@chihounds.com&subject="+subject+"&bcc="+recipients)
|
||||||
|
}
|
||||||
|
|
||||||
|
colorPositions()
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
|
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="login-or">{% translate "or" %}</div>
|
{% if 0 %}<div class="login-or">{% translate "or" %}</div>{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -46,6 +46,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if 0 %}
|
||||||
<form class="login" method="POST" action="{% url 'account_login' %}">
|
<form class="login" method="POST" action="{% url 'account_login' %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form|crispy }}
|
{{ form|crispy }}
|
||||||
@@ -55,5 +56,6 @@
|
|||||||
<a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% translate "Forgot Password?" %}</a>
|
<a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% translate "Forgot Password?" %}</a>
|
||||||
<button class="primaryAction btn btn-primary" type="submit">{% translate "Sign In" %}</button>
|
<button class="primaryAction btn btn-primary" type="submit">{% translate "Sign In" %}</button>
|
||||||
</form>
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -24,11 +24,13 @@
|
|||||||
{# Placed at the top of the document so pages load faster with defer #}
|
{# Placed at the top of the document so pages load faster with defer #}
|
||||||
{% block javascript %}
|
{% block javascript %}
|
||||||
<!-- Bootstrap JS -->
|
<!-- Bootstrap JS -->
|
||||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.1.3/js/bootstrap.min.js" integrity="sha512-OvBgP9A2JBgiRad/mM36mkzXSXaJE9BEIENnVEmeZdITvwT09xnxLtT4twkCa8m/loMbPHsvPl0T8lRGVBwjlQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
<script defer src="{% static 'js/bootstrap.js' %}"></script>
|
||||||
<!-- Your stuff: Third-party javascript libraries go here -->
|
<!-- Your stuff: Third-party javascript libraries go here -->
|
||||||
|
|
||||||
<!-- place project specific Javascript in this file -->
|
<!-- place project specific Javascript in this file -->
|
||||||
<script defer src="{% static 'js/project.js' %}"></script>
|
<script defer src="{% static 'js/project.js' %}"></script>
|
||||||
|
<script defer src="{% static 'js/Sortable.js' %}"></script>
|
||||||
|
<script src="{% static 'js/chart.js' %}"></script>
|
||||||
|
|
||||||
{% endblock javascript %}
|
{% endblock javascript %}
|
||||||
|
|
||||||
@@ -37,12 +39,16 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="mb-1">
|
<div class="mb-1">
|
||||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark">
|
<nav class="navbar navbar-expand-md navbar-dark bg-navbar">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<button class="navbar-toggler navbar-toggler-right" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler navbar-toggler-right" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="navbar-brand" href="{% url 'home' %}">BenchCoach</a>
|
|
||||||
|
<a class="navbar-brand" href="{% url 'home' %}">
|
||||||
|
<img class="d-inline-block" width="32" height="32" src="{% static 'images/benchcoach.svg' %}" />
|
||||||
|
BenchCoach
|
||||||
|
</a>
|
||||||
|
|
||||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||||
<ul class="navbar-nav mr-auto">
|
<ul class="navbar-nav mr-auto">
|
||||||
@@ -57,9 +63,15 @@
|
|||||||
{# URL provided by django-allauth/account/urls.py #}
|
{# URL provided by django-allauth/account/urls.py #}
|
||||||
<a class="nav-link" href="{% url 'users:detail' request.user.username %}">{% translate "My Profile" %}</a>
|
<a class="nav-link" href="{% url 'users:detail' request.user.username %}">{% translate "My Profile" %}</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="{% url 'teamsnap_dashboard' %}">{% translate "Dashboard" %}</a>
|
||||||
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'teamsnap_schedule' %}">{% translate "Schedule" %}</a>
|
<a class="nav-link" href="{% url 'teamsnap_schedule' %}">{% translate "Schedule" %}</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="{% url 'teamsnap_preferences' %}">{% translate "Preferences" %}</a>
|
||||||
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
{# URL provided by django-allauth/account/urls.py #}
|
{# URL provided by django-allauth/account/urls.py #}
|
||||||
<a class="nav-link" href="{% url 'account_logout' %}">{% translate "Sign Out" %}</a>
|
<a class="nav-link" href="{% url 'account_logout' %}">{% translate "Sign Out" %}</a>
|
||||||
|
|||||||
@@ -1 +1,33 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="card">
|
||||||
|
<div class="row">
|
||||||
|
<div class="text-center my-2">
|
||||||
|
<h1><img class="mx-auto" src="{% static 'benchcoach.svg' %}" style="width: 64px;"/>
|
||||||
|
<strong>Welcome to <span class="text-nowrap">Bench Coach</span></strong>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="text-center my-2">
|
||||||
|
<div class="col-lg-6 m-auto">
|
||||||
|
<p class="lead mb-4">Quisque at curabitur mollis ornare, malesuada maecenas. Orci elit
|
||||||
|
tristique,
|
||||||
|
malesuada eu pharetra. Est praesent tortor porttitor aptent, amet quisque.</p>
|
||||||
|
{# <div class="d-grid gap-2 d-sm-flex justify-content-sm-center mx-1">#}
|
||||||
|
{# <button class="btn btn-primary" type="button">Login</button><button class="btn btn-outline-secondary" type="button">Sign Up</button>#}
|
||||||
|
{# </div>#}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-sm">
|
||||||
|
{# <ul class="nav nav-pills flex-column mb-auto">#}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|||||||
19
benchcoach/templates/socialaccount/login.html
Normal file
19
benchcoach/templates/socialaccount/login.html
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{% extends "socialaccount/base.html" %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% if process == "connect" %}
|
||||||
|
<h1>{% blocktrans with provider.name as provider %}Connect {{ provider }}{% endblocktrans %}</h1>
|
||||||
|
|
||||||
|
<p>{% blocktrans with provider.name as provider %}You are about to connect a new third party account from {{ provider }}.{% endblocktrans %}</p>
|
||||||
|
{% else %}
|
||||||
|
<h1>{% blocktrans with provider.name as provider %}Sign In Via {{ provider }}{% endblocktrans %}</h1>
|
||||||
|
|
||||||
|
<p>{% blocktrans with provider.name as provider %}You are about to sign in using a third party account from {{ provider }}.{% endblocktrans %}</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<form method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
<button class="btn btn-primary" type="submit">{% trans "Continue" %}</button>
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{% load socialaccount %}
|
||||||
|
|
||||||
|
{% providers_media_js %}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
{% load socialaccount %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% get_providers as socialaccount_providers %}
|
||||||
|
|
||||||
|
<ul class="list-group">
|
||||||
|
{% for provider in socialaccount_providers %}
|
||||||
|
{% if provider.id == "openid" %}
|
||||||
|
{% for brand in provider.get_brands %}
|
||||||
|
<li class="list-group-item">
|
||||||
|
<a title="{{brand.name}}"
|
||||||
|
class="socialaccount_provider {{provider.id}} {{brand.id}}"
|
||||||
|
href="{% provider_login_url provider.id openid=brand.openid_url process=process %}"
|
||||||
|
>{{brand.name}}</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% if provider.id == "teamsnap"%}
|
||||||
|
<li class="list-group-item">
|
||||||
|
<a title="{{provider.name}}" class="socialaccount_provider {{provider.id}}"
|
||||||
|
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">
|
||||||
|
<img src="{% static "images/teamsnap.svg" %}" style="height:1.5em;">
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% else %}
|
||||||
|
<li class="list-group-item">
|
||||||
|
<a title="{{provider.name}}" class="socialaccount_provider {{provider.id}}"
|
||||||
|
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">{{provider.name}}</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
-----BEGIN CERTIFICATE-----
|
|
||||||
MIIC5TCCAc2gAwIBAgIJAOWAe0jJE81PMA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV
|
|
||||||
BAMMCWxvY2FsaG9zdDAeFw0yMjA2MDExOTI3MTdaFw0yMjA3MDExOTI3MTdaMBQx
|
|
||||||
EjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
|
||||||
ggEBANaSWlRh7tBUWzeUeBMl0LI/Qs3ftErK2d+jfbXW3iqK8M9KDg/xMBZYA5T7
|
|
||||||
6UtG7WSRl48anvgqeZjOrmwdfGdJkbAjwz0U+FhFIokT4Cp1BSok6CZoqfBhqODX
|
|
||||||
WLdG+iG6D4SrrDXYpL2HClmR7xHd886I33l/bj+pC1kbRBABwhDcTLlPjRkUJsRG
|
|
||||||
OOwsyHZ0aBPKxfRih7WbrCv3NiHVNwFL7wgKAgnAiFvZhjIppY7BitCUvPR+/yCm
|
|
||||||
jBv7HFAIglMr57v8wcJGTDx114qbHNVugbb6x6L1kry57hHa6g2V0AWkUvAPpsBp
|
|
||||||
Eqrd09iM92cp76Wetx7sSO1YoNUCAwEAAaM6MDgwFAYDVR0RBA0wC4IJbG9jYWxo
|
|
||||||
b3N0MAsGA1UdDwQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDATANBgkqhkiG9w0B
|
|
||||||
AQsFAAOCAQEAtvk0S2R6G+Te9CmeQPEF3yK2MrWqXbX3Nvw5BwoqvwptGbjvX6U0
|
|
||||||
l5Ajnsdt3wfiwcr2T9NzSy2uj93QsVW5KP7PQP3MLZAjydTaD9qgSTFpuva2iVaO
|
|
||||||
7lfuWHlF2UVGyxDXrnXuvB4ovXmP83Az6/Q0ly4qALxYc76vKRWNeFLDEGTdYbzu
|
|
||||||
Xxs9CWjLwniVObIg1ETxizZCB1ejmFk05Xgedp0u8MqB/TalckaLV1vkdZqxr9aj
|
|
||||||
qsjKIvYw7a1hSP1Li69egsXvQ9fvBQs1jX6itznIfwTRVgqCIi2A+EP+eZu8NCua
|
|
||||||
EWKDN3uw0VcPbyalIfkKdQAbQ5B/xedcXQ==
|
|
||||||
-----END CERTIFICATE-----
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
-----BEGIN PRIVATE KEY-----
|
|
||||||
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDWklpUYe7QVFs3
|
|
||||||
lHgTJdCyP0LN37RKytnfo3211t4qivDPSg4P8TAWWAOU++lLRu1kkZePGp74KnmY
|
|
||||||
zq5sHXxnSZGwI8M9FPhYRSKJE+AqdQUqJOgmaKnwYajg11i3Rvohug+Eq6w12KS9
|
|
||||||
hwpZke8R3fPOiN95f24/qQtZG0QQAcIQ3Ey5T40ZFCbERjjsLMh2dGgTysX0Yoe1
|
|
||||||
m6wr9zYh1TcBS+8ICgIJwIhb2YYyKaWOwYrQlLz0fv8gpowb+xxQCIJTK+e7/MHC
|
|
||||||
Rkw8ddeKmxzVboG2+sei9ZK8ue4R2uoNldAFpFLwD6bAaRKq3dPYjPdnKe+lnrce
|
|
||||||
7EjtWKDVAgMBAAECggEBAMLdewdzQS0Vzxl0zm+lQhj+9q59YQEjpCZEFiCUGIPO
|
|
||||||
VtAKUycLRT6lg+tDtCVXLrTMvDWMWZ7LBE9QNHufc6Fh4Nt0PxUz/C496xVOZaBp
|
|
||||||
Ud1qUyK+nsbeCj7Xk4wu+26xyPIV7nmgXEx7XVzm+ZTiW07QYxO2NOu/m7y61F8r
|
|
||||||
btLpz064WMVtRyP0VNMOF6bbAX4PXW93bumNaYbZe4cMChHO5xaiizOtnLkVhmYg
|
|
||||||
u35NuD2JGKUJbwgdCtKe17N1H6Rqq4VhONnaDrtZ9LjyAVxkBIVbNWItSVayyeC0
|
|
||||||
E+IMK7U72xi4oRgMa+NbYte/GqjDWrn0dkLgBmEZzYECgYEA+1zya7n2NhIxpo3f
|
|
||||||
UPvXNqNckN/aglDwcs+VSDMprg0M6F014TXT6TPDYzeaFSHuHmWbYfENjP7INBNy
|
|
||||||
rWkpZl+VwO7rO47nt0FSaCsKF8XNEg58xkNpvNnmDJcI3Xdih/xTrdI0QuaE6II3
|
|
||||||
p0UhF1FvlH3YKS9syKIwYH4RmkUCgYEA2oeo8ClJkLUMr0wFrYobhqMoUkgxjxQK
|
|
||||||
CscfpIPOKqFvJ8Iy+LZ2ICw99EJw+gqi1hee5H7dhUluwYw+PYzrE/IHDogbM1rI
|
|
||||||
pEsj+dxOdRzobKmfCHaR6pkDXLwzC5TuMxbFs0rP/K3mvzznnpU3nOIV+CWoKcM7
|
|
||||||
vvzHtIFpHVECgYAVeIUEiqfrSnaPQYMXyctCUYXwog5qHzvKssyPlD81LMwzdPLL
|
|
||||||
P+vP+anw6ajxsSpD0m4JWavMpV64hAjBoz/0DKogBsh1F+nXD29YkoSUL0MrDa2+
|
|
||||||
ybdYeExcOvJ46F+0Oetz54arSEGGEslqMk93TG95gZ5bNj/Wi3QSafJa+QKBgHLP
|
|
||||||
03JaPsxIUuHGjzUd2lhiYEzaoS8K2DvRYk6M8UR0jHHXFfCV7Hn6xJIQVksIS4Uv
|
|
||||||
48so3Dmq2wXVKN4tq1RPVGXOHHxetgubbstXc+ETzwlIFMXdhcw7mAig2DC9jmhJ
|
|
||||||
DpWkOKIIu7K9zPMEcrN6FRDKuA85A6rUJBgx5YgBAoGALjA1CwlqKkXFe2Dx+7eS
|
|
||||||
6SGOWWHCFEoHfZ1YqqalrCSJxz7MGj4ufKdBy1veWjGrTEBtta9jEgDWqMKfrMWk
|
|
||||||
Mjqj/0dckfH3TIvaHg6YCwwIg86VpgCKRW9AA9XHuhIYzaRQoQFIcNchFo/PPyu+
|
|
||||||
4bPxjxfY9TE4Fp4b73M7JuQ=
|
|
||||||
-----END PRIVATE KEY-----
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
-----BEGIN CERTIFICATE-----
|
|
||||||
MIIC5TCCAc2gAwIBAgIJAJtrwiB98GKwMA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV
|
|
||||||
BAMMCWxvY2FsaG9zdDAeFw0yMjA2MDExNjEyNTdaFw0yMjA3MDExNjEyNTdaMBQx
|
|
||||||
EjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
|
||||||
ggEBAOkPzNMERR612c2CQO/34fGyhKyKS4bLjp/9sPfxoOchWo+966z5GMal3a55
|
|
||||||
KWJKK2uAD2HWJGzNJovp5Oaz66BasafUBDB7OYnh1rZEGokcVszwZPLbTTJUnOYP
|
|
||||||
zzpS0ExAWCCMqvGDe5Yubm5EN3MXDzcKiOOnHRtT0K2Pf755QWjafnRudqOfJlKP
|
|
||||||
02jGGhCW1Up7RXMYxixnKnNsTaQV2bRLEPA5Nci+q5npsVPFJxaDgh8VigVtMlom
|
|
||||||
Q3CXL/CFi6r5uMwq3UVY3Kg/B0KelxYySaD96+3b7mnTL5BDxte1AiOR03lrvJAz
|
|
||||||
s4nPMnFaF+3oeNPtbm6dWe5hjicCAwEAAaM6MDgwFAYDVR0RBA0wC4IJbG9jYWxo
|
|
||||||
b3N0MAsGA1UdDwQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDATANBgkqhkiG9w0B
|
|
||||||
AQsFAAOCAQEAjHQ7+/BqDywK1+ds21TSztzWs8MFzVA70ZXWxeSHgvV6vbWOFFMm
|
|
||||||
L5y13lKFX/LHJlT/EuHBquyWMNsNzUhBpZysrd9hxk1UsiCL/OJpBFDvqEdtWhxJ
|
|
||||||
3UE6X7PyqX2o5vpGyuTTFhLwhDe9zNW18v3NAWyd89nMitrX4HtVYQt8HkeCXZO3
|
|
||||||
PmEyv4gE5PpjQbcSelinjXyrpki7LDTSvjaBN80LFbVaP7o6Nro4oKzqf7YnO8nu
|
|
||||||
+R+M0tRTpSDGX34Es7OtaiFkYvhG8GtopHCrF2jAMTyiYg8zjRAoOfVv2ijCHkOT
|
|
||||||
AfQFMx65BIucKlLU4YcI6lnQcmLS33AK/A==
|
|
||||||
-----END CERTIFICATE-----
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
-----BEGIN PRIVATE KEY-----
|
|
||||||
MIIEwAIBADANBgkqhkiG9w0BAQEFAASCBKowggSmAgEAAoIBAQDpD8zTBEUetdnN
|
|
||||||
gkDv9+HxsoSsikuGy46f/bD38aDnIVqPveus+RjGpd2ueSliSitrgA9h1iRszSaL
|
|
||||||
6eTms+ugWrGn1AQwezmJ4da2RBqJHFbM8GTy200yVJzmD886UtBMQFggjKrxg3uW
|
|
||||||
Lm5uRDdzFw83Cojjpx0bU9Ctj3++eUFo2n50bnajnyZSj9NoxhoQltVKe0VzGMYs
|
|
||||||
ZypzbE2kFdm0SxDwOTXIvquZ6bFTxScWg4IfFYoFbTJaJkNwly/whYuq+bjMKt1F
|
|
||||||
WNyoPwdCnpcWMkmg/evt2+5p0y+QQ8bXtQIjkdN5a7yQM7OJzzJxWhft6HjT7W5u
|
|
||||||
nVnuYY4nAgMBAAECggEBANsuktB5GZASMe2F7BBCLWmjHAcwYGs6kL2CVqY3xbzY
|
|
||||||
r1SzpisccOKRJvRo2jSn0EHfQ5gdTlBMd03p/+2/k39RC/br+6yklq5HiCgN0G7W
|
|
||||||
CgPeqPGEsQr+bDgo8hjFvUOY18h0wmcz4kyRCiYFXaiNLS/0ZlzC0yraHky7wcWc
|
|
||||||
dBrQ40TBejeCvkXhqDUv7PPFeSaDD44BML1YZ1M/C6JqGC67eZedcHnE6X1bJyK0
|
|
||||||
iJjnL0CwCabTUhnPjFyQsnL96Yl8k5pFlWM9cSQgmOlISW+PsD12eLctCRjlJIKh
|
|
||||||
LKMaB80G38Tkpg26DyMjvANhB92Wa0YUFZI8KLZ5QPECgYEA+ClDhuu6r10Bz5gs
|
|
||||||
R+IU/FvxFFE1cI3Cr/orNnZ+IsbfhrQrDeEOBLue5A2O81mJOpSoPECLPSWP1UQI
|
|
||||||
MugKFZNyqOX9ew9TMSYI6nVvACHSXMFvkCNfnbYdUcnvVA3UsuIEnopVnRKHJpi+
|
|
||||||
LJIpnh1k1Z/EdoeaUvRoMjSlvV0CgYEA8GxvhkKDL6aGQRXiMdsTKgjfFen2P9IJ
|
|
||||||
KOsP/1ZDbYoGp9RF9Rtq21vFIIyovmbXr1gqAcsJwThdUogb5U2CGaRjhUrJkDUC
|
|
||||||
Er6uPQn52Ywrn6dJe7S7qX9nFkhKaT8KKHPDXfZDfpmUxGj7xlQ3sDGUM7LjVahp
|
|
||||||
Wu8bN2o+PVMCgYEAz5Ocg2f84SDYGfB84afvy+OQNWF0ZPB/MDn/GXBmM+rMIF3m
|
|
||||||
QZbF5hmWX8Yjk9SKIDEmxDdtALnBpS9h+Er13HRYjYTL0brQ6KSbAps2PRMNZj77
|
|
||||||
dcLRARfLUJWsFk/3YaYDHSYzVM6htBxBvwCHxVVq+fHJIShuYwNDgPNey5UCgYEA
|
|
||||||
hhLCYqnGxJTlu3f7qvfTiRZnaa4OH+r+Jq5nPmoZsgVNztvGo3hFr8xOcudd1sg9
|
|
||||||
MVBGJLfYWcMX78VtYQNHMQuGYDejjeKxpEhnnCxrA5FyZlcA2JaiLFSa5UctD+IS
|
|
||||||
xRpBca26V+hHmPw+o4wlfgE391ikBAmlrws2L0H1MXcCgYEAoMDXrEyekXqD89t7
|
|
||||||
uXLijdZrYr5olHvRYxWPInZR6vhFpdJr/kSGPtDxLE5hBwyDToo6Ls3Z0lHS32yx
|
|
||||||
DQi2U7VgOIHh2ZxukOQpNSeGqJxXIZQevpOfjxWq7Svf7bAF3MOm9EHPKONxdK1u
|
|
||||||
jAveE07JKYu/jgkNnQ8fBaRPfEU=
|
|
||||||
-----END PRIVATE KEY-----
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
-----BEGIN CERTIFICATE-----
|
|
||||||
MIIERjCCAq6gAwIBAgIRAInND2ZiRRQ6K0xgGGgjnKowDQYJKoZIhvcNAQELBQAw
|
|
||||||
cTEeMBwGA1UEChMVbWtjZXJ0IGRldmVsb3BtZW50IENBMSMwIQYDVQQLDBphc2NA
|
|
||||||
dW5pZmkgKEFudGhvbnkgQ29ycmVhKTEqMCgGA1UEAwwhbWtjZXJ0IGFzY0B1bmlm
|
|
||||||
aSAoQW50aG9ueSBDb3JyZWEpMB4XDTIyMDYwMTEzNTcyM1oXDTI0MDkwMTEzNTcy
|
|
||||||
M1owTjEnMCUGA1UEChMebWtjZXJ0IGRldmVsb3BtZW50IGNlcnRpZmljYXRlMSMw
|
|
||||||
IQYDVQQLDBphc2NAdW5pZmkgKEFudGhvbnkgQ29ycmVhKTCCASIwDQYJKoZIhvcN
|
|
||||||
AQEBBQADggEPADCCAQoCggEBAL+pI+lgSoCvwltuuaCIVbd8VtAK6Q/eyeXxZzAL
|
|
||||||
ib3Pu5JDsPxiNn5xYPvQ0RDf2pqU8skxjgBhXdXN+u6IPrBCyWNh+3IvVYTZwsP1
|
|
||||||
SxNf37dGOviKJj35sEfsFOXw3Q1GwmOoB1fcnqGfTCUUTOOpICSaDRiIM7LFoklc
|
|
||||||
PCz+hXmb3lK41tnS7A/JijI1qKZB2eIHvn3lPcgYhH4Yh7vOhgNGAyEhR0HTnF0y
|
|
||||||
ItuW+GXy8DJN6FbnS0k15dd/3YPZ72Oi7adJcZeCJ+vd/oEOkc67wmzX46Fms95s
|
|
||||||
IohtZ/JJiCtzUCXho/1/OvzzBCuxxbKyCyQsHLhWuUYE0P0CAwEAAaN8MHowDgYD
|
|
||||||
VR0PAQH/BAQDAgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMB8GA1UdIwQYMBaAFP27
|
|
||||||
oZ043cJloYGu1IVWHR8G4u7rMDIGA1UdEQQrMCmCCWxvY2FsaG9zdIcEAAAAAIcE
|
|
||||||
AAAAAIcQAAAAAAAAAAAAAAAAAAAAATANBgkqhkiG9w0BAQsFAAOCAYEAszL5NRQu
|
|
||||||
cusoU55uky3mYhsPUQbmO17yLPE/Z4cq4lf3UkBFgOl6xKUOiZYiXn+GRwkQsWmO
|
|
||||||
AmHx3y20ROH4Y+YR8C1D2rZT7oFTZ0sfOTX3Ddoqvfbx/GaQkf0rXcgtdYyhO+wU
|
|
||||||
eYy8yoQhoG6Ko053jmSBVHHBpOKq8yJ9faA5f48r3cBLa3UiPIrZRKxMNvpB3k5h
|
|
||||||
eglQPZuyWESzZyGUe1UKAdCylWrtgQ9NuaMe9Cqjw+ltgYtJmKxPDqtfdzOOtgxd
|
|
||||||
dZ9gPLrnuij58tTKcNezsf1RorgbZhkhVqXPADqqsFUCCSj1F4gDEKip3f5XPKi1
|
|
||||||
yHWFrC6AsQ4Wtj9geC+vWIIBKb1YsnioIx0YgUysucpo90kegUQjBDJdwJCEKAId
|
|
||||||
4WkgmU083sof/+jpKSDMJVqlMcaGu6N5Qh7NcTC9OZyXU9cqvTOrTH1dL9iXQ2c8
|
|
||||||
f6PoyaXvns8RefpOuysIuX1yxKZvOLFabiPkHA9jD/6FcZkENmEPOo1j
|
|
||||||
-----END CERTIFICATE-----
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
-----BEGIN PRIVATE KEY-----
|
|
||||||
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC/qSPpYEqAr8Jb
|
|
||||||
brmgiFW3fFbQCukP3snl8WcwC4m9z7uSQ7D8YjZ+cWD70NEQ39qalPLJMY4AYV3V
|
|
||||||
zfruiD6wQsljYftyL1WE2cLD9UsTX9+3Rjr4iiY9+bBH7BTl8N0NRsJjqAdX3J6h
|
|
||||||
n0wlFEzjqSAkmg0YiDOyxaJJXDws/oV5m95SuNbZ0uwPyYoyNaimQdniB7595T3I
|
|
||||||
GIR+GIe7zoYDRgMhIUdB05xdMiLblvhl8vAyTehW50tJNeXXf92D2e9jou2nSXGX
|
|
||||||
gifr3f6BDpHOu8Js1+OhZrPebCKIbWfySYgrc1Al4aP9fzr88wQrscWysgskLBy4
|
|
||||||
VrlGBND9AgMBAAECggEBAKjnyro1HfNi8YnafsS24bOeZHNb6iEOWifHIwT4Zh9d
|
|
||||||
HxS7ixIhC51LFglV8alJXkG02nHsthQnuqZdrLLiZzy23vwysYHjrR4zOq2vUsZ0
|
|
||||||
S5gc0IOQXDtp/KylpZUvO+AjZ9SjlDUePL56wIQ867YGqkkXaksgXU9DVM4J9w4+
|
|
||||||
iIpQ/BH3JYBc0HaAjzgi+v2mqMhv18RLFLAP0ESKaIUOLBQB5xHxL++k9IpKuvaI
|
|
||||||
2XonSAPkugmxBwbySw3w4gV4d1gNSFnbq13L9cMvkmmd8FDWerb+3SKGxIqeZFtS
|
|
||||||
eEp2+LD5dzVnEJFQjk/kHQQHJU7gXtcoUiB+zvJ2gxECgYEA75tGM+mcB8tWLmPd
|
|
||||||
tTcLh+AXN6buc8SHb9O1WQTI1vNmwRD8IdlvlByPq1HkLPkXkO/QFO2xsrRCp2M/
|
|
||||||
4apoj3wVNPxWhbTpYj5LB62ou0m+37ywYdI0EdsVQN1q9PmqDcp/U18xjLR6Hlq+
|
|
||||||
Ud+ZxisDVf0vIQ/RU16BdddSBKcCgYEAzMYXXtVSG1mUjF4+G68uy3kxwBL0sl8l
|
|
||||||
EJ9RWZZgUP3HGOMe8U72UsfX5UZiIaLdzB4j1vsnCu5snGqb9T8j5KJcZxJDhYqj
|
|
||||||
aO4zlPrCFTzOVKhl7NuPLnElE2YfRRhedC23AjcRsn+T/0uyCXgvZVyyuJZMsGyn
|
|
||||||
DeP6rPjXnbsCgYEA2XVL7ptrL6u8iJe8RNYzUdrwV2LacRkBbl1u7d6oxGTdcgWP
|
|
||||||
Ps1PNdYCEhNdie98Et+DMytSpgRxpecuuAlnoimUOaV2hRze33n3sH1McMYKRJbE
|
|
||||||
YdNbzITQMjGB+9mHG8MXcbwohTHazye+KSJNNowdF/KTzmbDrO1Ng3yrBGsCgYBX
|
|
||||||
LADo6xDf+buGIdx4tpPKJNar+KXYhS5nLBtacuyfrdki3BThDwdHaDGdNeAyh326
|
|
||||||
Fh6VtycAvUzZLX0k4vMpsoB5lEnQQJud4MFuq20R02fWnDV/plwGnj31SyUGqgAT
|
|
||||||
nx5oP/81qJ/dL2EkLNioYtTmRX1yIV7gR+v/1JMdXwKBgH6YmLJEOIoWBn6NLQao
|
|
||||||
tcjOzL6e5hmMRMT30+oxW3d01rUiK3XfuzYvqL1L/+AGIF8rOq3DBepW1TToszo4
|
|
||||||
TOCWT7fIbkuO7TrPf/0Bw5SzVYA2gGbG0dAqXYJg+pTshdHx6vXKETycWKI6CaA1
|
|
||||||
sTEc5Bm5B128cY7h40ScqoXi
|
|
||||||
-----END PRIVATE KEY-----
|
|
||||||
@@ -71,3 +71,4 @@ ACCOUNT_USERNAME_REQUIRED = False
|
|||||||
ACCOUNT_UNIQUE_EMAIL = True
|
ACCOUNT_UNIQUE_EMAIL = True
|
||||||
ACCOUNT_EMAIL_VERIFICATION = "none"
|
ACCOUNT_EMAIL_VERIFICATION = "none"
|
||||||
SOCIALACCOUNT_STORE_TOKENS = True
|
SOCIALACCOUNT_STORE_TOKENS = True
|
||||||
|
ACCOUNT_ALLOW_REGISTRATION = False
|
||||||
|
|||||||
0
instagen/migrations/__init__.py
Normal file
0
instagen/migrations/__init__.py
Normal file
0
instagen/utils/__init__.py
Normal file
0
instagen/utils/__init__.py
Normal file
@@ -1,5 +1,5 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
from django.forms import ModelForm
|
from django.forms import ModelForm, formset_factory
|
||||||
|
|
||||||
from .models import Preferences
|
from .models import Preferences
|
||||||
|
|
||||||
@@ -14,3 +14,41 @@ class PreferencesForm(ModelForm):
|
|||||||
choices=(), attrs={"class": "form-control"}
|
choices=(), attrs={"class": "form-control"}
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
labels = {"managed_team_id": "Selected Team"}
|
||||||
|
|
||||||
|
|
||||||
|
class LineupEntryForm(forms.Form):
|
||||||
|
member = None
|
||||||
|
availability = None
|
||||||
|
lineup_entry = None
|
||||||
|
|
||||||
|
event_lineup_entry_id = forms.Field(required=False)
|
||||||
|
event_lineup_id = forms.Field(required=False)
|
||||||
|
event_id = forms.Field()
|
||||||
|
member_id = forms.Field()
|
||||||
|
position_only = forms.BooleanField(initial=False, required=False)
|
||||||
|
sequence = forms.IntegerField(required=False)
|
||||||
|
label = forms.ChoiceField(
|
||||||
|
required=False,
|
||||||
|
choices=[
|
||||||
|
("", "--"),
|
||||||
|
("P", "P"),
|
||||||
|
("C", "C"),
|
||||||
|
("1B", "1B"),
|
||||||
|
("2B", "2B"),
|
||||||
|
("3B", "3B"),
|
||||||
|
("SS", "SS"),
|
||||||
|
("LF", "LF"),
|
||||||
|
("CF", "CF"),
|
||||||
|
("RF", "RF"),
|
||||||
|
("DH", "DH"),
|
||||||
|
("DR", "DR"),
|
||||||
|
("EH", "EH"),
|
||||||
|
],
|
||||||
|
widget=forms.Select(attrs={"onchange": "colorPositions();"}),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
LineupEntryFormset = formset_factory(
|
||||||
|
LineupEntryForm, can_delete=True, can_order=True, extra=0
|
||||||
|
)
|
||||||
|
|||||||
148
teamsnap/templates/dashboard.html
Normal file
148
teamsnap/templates/dashboard.html
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
{% extends "base.html" %}{% load static %}
|
||||||
|
{% block title %} {{ title }}{% endblock %}
|
||||||
|
{% block page_heading %}{% endblock %}
|
||||||
|
{% block content %}
|
||||||
|
<h3>Dashboard</h3>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md pb-2">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h4>Upcoming Games</h4>
|
||||||
|
</div>
|
||||||
|
<div class="card-body p-0 m-0">
|
||||||
|
|
||||||
|
{% for event, availability_summary in events_availabilities|slice:":4" %}
|
||||||
|
<div class="row m-0 p-2 border-bottom">
|
||||||
|
<div class="col p-0 m-auto" style="flex: 0 0 100px;">
|
||||||
|
<div class="d-inline-flex m-0 p-0">
|
||||||
|
<div class="chart-container" style="height: 100px;width: 100px;">
|
||||||
|
<canvas id="availability-donut-{{ event.data.id }}" class="availability-donut"
|
||||||
|
data-event-id="{{ event.data.id }}"
|
||||||
|
data-available-yes="{{ availability_summary.data.player_going_count }}"
|
||||||
|
data-available-no="{{ availability_summary.data.player_not_going_count }}"
|
||||||
|
data-available-maybe="{{ availability_summary.data.player_maybe_count }}"
|
||||||
|
data-available-unknown="{{ availability_summary.data.player_unknown_count }}"
|
||||||
|
>
|
||||||
|
</canvas></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<div>
|
||||||
|
<h4><strong><a class="text-decoration-none text-black" href="{% url 'teamsnap_view_event' team_id=event.data.team_id event_id=event.data.id %}">{{ event.data.formatted_title }}</a></strong></h4>
|
||||||
|
<h6 class="text-muted mb-2">{{ event.data.start_date|date:"D, F j, g:i A" }}</h6>
|
||||||
|
<h6 class="text-muted mb-2">{{ event.data.location_name }}</h6>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex">
|
||||||
|
<a class="btn btn-primary btn-sm mx-1" role="button" href="{% url 'teamsnap_edit_lineup' event_ids=event.data.id team_id=event.data.team_id %}">Go to Lineup</a>
|
||||||
|
<form method="get"
|
||||||
|
action="">
|
||||||
|
<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-sm"><i class="bi bi-instagram"></i>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md pb-2">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h4>Past Games</h4>
|
||||||
|
</div>
|
||||||
|
<div class="card-body p-0 m-0">
|
||||||
|
|
||||||
|
{% for event in ts_events_past|slice:":4" %}
|
||||||
|
<div class="row m-0 p-2 border-bottom">
|
||||||
|
<div class="col p-0 m-auto rounded-circle bg-light" style="flex: 0 0 100px;">
|
||||||
|
<div class="d-inline-flex m-0 p-0">
|
||||||
|
<div class="d-flex align-items-center justify-content-center" style="height: 100px;width: 100px;">
|
||||||
|
<h4 class="text-center"><strong>{{ event.data.formatted_results }}</strong></h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<h4 class=""><strong><a class="text-decoration-none text-black" href="{% url 'teamsnap_view_event' team_id=event.data.team_id event_id=event.data.id %}">{{ event.data.formatted_title }}</a></strong></h4>
|
||||||
|
<h6 class="text-muted mb-2">{{ event.data.start_date|date:"D, F j" }}</h6>
|
||||||
|
{# <h6 class="text-muted mb-2">{{ event.data.location_name }}</h6><a class="btn btn-primary btn-sm" role="button" href="{% url 'teamsnap_edit_lineup' event_ids=event.data.id team_id=request.user.teamsnapsettings.managed_team.id %}">Go to Lineup</a>#}
|
||||||
|
|
||||||
|
<div class="d-flex">
|
||||||
|
<form method="get"
|
||||||
|
action="">
|
||||||
|
<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-sm"><i class="bi bi-instagram"></i>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
{% block inline_javascript %}
|
||||||
|
<script>
|
||||||
|
function donut(ctx, yes_count, maybe_count, no_count, unknown_count) {
|
||||||
|
var style = getComputedStyle(document.body);
|
||||||
|
const myChart = new Chart(ctx, {
|
||||||
|
type: 'doughnut',
|
||||||
|
responsive: 'true',
|
||||||
|
data: {
|
||||||
|
datasets: [{
|
||||||
|
label: 'Availability',
|
||||||
|
labels: [
|
||||||
|
'Yes',
|
||||||
|
'Maybe',
|
||||||
|
'No',
|
||||||
|
'Unknown'
|
||||||
|
],
|
||||||
|
data: [yes_count, maybe_count, no_count, unknown_count],
|
||||||
|
backgroundColor: [
|
||||||
|
style.getPropertyValue('--bs-success'),
|
||||||
|
style.getPropertyValue('--bs-info'),
|
||||||
|
style.getPropertyValue('--bs-danger'),
|
||||||
|
style.getPropertyValue('--bs-secondary')
|
||||||
|
],
|
||||||
|
hoverOffset: 4
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
for (ctx of document.querySelectorAll('.availability-donut')){
|
||||||
|
donut(ctx,
|
||||||
|
ctx.dataset.availableYes,
|
||||||
|
ctx.dataset.availableMaybe,
|
||||||
|
ctx.dataset.availableNo,
|
||||||
|
ctx.dataset.availableUnknown,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
@@ -134,7 +134,7 @@
|
|||||||
<div class="row m-0">
|
<div class="row m-0">
|
||||||
<div class="flex-column m-2">
|
<div class="flex-column m-2">
|
||||||
<a class="btn btn-primary btn-sm"
|
<a class="btn btn-primary btn-sm"
|
||||||
href=""
|
href="{% url 'teamsnap_edit_lineup' team_id=event.data.team_id event_ids=event.data.id %}"
|
||||||
role="button">Edit</a>
|
role="button">Edit</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
10
teamsnap/templates/lineup/edit.html
Normal file
10
teamsnap/templates/lineup/edit.html
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{% 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 %}
|
||||||
97
teamsnap/templates/lineup/multiple_choose.html
Normal file
97
teamsnap/templates/lineup/multiple_choose.html
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
{% extends "base.html" %}{% load static %}
|
||||||
|
{% block title %} {{ title }}{% endblock %}
|
||||||
|
|
||||||
|
{% block page_heading %}
|
||||||
|
<div class="row d-inline-flex">
|
||||||
|
<div class="col">
|
||||||
|
Multiple Lineup Edit
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
{% block content %}
|
||||||
|
<form method="post" action="{% url 'teamsnap_choose_multiple_lineups' team_id=team_id%}">
|
||||||
|
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-striped table-sm">
|
||||||
|
{{ formset.management_form }}
|
||||||
|
{% csrf_token %}
|
||||||
|
{# <thead>#}
|
||||||
|
{# </thead>#}
|
||||||
|
<tbody>
|
||||||
|
{% for form in formset %}
|
||||||
|
<tr>
|
||||||
|
<th>Game {{ forloop.counter }}</th>
|
||||||
|
<td>{{ form.event_id }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<input class="btn btn-sm btn-primary" type="submit" value="Submit">
|
||||||
|
</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/lineup/multiple_choose_2.html
Normal file
45
teamsnap/templates/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.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 %}
|
||||||
37
teamsnap/templates/lineup/multiple_edit.html
Normal file
37
teamsnap/templates/lineup/multiple_edit.html
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{% 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 class="align-top mx-1">
|
||||||
|
{% for event_data in contexts %}
|
||||||
|
<td class="px-1">
|
||||||
|
{% include "lineup/widgets/lineup.html" with event=event_data.event event_id=event_data.event.data.id formset=event_data.formset formset_startinglineup=event_data.formset_startinglineup formset_bench=event_data.formset_bench formset_out=event_data.formset_out formset_startingpositionalonly=event_data.formset_startingpositionalonly %}
|
||||||
|
</td>
|
||||||
|
{% endfor %}
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="{% static 'js/Sortable.js' %}"></script>
|
||||||
|
<script src="{% static 'teamsnap/js/lineup-table.js' %}"></script>
|
||||||
|
{% endblock %}
|
||||||
77
teamsnap/templates/lineup/widgets/lineup.html
Normal file
77
teamsnap/templates/lineup/widgets/lineup.html
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
<div class="card mx-auto benchcoach-lineup" style="max-width: 455px" id="benchcoach-lineup-{{ event_id }}">
|
||||||
|
<form method="post" action="">
|
||||||
|
{{ formset.management_form }}
|
||||||
|
{% csrf_token %}
|
||||||
|
<div class="border-bottom p-2">
|
||||||
|
<h4 class="card-title text-nowrap">{{ event.data.formatted_title }}</h4>
|
||||||
|
<h6 class="text-muted card-subtitle text-nowrap">{{ event.data.start_date|date:"D, F j, Y g:i A" }}</h6>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<button class="btn btn-primary btn-sm py-0 m-1" onclick="importFromClipboard(this)" type="button"><i class="bi bi-arrow-90deg-down"></i></i><i class="bi bi-file-spreadsheet"></i> </button>
|
||||||
|
</div>
|
||||||
|
<div class="col text-end">
|
||||||
|
<button class="btn btn-primary btn-sm py-0 m-1" onclick="copyEmailTable(this, '{{ event.data.start_date|date:"D, F j, Y g:i A" }}, {{ event.data.location_name }}, ({% if event.data.game_type == 'Away' %}@{% endif %}{{ event.data.opponent_name }})', '{% for form in formset %}{{ form.member.data.email_addresses.0 }},{% endfor %}')" type="button"><i class="bi bi-arrow-right"></i><i class="bi bi-envelope"></i></button>
|
||||||
|
<button class="btn btn-primary btn-sm py-0 m-1" onclick="sendToClipboard(this)" type="button"><i class="bi bi-arrow-right"></i><i class="bi bi-file-spreadsheet"></i></button>
|
||||||
|
<button class="btn btn-success btn-sm py-0 m-1" type="submit"><i class="bi bi-arrow-right"></i><i class="bi bi-asterisk"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body p-0 m-0">
|
||||||
|
<div>
|
||||||
|
<div class="row m-0">
|
||||||
|
<div class="col border-bottom bg-light">
|
||||||
|
<i class="bi bi-clipboard-check me-1"></i><span class="text-uppercase fw-bold small">Starting Lineup</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class = "row m-0">
|
||||||
|
<div class="col border-bottom px-0">
|
||||||
|
<div class="row mx-0 my-1 position-status">
|
||||||
|
{% with 'P C 1B 2B 3B SS LF CF RF EH DH' as position_list %}
|
||||||
|
{% for position in position_list.split %}
|
||||||
|
<div class="col fw-bold text-center small">
|
||||||
|
<span class="" id="position-status-{{ position }}">{{ position }}</span>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endwith %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% include 'lineup/widgets/lineup_table.html' with formset=formset_startinglineup table_id="benchcoach-startinglineup" %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div class="row m-0">
|
||||||
|
<div class="col border-bottom bg-light">
|
||||||
|
<i class="bi bi-clipboard-minus me-1"></i><span class="text-uppercase fw-bold small">Starting (Positional Only)</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% include 'lineup/widgets/lineup_table.html' with formset=formset_startingpositionalonly table_id="benchcoach-startingpositionalonly" %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div class="row m-0">
|
||||||
|
<div class="col border-bottom bg-light">
|
||||||
|
<i class="bi bi-clipboard me-1"></i><span class="text-uppercase fw-bold small">Bench</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% include 'lineup/widgets/lineup_table.html' with formset=formset_bench table_id="benchcoach-bench" %}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div class="row m-0">
|
||||||
|
<div class="col border-bottom bg-light">
|
||||||
|
<i class="bi bi-clipboard-x me-1"></i><span class="text-uppercase fw-bold small">Out</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% include 'lineup/widgets/lineup_table.html' with formset=formset_out table_id="benchcoach-out" %}
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
69
teamsnap/templates/lineup/widgets/lineup_table.html
Normal file
69
teamsnap/templates/lineup/widgets/lineup_table.html
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-sm my-0 table-{{ table_id }}" style="min-height: 1rem">
|
||||||
|
<tbody class="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 }}"
|
||||||
|
data-player-name="{{ form.member.data.last_name }}, {{ form.member.data.first_name }}"
|
||||||
|
data-availability-statuscode="{{ form.availability.data.status_code }}"
|
||||||
|
>
|
||||||
|
{{ form.event_lineup_entry_id.as_hidden }}
|
||||||
|
{{ form.event_lineup_id.as_hidden }}
|
||||||
|
{{ form.event_id.as_hidden }}
|
||||||
|
{{ form.member_id.as_hidden }}
|
||||||
|
{{ form.position_only.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-{{ form.member.id }}" class="lineup-sequence-form">
|
||||||
|
{{ form.sequence.as_hidden }}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<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>#}
|
||||||
|
<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">
|
||||||
|
<span class="lineup-label-form">{{ form.label }}</span>
|
||||||
|
</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>
|
||||||
|
</div>
|
||||||
@@ -2,17 +2,30 @@ from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns
|
|||||||
from django.urls import path
|
from django.urls import path
|
||||||
|
|
||||||
from .provider import TeamsnapProvider
|
from .provider import TeamsnapProvider
|
||||||
from .views import PreferencesFormView, schedule_view, view_event
|
from .views import (
|
||||||
|
PreferencesFormView,
|
||||||
|
dashboard,
|
||||||
|
edit_lineup,
|
||||||
|
schedule_view,
|
||||||
|
view_event,
|
||||||
|
)
|
||||||
|
|
||||||
urlpatterns = default_urlpatterns(TeamsnapProvider)
|
urlpatterns = default_urlpatterns(TeamsnapProvider)
|
||||||
|
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
path("preferences/", PreferencesFormView.as_view(), name="preferences"),
|
path("preferences/", PreferencesFormView.as_view(), name="teamsnap_preferences"),
|
||||||
path("<int:team_id>/schedule/", schedule_view, name="teamsnap_schedule"),
|
path("<int:team_id>/schedule/", schedule_view, name="teamsnap_schedule"),
|
||||||
|
path("<int:team_id>/dashboard/", dashboard, name="teamsnap_dashboard"),
|
||||||
|
path("dashboard/", dashboard, name="teamsnap_dashboard"),
|
||||||
path("schedule/", schedule_view, name="teamsnap_schedule"),
|
path("schedule/", schedule_view, name="teamsnap_schedule"),
|
||||||
path(
|
path(
|
||||||
"<int:team_id>/schedule/view_event/<int:event_id>",
|
"<int:team_id>/schedule/view_event/<int:event_id>",
|
||||||
view_event,
|
view_event,
|
||||||
name="teamsnap_view_event",
|
name="teamsnap_view_event",
|
||||||
),
|
),
|
||||||
|
path(
|
||||||
|
"<int:team_id>/schedule/edit_lineup/<int:event_ids>",
|
||||||
|
edit_lineup,
|
||||||
|
name="teamsnap_edit_lineup",
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -196,3 +196,203 @@ def view_event(request, event_id, team_id=None):
|
|||||||
"lineup_entries": ts_lineup_entries,
|
"lineup_entries": ts_lineup_entries,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def edit_lineup(request, event_ids, team_id):
|
||||||
|
import re
|
||||||
|
|
||||||
|
from teamsnap.forms import LineupEntryFormset
|
||||||
|
|
||||||
|
request.user.socialaccount_set.filter(provider="teamsnap").first()
|
||||||
|
current_teamsnap_user = request.user.socialaccount_set.filter(
|
||||||
|
provider="teamsnap"
|
||||||
|
).first()
|
||||||
|
ts_token = (
|
||||||
|
current_teamsnap_user.socialtoken_set.order_by("-expires_at").first().token
|
||||||
|
)
|
||||||
|
|
||||||
|
from pyteamsnap.api import (
|
||||||
|
Availability,
|
||||||
|
AvailabilitySummary,
|
||||||
|
Event,
|
||||||
|
EventLineup,
|
||||||
|
EventLineupEntry,
|
||||||
|
Member,
|
||||||
|
TeamSnap,
|
||||||
|
)
|
||||||
|
|
||||||
|
client = TeamSnap(token=ts_token)
|
||||||
|
|
||||||
|
event_ids = str(event_ids).split(",")
|
||||||
|
|
||||||
|
ts_bulkload = client.bulk_load(
|
||||||
|
team_id=team_id,
|
||||||
|
types=[Event, EventLineup, EventLineupEntry, AvailabilitySummary, Member],
|
||||||
|
event__id=",".join(event_ids),
|
||||||
|
)
|
||||||
|
event_ids = [int(i) for i in event_ids]
|
||||||
|
|
||||||
|
contexts = []
|
||||||
|
for event_id in event_ids:
|
||||||
|
ts_event = [
|
||||||
|
i for i in ts_bulkload if isinstance(i, Event) and i.data["id"] == event_id
|
||||||
|
][0]
|
||||||
|
ts_availabilities = Availability.search(client, event_id=ts_event.data["id"])
|
||||||
|
ts_lineup_entries = EventLineupEntry.search(client, event_id=event_id)
|
||||||
|
|
||||||
|
ts_members = [i for i in ts_bulkload if isinstance(i, Member)]
|
||||||
|
ts_member_lookup = {m.data["id"]: m for m in ts_members}
|
||||||
|
ts_availability_lookup = {m.data["member_id"]: m for m in ts_availabilities}
|
||||||
|
ts_lineup_entries_lookup = {m.data["member_id"]: m for m in ts_lineup_entries}
|
||||||
|
|
||||||
|
members = []
|
||||||
|
|
||||||
|
for member in ts_members:
|
||||||
|
members.append(
|
||||||
|
{
|
||||||
|
"member": getattr(member, "data"),
|
||||||
|
"availability": getattr(
|
||||||
|
ts_availability_lookup.get(member.data["id"], {}), "data", {}
|
||||||
|
),
|
||||||
|
"lineup_entry": getattr(
|
||||||
|
ts_lineup_entries_lookup.get(member.data["id"], {}), "data", {}
|
||||||
|
),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
members = sorted(
|
||||||
|
members,
|
||||||
|
key=lambda d: (
|
||||||
|
{None: 3, 0: 2, 2: 1, 1: 0}.get( # No Response # No # Maybe # Yes
|
||||||
|
d["availability"].get("status_code")
|
||||||
|
),
|
||||||
|
d["member"].get("last_name"),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
initial = []
|
||||||
|
for member in members:
|
||||||
|
if not member["member"]["is_non_player"]:
|
||||||
|
if re.search(
|
||||||
|
r"([A-Z0-9]+)(?:\s+\[(.*)\])?",
|
||||||
|
member["lineup_entry"].get("label", ""),
|
||||||
|
):
|
||||||
|
position, position_note = re.search(
|
||||||
|
r"([A-Z0-9]+)(?:\s+\[(.*)\])?",
|
||||||
|
member["lineup_entry"].get("label", ""),
|
||||||
|
).groups()
|
||||||
|
else:
|
||||||
|
position, position_note = ("", "")
|
||||||
|
position_only = position_note == "PO"
|
||||||
|
initial.append(
|
||||||
|
{
|
||||||
|
"event_lineup_entry_id": member["lineup_entry"].get("id"),
|
||||||
|
"event_lineup_id": member["lineup_entry"].get(
|
||||||
|
"event_lineup_id"
|
||||||
|
),
|
||||||
|
"event_id": event_id,
|
||||||
|
"position_only": position_only,
|
||||||
|
"member_id": member["member"]["id"],
|
||||||
|
"sequence": member["lineup_entry"].get("sequence"),
|
||||||
|
"label": position,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
formset = LineupEntryFormset(initial=initial)
|
||||||
|
|
||||||
|
for form in formset:
|
||||||
|
form.member = ts_member_lookup.get(form["member_id"].initial)
|
||||||
|
form.availability = ts_availability_lookup.get(form["member_id"].initial)
|
||||||
|
|
||||||
|
formset_startinglineup = [
|
||||||
|
form
|
||||||
|
for form in formset
|
||||||
|
if form.initial.get("event_lineup_entry_id")
|
||||||
|
and not form.initial.get("position_only")
|
||||||
|
]
|
||||||
|
formset_startinglineup = sorted(
|
||||||
|
formset_startinglineup, key=lambda d: d.initial.get("sequence", 100)
|
||||||
|
)
|
||||||
|
formset_startingpositiononly = [
|
||||||
|
form
|
||||||
|
for form in formset
|
||||||
|
if form.initial.get("event_lineup_entry_id")
|
||||||
|
and form not in formset_startinglineup
|
||||||
|
]
|
||||||
|
formset_startingpositiononly = sorted(
|
||||||
|
formset_startingpositiononly, key=lambda d: d.initial.get("sequence", 100)
|
||||||
|
)
|
||||||
|
formset_bench = [
|
||||||
|
form
|
||||||
|
for form in formset
|
||||||
|
if form not in formset_startinglineup
|
||||||
|
and form not in formset_startingpositiononly
|
||||||
|
and form.availability.data["status_code"] in [2, 1]
|
||||||
|
]
|
||||||
|
formset_out = [
|
||||||
|
form
|
||||||
|
for form in formset
|
||||||
|
if form not in formset_startinglineup
|
||||||
|
and form not in formset_bench
|
||||||
|
and form not in formset_startingpositiononly
|
||||||
|
and not form.member.data["is_non_player"]
|
||||||
|
]
|
||||||
|
|
||||||
|
contexts.append(
|
||||||
|
{
|
||||||
|
"event": ts_event,
|
||||||
|
"formset": formset,
|
||||||
|
"formset_bench": formset_bench,
|
||||||
|
"formset_startinglineup": formset_startinglineup,
|
||||||
|
"formset_startingpositionalonly": formset_startingpositiononly,
|
||||||
|
"formset_out": formset_out,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
return render(
|
||||||
|
request, "lineup/multiple_edit.html", context={"contexts": contexts}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def dashboard(request, team_id=None):
|
||||||
|
if not team_id:
|
||||||
|
return redirect(
|
||||||
|
"teamsnap_dashboard", team_id=request.user.preferences.managed_team_id
|
||||||
|
)
|
||||||
|
request.user.socialaccount_set.filter(provider="teamsnap").first()
|
||||||
|
current_teamsnap_user = request.user.socialaccount_set.filter(
|
||||||
|
provider="teamsnap"
|
||||||
|
).first()
|
||||||
|
|
||||||
|
ts_token = (
|
||||||
|
current_teamsnap_user.socialtoken_set.order_by("-expires_at").first().token
|
||||||
|
)
|
||||||
|
from pyteamsnap.api import AvailabilitySummary, Event, TeamSnap
|
||||||
|
|
||||||
|
client = TeamSnap(token=ts_token)
|
||||||
|
ts_events = Event.search(client, team_id=team_id)
|
||||||
|
ts_availability_summaries_d = {
|
||||||
|
a.data["id"]: a for a in AvailabilitySummary.search(client, team_id=team_id)
|
||||||
|
}
|
||||||
|
ts_events_future = [
|
||||||
|
e
|
||||||
|
for e in ts_events
|
||||||
|
if e.data["start_date"] > datetime.datetime.now(datetime.timezone.utc)
|
||||||
|
]
|
||||||
|
ts_events_past = [
|
||||||
|
e
|
||||||
|
for e in reversed(ts_events)
|
||||||
|
if e.data["start_date"] < datetime.datetime.now(datetime.timezone.utc)
|
||||||
|
]
|
||||||
|
|
||||||
|
return render(
|
||||||
|
request,
|
||||||
|
"dashboard.html",
|
||||||
|
{
|
||||||
|
"ts_events_future": ts_events_future,
|
||||||
|
"ts_events_past": ts_events_past,
|
||||||
|
"events_availabilities": [
|
||||||
|
(e, ts_availability_summaries_d[e.data["id"]]) for e in ts_events_future
|
||||||
|
],
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user