2023-03-04
This commit is contained in:
14
src/views/opponent/list.hbs
Normal file
14
src/views/opponent/list.hbs
Normal file
@@ -0,0 +1,14 @@
|
||||
<h1>
|
||||
{{title}}
|
||||
</h1>
|
||||
<div class="Panel">
|
||||
<div class="Panel-body">
|
||||
{{#each opponents}}
|
||||
<div class="Panel-row Panel-row--withCells u-textDecorationNone">
|
||||
<a class="Panel-cell" href="opponent/{{this.id}}">
|
||||
{{this.name}}
|
||||
</a>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
79
src/views/opponent/show.hbs
Normal file
79
src/views/opponent/show.hbs
Normal file
@@ -0,0 +1,79 @@
|
||||
<div class="Panel">
|
||||
<div class="Panel-header">
|
||||
<div class="Panel-title">
|
||||
{{opponent.name}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="Panel-body">
|
||||
<div class="Panel-row Panel-row--withCells">
|
||||
<div class="Panel-cell Panel-cell--header">
|
||||
ID
|
||||
</div>
|
||||
<div class="Panel-cell">
|
||||
{{opponent.id}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="Panel-row Panel-row--withCells">
|
||||
<div class="Panel-cell Panel-cell--header">
|
||||
Contact Name
|
||||
</div>
|
||||
<div class="Panel-cell">
|
||||
{{opponent.contactsName}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="Panel-row Panel-row--withCells">
|
||||
<div class="Panel-cell Panel-cell--header">
|
||||
Contact Phone
|
||||
</div>
|
||||
<div class="Panel-cell">
|
||||
{{opponent.contactsPhone}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="Panel-row Panel-row--withCells">
|
||||
<div class="Panel-cell Panel-cell--header">
|
||||
Contact Email
|
||||
</div>
|
||||
<div class="Panel-cell">
|
||||
{{opponent.contactsEmail}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="Panel-row Panel-row--withCells">
|
||||
<div class="Panel-cell Panel-cell--header">
|
||||
Logo
|
||||
</div>
|
||||
<div class="Panel-cell">
|
||||
{{#if opponent_logo}}
|
||||
<img src="{{opponent_logo.mediumUrl}}" width="64" height="64" />
|
||||
{{else}}
|
||||
<form name="upload-opponent-logo" action="{{opponent.id}}/upload_logo" method="post" enctype="multipart/form-data" hidden>
|
||||
{{!-- THIS DOESN'T WORK XHR2 ERRORS (FORMDATA) --}}
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="csrfToken" value="{{csrfToken}}">
|
||||
<input type="hidden" name="teamMediaGroupId" value="{{team_media_group.id}}">
|
||||
<input type="hidden" name="memberId" value="{{member.id}}">
|
||||
<input type="hidden" name="teamId" value="{{team.id}}">
|
||||
<input type="hidden" name="description" value="team-logo-{{opponent.id}}.png">
|
||||
<div class="FieldGroup">
|
||||
<label for='file' class="FieldGroup-label">Select files</label>
|
||||
<input id='file' name='file' type="file">
|
||||
<button class="submit-btn Button" type="submit">Upload</button>
|
||||
</div>
|
||||
</form>
|
||||
<div
|
||||
class="Button"
|
||||
onclick="navigator.clipboard.writeText('opponent-logo-{{
|
||||
opponent.id
|
||||
}}.png');window.open('https://go.teamsnap.com/{{team.id}}/files/list/{{team_media_group.id}}');"
|
||||
>
|
||||
<img class="Icon" src="/bootstrap-icons/clipboard.svg" />
|
||||
<span>
|
||||
Copy Filename and Go to Teamsnap
|
||||
</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/js/teamsnap.min.js"></script>
|
||||
<script src="/js/opponent.js"></script>
|
||||
Reference in New Issue
Block a user