change todays-game to defense card
This commit is contained in:
@@ -2,62 +2,18 @@
|
||||
|
||||
<body class="B5">
|
||||
<div class="sheet eventsheet" id="page-1">
|
||||
<section id="todays-game">
|
||||
<section id="defense-card">
|
||||
<header>
|
||||
<div class="event-title float-left">
|
||||
{{event.formattedTitle}} – {{dateFormat event.startDate "ddd, MMM D h:mm A" }}
|
||||
</div>
|
||||
<div class="homeaway float-right">
|
||||
{{event.game_type}}
|
||||
{{event.gameType}}
|
||||
</div>
|
||||
</header>
|
||||
<div class="grid-container">
|
||||
<div id="offense-pane">
|
||||
<table id="starting-lineup-offense">
|
||||
<tbody>
|
||||
<div class="slot-set">
|
||||
{{!-- <% offensive_lineup_entries = by_member.select{|m,d| d[:event_lineup_entry] and d[:event_lineup_entry].label.exclude?("[PO]")}.sort_by{|m,d| d[:event_lineup_entry].sequence}.each_with_index do |(member, d), i| if i < 11%> --}}
|
||||
{{#offenseLineup 11}}
|
||||
<tr class="slot">
|
||||
<th class="sequence counter" rowspan="2"></th>
|
||||
<td class="player-name">{{this.member.lastName}}</td>
|
||||
<td class="jersey-number">{{this.member.jerseyNumber}}</td>
|
||||
<td class="position">{{positionLabelWithoutFlags this.label}}</td>
|
||||
</tr>
|
||||
<tr class="slot substitute">
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
{{/offenseLineup}}
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<div id="defense-pane">
|
||||
<div class="field-container">
|
||||
<img src="/media/baseball-diamond.svg" />
|
||||
{{#defenseLineup}}
|
||||
{{!-- <% for pos in ["CF", "LF", "RF", "SS", "2B", "3B", "1B", "C"] do (member, d) = by_member.find{|m,d| d[:event_lineup_entry] and d[:event_lineup_entry].label == pos}%> --}}
|
||||
<div class="slot-set pos-{{this.position}}">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr class="slot">
|
||||
<th class="position"></th>
|
||||
<td class="player-name">{{this.member.lastName}}</td>
|
||||
</tr>
|
||||
<tr class="slot substitute">
|
||||
<th class="position"></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="slot substitute">
|
||||
<th class="position"></th><td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{/defenseLineup}}
|
||||
</div>
|
||||
{{> defense_pane event_lineup_entries=event_lineup_entries members=members}}
|
||||
</div>
|
||||
<div class="footer">
|
||||
<table class="notes">
|
||||
@@ -65,102 +21,25 @@
|
||||
<tr>
|
||||
<th>Notes</th>
|
||||
</tr>
|
||||
{{#repeat 3}}
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
{{/repeat}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="roster-and-history">
|
||||
<div>
|
||||
<table>
|
||||
<colgroup><col span="3" class="player"></colgroup>
|
||||
{{!-- <colgroup><col span="0" class="player-stats"></colgroup> --}}
|
||||
<colgroup><col span="4" class="position-capability"></colgroup>
|
||||
<colgroup><col span="4" class="availability-on-day future"></colgroup>
|
||||
<colgroup><col span="4" class="availability-on-day past"></colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3" id="today-availability">
|
||||
Available ({{availabilitySummary.playerGoingCount}}|{{availabilitySummary.playerMaybeCount}})
|
||||
</th>
|
||||
<th class="player-stats">
|
||||
<span class="decimal-point">.</span>AVG
|
||||
<span class="delimiter">/</span>
|
||||
<span class="decimal-point">.</span>OBP
|
||||
<span class="delimiter">/</span>
|
||||
<span class="decimal-point">.</span>SLG
|
||||
<span class="delimiter">:</span>PA
|
||||
</th>
|
||||
<th class="position-capability pitcher">P</th>
|
||||
<th class="position-capability catcher">C</th>
|
||||
<th class="position-capability infield">I</th>
|
||||
<th class="position-capability outfield">O</th>
|
||||
{{!-- <% for timepoint, i in timeline.select{|tp| tp[:comparison_to_selected]>0}.sort{|tp| -tp[:comparison_to_selected]}.each_with_index do%> --}}
|
||||
|
||||
{{#loopEvents upcoming_events}}
|
||||
<th class="availability-on-day avail-today-plus-{{@index}}" date="{{this.startDate}}"><div>{{dateFormat this.startDate "ddd" }}</div></th>
|
||||
{{/loopEvents}}
|
||||
{{#loopEvents recent_events}}
|
||||
<th class="availability-on-day avail-today-minus-{{@index}}" date="{{this.startDate}}"><div>{{dateFormat this.startDate "ddd" }}</div></th>
|
||||
{{/loopEvents}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{!-- <% by_member.select{|m,d| !m.is_non_player}.each_with_index do |(member, d), i|%> --}}
|
||||
{{#rosterHistory}}
|
||||
<tr id="roster-history-slot-<%= ::Temple::Utils.escape_html((i)) %>">
|
||||
<td class="is-present-checkbox available-status-code-{{this.benchcoach.availability.statusCode}}">
|
||||
<span>■</span>
|
||||
</td>
|
||||
<td class="jersey-number available-status-code-{{this.benchcoach.availability.statusCode}}{{#if (isStarting this)}} starting{{/if}}">
|
||||
{{this.jerseyNumber}}
|
||||
</td>
|
||||
<td class="player-name available-status-code-{{this.benchcoach.availability.statusCode}}{{#if (isStarting this)}} starting{{/if}}">
|
||||
{{this.lastName}}
|
||||
</td>
|
||||
<td class="player-stats border-left border-right">
|
||||
<span class="decimal-point">.</span>
|
||||
<span class="avg">000</span>
|
||||
<span class="delimiter">/</span>
|
||||
<span class="decimal-point">.</span>
|
||||
<span class="obp">000</span>
|
||||
<span class="delimiter">/</span>
|
||||
<span class="decimal-point">.</span>
|
||||
<span class="slg">000</span>
|
||||
<span class="delimiter">:</span>
|
||||
<span class="pa">00</span>
|
||||
</td>
|
||||
<td class="position-capability pitcher">{{positionCapabilityFor this "P"}}</td>
|
||||
<td class="position-capability catcher">{{positionCapabilityFor this "C"}}</td>
|
||||
<td class="position-capability infield">{{positionCapabilityFor this "IF"}}</td>
|
||||
<td class="position-capability outfield">{{positionCapabilityFor this "OF"}}</td>
|
||||
{{#loopEvents ../upcoming_events}}
|
||||
{{#timepointForMember ../this ../../timeline this}}
|
||||
<td class="availability-on-day future available-status-code-{{this.availability.statusCode}}">
|
||||
{{this.value}}
|
||||
</td>
|
||||
{{/timepointForMember}}
|
||||
{{/loopEvents}}
|
||||
{{#loopEvents ../recent_events}}
|
||||
{{#timepointForMember ../this ../../timeline this}}
|
||||
<td class="availability-on-day past available-status-code-{{this.availability.statusCode}}">
|
||||
{{this.value}}
|
||||
</td>
|
||||
{{/timepointForMember}}
|
||||
{{/loopEvents}}
|
||||
</tr>
|
||||
{{/rosterHistory}}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="roster-and-history">
|
||||
{{> roster_and_history
|
||||
event=event
|
||||
event_lineup_entries=event_lineup_entries
|
||||
members=members availabilities=availabilities
|
||||
recent_events=recent_events
|
||||
upcoming_events=upcoming_events
|
||||
}}
|
||||
</div>
|
||||
</section>
|
||||
<section class="lineup-card" id="lineup-card-dugout">
|
||||
@@ -177,7 +56,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#offenseLineup 11}}
|
||||
{{#offenseLineup 11 event_lineup_entries members}}
|
||||
<tr class="slot">
|
||||
<th class="sequence{{#if this.member.lastName}} counter{{/if}}"></th>
|
||||
<td class="player-name">{{this.member.lastName}}</td>
|
||||
@@ -185,8 +64,8 @@
|
||||
<td class="position">{{this.label}}</td>
|
||||
<td class="substitution"></td>
|
||||
</tr>
|
||||
{{/offenseLineup}}
|
||||
{{#defenseLineup}}
|
||||
{{/offenseLineup }}
|
||||
{{#defenseLineup event_lineup_entries members}}
|
||||
<tr class="slot">
|
||||
{{#if (isInPositionOnly this.member)}}{{#if (comparePositionWithFlags "P" this.eventLineupEntry)}}
|
||||
<th class="sequence">PO</th>
|
||||
@@ -215,7 +94,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#offenseLineup 11}}
|
||||
{{#offenseLineup 11 event_lineup_entries members}}
|
||||
<tr class="slot">
|
||||
<th class="sequence {{#if this.member.lastName}}counter{{/if}}"></th>
|
||||
<td class="player-name">{{this.member.lastName}}</td>
|
||||
@@ -224,7 +103,7 @@
|
||||
<td class="substitution"></td>
|
||||
</tr>
|
||||
{{/offenseLineup}}
|
||||
{{#defenseLineup}}
|
||||
{{#defenseLineup event_lineup_entries members}}
|
||||
<tr class="slot">
|
||||
{{#if (isInPositionOnly this.member)}}{{#if (comparePositionWithFlags "P" this.eventLineupEntry)}}
|
||||
<th class="sequence">PO</th>
|
||||
@@ -241,7 +120,10 @@
|
||||
</section>
|
||||
</div>
|
||||
<div class="sheet eventsheet" id="page-2">
|
||||
<section id="back-cover" style="border:solid black;">
|
||||
<section id="defense-card" style="border:solid black;">
|
||||
<div id="defense-pane">
|
||||
{{> defense_pane}}
|
||||
</div>
|
||||
</section>
|
||||
<section id="front-cover">
|
||||
<header>
|
||||
@@ -276,8 +158,28 @@
|
||||
<div>
|
||||
<span class="name">{{event.opponentName}}</span>
|
||||
</div>
|
||||
<img src="{{opponent_logo.mediumUrl}}">
|
||||
{{!-- <%= ::Temple::Utils.escape_html((image_tag opponent_logos[event.opponent.id].medium_url)) %> --}}
|
||||
</div>
|
||||
<div class="">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Final Score</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{team.name}}</th>
|
||||
<th>{{event.opponentName}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:5em;"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user