add base path setting
This commit is contained in:
1 parent
5368d6f32d
commit
a7f440c658
7 files changed
+29
-21
No files matched your search
+5
-5
@@ -1,6 +1,6 @@
|
||||
<%- include('head') %>
|
||||
<h1><%= lg.name %> – Session <%= gs.number %> (<%= gs.date %>)</h1>
|
||||
<p><a href="/league/<%= lg.id %>">← Standings</a></p>
|
||||
<p><a href="<%= base %>/league/<%= lg.id %>">← Standings</a></p>
|
||||
<% rounds.forEach(r => { %><h2>Round <%= r.round %></h2><table>
|
||||
<% r.matches.forEach(m => { %><tr>
|
||||
<td><%= m.p1 %> <small>(<%= m.p1_deck || '?' %>)</small></td>
|
||||
@@ -9,7 +9,7 @@
|
||||
<% }) %></table><% }) %>
|
||||
<% if (!rounds.length && !results.length) { %><p>No results yet.</p><% } %>
|
||||
<% if (results.length) { %><h2>Standings <small>(imported)</small></h2>
|
||||
<form method="post" action="/admin/session/<%= gs.id %>/decks">
|
||||
<form method="post" action="<%= base %>/admin/session/<%= gs.id %>/decks">
|
||||
<table><tr><th>Player</th><th>Points</th><th>W-D-L</th><th>Deck</th></tr>
|
||||
<% results.forEach(r => { %><tr><td><%= r.name %></td><td><b><%= r.points %></b></td><td><%= r.rec %></td>
|
||||
<td><% if (admin) { %><input name="deck_<%= r.id %>" value="<%= r.deck || '' %>" list="decks"><% } else { %><%= r.deck || '' %><% } %></td></tr><% }) %></table>
|
||||
@@ -19,13 +19,13 @@
|
||||
<% if (admin) { %>
|
||||
<h2>Import Melee standings export</h2>
|
||||
<p>Upload the CSV/JSON from Melee's Standings tab (or paste it). Saving replaces this session's imported standings but keeps decks already entered.</p>
|
||||
<form method="post" enctype="multipart/form-data" action="/admin/session/<%= gs.id %>/import-standings">
|
||||
<form method="post" enctype="multipart/form-data" action="<%= base %>/admin/session/<%= gs.id %>/import-standings">
|
||||
<input type="file" name="file" accept=".csv,.json,.txt"><br>
|
||||
<textarea name="data" rows="5" style="width:100%;font-family:monospace" placeholder="...or paste here"></textarea><br><button>Import standings</button></form>
|
||||
<h2>Import matches by hand</h2>
|
||||
<p>One match per line: <code>round, player1, deck1, player2, deck2, p1 wins, p2 wins, draws</code>. Leave player 2 blank for a bye.
|
||||
Comma- or tab-separated. Saving <b>replaces</b> this session's matches.</p>
|
||||
<form method="post" action="/admin/session/<%= gs.id %>/import">
|
||||
<form method="post" action="<%= base %>/admin/session/<%= gs.id %>/import">
|
||||
<textarea name="data" rows="12" style="width:100%;font-family:monospace"><%= csvtext %></textarea><br><button>Save matches</button></form>
|
||||
<form method="post" action="/admin/session/<%= gs.id %>/delete" data-confirm="Delete this session and its results?"><button>Delete session</button></form>
|
||||
<form method="post" action="<%= base %>/admin/session/<%= gs.id %>/delete" data-confirm="Delete this session and its results?"><button>Delete session</button></form>
|
||||
<% } %>
|
||||
Reference in new issue
Block a user