calendarMatch.php 3.61 KB
<div class="ls-match-strip unselectable" ng-click="onClick()" ng-class="::match.statusType">
	<span class="status" ng-switch on="::match.statusType">
		<span ng-switch-when="notstarted" ng-bind="::match.time"></span>

		<span ng-switch-when="inprogress">
			<span ng-if="::match.timerStart" ng-bind="::match.minute"></span>
			<span ng-if="::!match.timerStart" ng-bind="::match.status"></span>
		</span>

		<span ng-switch-when="finished" ng-bind="::match.status"></span>

		<span ng-switch-when="cancelled">Canceled</span>
		<span ng-switch-when="interrupted">Abandoned</span>
	</span>
	
	<span class="home-team">
		<span ng-bind="::match.homeTeam.name" ng-class="::{winner: match.homeAggrWin}"></span><span ng-if="::match.homeAggrWin" class="winner-star">*</span>
		<span ng-if="::match.homeRedCards > 0" class="red-card" ng-bind="::match.homeRedCards"></span>
	</span>
	
	<span class="score" ng-switch on="::match.statusType" 
		ng-class="::{'with-pens': match.homeScorePEN || match.awayScorePEN || match.status === 'Pen' || match.status === 'APEN'}">

		<span ng-switch-when="notstarted">vs</span>
		<span ng-switch-default>
			<div class="normal-score">
				<span ng-bind="::match.homeScore"></span> : <span ng-bind="::match.awayScore"></span>
			</div>
			<div ng-if="::(match.homeScorePEN || match.awayScorePEN || match.status === 'Pen' || match.status === 'APEN')" class="penalty-score">
				<span ng-bind="::match.homeScorePEN || 0"></span> <span class="icon-penalty"></span> <span ng-bind="::match.awayScorePEN || 0"></span>
			</div>
		</span>

	</span>

	<span class="away-team">
		<span ng-if="::match.awayAggrWin" class="winner-star">*</span><span ng-bind="::match.awayTeam.name" ng-class="::{winner: match.awayAggrWin}"></span>
		<span ng-if="::match.awayRedCards > 0" class="red-card" ng-bind="::match.awayRedCards"></span>
	</span>
	<span class="icons">
		<span class="group hinted" ng-if="::stagesById[match.stageId].type == 'group'">
			<span ng-bind="::stagesById[match.stageId].groupName"></span>
			<span class="hint-top" data-hint="Group {{ ::stagesById[match.stageId].groupName }}"></span>
		</span>
		<a ng-href="/matches/{{ match.matchId }}/-/review" target="_blank" class="icn-play" ng-if="::match.hasMedia || match.posts.review.status == 'publish'" stop-event='click'></a>
		<a ng-href="/matches/{{ match.matchId }}/-/preview" target="_blank" class="icn-file" ng-if="::match.posts.preview.status == 'publish'" stop-event='click'></a>
	</span>
</div>

<div class="ls-match-extra" ng-if="opened">

	<div class="ls-incidents-list">
		<div ng-repeat="incident in ::match.incidents" class="ls-incident">
			<div class="home">
				<span ng-if="::incident.side == 'home'">
					<span ng-bind="::incident.player.name"></span>
					<span ng-class="::['icon-' + incident.code.id, 'hinted']">
						<span class="hint-top" data-hint="{{ ::incidentIdToName(incident.code.id) }}"></span>
					</span>
				</span>
			</div>
			<div class="time" ng-bind="::incident.elapsed"></div>
			<div class="away">
				<span ng-if="::incident.side == 'away'">
					<span ng-bind="::incident.player.name"></span>
					<span ng-class="::['icon-' + incident.code.id, 'hinted']">
						<span class="hint-top" data-hint="{{ ::incidentIdToName(incident.code.id) }}"></span>
					</span>
				</span>
			</div>
		</div>
	</div>

	<div class="ls-match-footer">
		<a class="btn btn-primary" ng-href="/matches/{{ match.matchId }}/-/review" target="_blank"><span class="icn-play"></span> Match Center</a>
		<a class="btn btn-primary" ng-href="/matches/{{ match.matchId }}/-/preview" target="_blank" ng-if="::match.posts.preview.status == 'publish'"><span class="icn-file"></span> Preview</a>
	</div>
</div>