Display challenge date in header instead of clock if team 0

This commit is contained in:
nemunaire 2016-02-01 17:13:58 +01:00 committed by Pierre-Olivier Mercier
parent 6133498165
commit 09e726564f
5 changed files with 11 additions and 3 deletions

View File

@ -42,13 +42,16 @@
<img src="/img/epita.png" alt="Epita" class="center-block">
</a>
</div>
<div id="clock" class="col-sm-7" ng-class="{expired: time.expired, end: time.end}">
<div id="clock" class="col-sm-7" ng-class="{expired: time.expired, end: time.end}" ng-show="time.start || my.team_id">
<span id="hours">{{ time.hours | time }}</span>
<span class="point">:</span>
<span id="min">{{ time.minutes | time }}</span>
<span class="point">:</span>
<span id="sec">{{ time.seconds | time }}</span>
</div>
<div id="clock" class="col-sm-7" ng-show="!(!time.start || my.team_id)">
{{ time.start | date:"shortDate" }}
</div>
</div>
</div>
</div>

View File

@ -55,6 +55,7 @@ angular.module("FICApp", ["ngRoute", "ngSanitize"])
$rootScope.time.end = false;
$rootScope.time.expired = false;
}
$rootScope.time.start = time.st * 1000;
$rootScope.time.duration = time.du;
$rootScope.time.remaining = remain;
$rootScope.time.hours = Math.floor(remain / 3600);

View File

@ -75,6 +75,7 @@ angular.module("FICApp")
$scope.time.end = false;
$scope.time.expired = false;
}
$scope.time.start = time.st * 1000;
$scope.time.duration = time.du;
$scope.time.remaining = remain;
$scope.time.hours = Math.floor(remain / 3600);

View File

@ -42,13 +42,16 @@
<img src="/img/epita.png" alt="Epita" class="center-block">
</a>
</div>
<div id="clock" class="col-sm-8" ng-class="{expired: time.expired, end: time.end}">
<div id="clock" class="col-sm-7" ng-class="{expired: time.expired, end: time.end}" ng-show="time.hours === 0 || time.hours">
<span id="hours">{{ time.hours | time }}</span>
<span class="point">:</span>
<span id="min">{{ time.minutes | time }}</span>
<span class="point">:</span>
<span id="sec">{{ time.seconds | time }}</span>
</div>
<div id="clock" class="col-sm-7" ng-show="!(time.hours === 0 || time.hours)">
{{ time.start | date:"shortDate" }}
</div>
</div>
</div>
</div>

View File

@ -11,7 +11,7 @@
<hr ng-show="!(my.exercices[current_exercice].hint)">
<ul>
<li><strong>Gain :</strong> {{ themes[current_theme].exercices[current_exercice].gain }} points</li>
<li><strong>Résolu par :</strong> {{ themes[current_theme].exercices[current_exercice].solved }} équipes jusqu'à présent</li>
<li><strong>Résolu par :</strong> {{ themes[current_theme].exercices[current_exercice].solved }} équipes</li>
</ul>
</div>