File tree Expand file tree Collapse file tree 2 files changed +40
-2
lines changed
public/components/tournament/list Expand file tree Collapse file tree 2 files changed +40
-2
lines changed Original file line number Diff line number Diff line change 3434 "pg" : " 4.5.6"
3535 },
3636 "engines" : {
37- "node" : " ^5.10.1 "
37+ "node" : " 6.11.0 "
3838 },
3939 "repository" : {
4040 "type" : " git" ,
Original file line number Diff line number Diff line change 1-
1+ <h2>Tournaments</h2>
2+ <tournament-model get-list="{}">
3+ {{#if isPending}}
4+ <div class='info'>Loading</div>
5+ {{/if}}
6+ {{#each value}}
7+ <h3><a href='{{routeUrl ( tournamentId=id )}}'>{{year}}</a>
8+ {{#if isAdmin}}
9+ <button type="button" class="btn btn-danger"
10+ on:click="deleteTournament(.)"
11+ {{#isDestroying}}disabled{{/isDestroying}}>
12+ <span class='glyphicon glyphicon-remove'/>
13+ </button>
14+ {{/if}}
15+ </h3>
16+ {{else}}
17+ <div class="text-center lead">No Tournaments</div>
18+ {{/each}}
19+ </tournament-model>
20+ {{#if isAdmin}}
21+ <h2>New Tournament</h2>
22+ <form on:submit="createTournament(%event)" action="">
23+ <div class="form-group">
24+ <label for="tournament-date">Date</label>
25+ <input
26+ type="date"
27+ class="form-control"
28+ id="tournament-date"
29+ placeholder="date"
30+ value:bind="tournament.date"/>
31+ </div>
32+ <button type="submit" class="create-btn btn btn-default" {{#if savePromise.isPending}}disabled{{/if}}>Create</button>
33+ {{#if savePromise.isRejected}}
34+ {{#each savePromise.reason.responseJSON}}
35+ <p class="text-danger">{{.}}</p>
36+ {{/each}}
37+ {{/if}}
38+ </form>
39+ {{/if}}
You can’t perform that action at this time.
0 commit comments