1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00

Episode Details episode number is templated

This commit is contained in:
Mark McDowall 2013-07-09 19:57:21 -07:00
parent e62274bc54
commit 1905b66a66
4 changed files with 21 additions and 3 deletions

View File

@ -2,7 +2,6 @@
<FileVersion>1</FileVersion>
<AutoEnableOnStartup>True</AutoEnableOnStartup>
<AllowParallelTestExecution>true</AllowParallelTestExecution>
<AllowTestsToRunInParallelWithThemselves>true</AllowTestsToRunInParallelWithThemselves>
<FrameworkUtilisationTypeForNUnit>UseDynamicAnalysis</FrameworkUtilisationTypeForNUnit>
<FrameworkUtilisationTypeForGallio>Disabled</FrameworkUtilisationTypeForGallio>
<FrameworkUtilisationTypeForMSpec>Disabled</FrameworkUtilisationTypeForMSpec>

View File

@ -3,9 +3,9 @@
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
{{#if episodeTitle}}
<h3>{{episodeTitle}} - {{seasonNumber}}x{{paddedEpisodeNumber}}</h3>
<h3>{{episodeTitle}} - {{episodeNumberHelper}}</h3>
{{else}}
<h3>{{title}} - {{seasonNumber}}x{{paddedEpisodeNumber}}</h3>
<h3>{{title}} - {{episodeNumberHelper}}</h3>
{{/if}}
</div>
<div class="modal-body">

View File

@ -0,0 +1,18 @@
'use strict';
define(
[
'handlebars',
'Shared/FormatHelpers'
], function (Handlebars, FormatHelpers) {
Handlebars.registerHelper('episodeNumberHelper', function () {
if (this.series.seriesType === 'daily') {
return FormatHelpers.DateHelper(this.airDate);
}
else {
return '{0}x{1}'.format(this.seasonNumber, this.paddedEpisodeNumber);
}
});
});

View File

@ -6,6 +6,7 @@ define(
'Handlebars/Helpers/DateTime',
'Handlebars/Helpers/Html',
'Handlebars/Helpers/Numbers',
'Handlebars/Helpers/EpisodeNumber',
'Handlebars/Debug'
], function (Templates) {
return function () {