1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01: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> <FileVersion>1</FileVersion>
<AutoEnableOnStartup>True</AutoEnableOnStartup> <AutoEnableOnStartup>True</AutoEnableOnStartup>
<AllowParallelTestExecution>true</AllowParallelTestExecution> <AllowParallelTestExecution>true</AllowParallelTestExecution>
<AllowTestsToRunInParallelWithThemselves>true</AllowTestsToRunInParallelWithThemselves>
<FrameworkUtilisationTypeForNUnit>UseDynamicAnalysis</FrameworkUtilisationTypeForNUnit> <FrameworkUtilisationTypeForNUnit>UseDynamicAnalysis</FrameworkUtilisationTypeForNUnit>
<FrameworkUtilisationTypeForGallio>Disabled</FrameworkUtilisationTypeForGallio> <FrameworkUtilisationTypeForGallio>Disabled</FrameworkUtilisationTypeForGallio>
<FrameworkUtilisationTypeForMSpec>Disabled</FrameworkUtilisationTypeForMSpec> <FrameworkUtilisationTypeForMSpec>Disabled</FrameworkUtilisationTypeForMSpec>

View File

@ -3,9 +3,9 @@
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
{{#if episodeTitle}} {{#if episodeTitle}}
<h3>{{episodeTitle}} - {{seasonNumber}}x{{paddedEpisodeNumber}}</h3> <h3>{{episodeTitle}} - {{episodeNumberHelper}}</h3>
{{else}} {{else}}
<h3>{{title}} - {{seasonNumber}}x{{paddedEpisodeNumber}}</h3> <h3>{{title}} - {{episodeNumberHelper}}</h3>
{{/if}} {{/if}}
</div> </div>
<div class="modal-body"> <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/DateTime',
'Handlebars/Helpers/Html', 'Handlebars/Helpers/Html',
'Handlebars/Helpers/Numbers', 'Handlebars/Helpers/Numbers',
'Handlebars/Helpers/EpisodeNumber',
'Handlebars/Debug' 'Handlebars/Debug'
], function (Templates) { ], function (Templates) {
return function () { return function () {