mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Episode Details episode number is templated
This commit is contained in:
parent
e62274bc54
commit
1905b66a66
@ -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>
|
||||
|
@ -3,9 +3,9 @@
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</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">
|
||||
|
18
UI/Handlebars/Helpers/EpisodeNumber.js
Normal file
18
UI/Handlebars/Helpers/EpisodeNumber.js
Normal 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);
|
||||
}
|
||||
|
||||
});
|
||||
});
|
@ -6,6 +6,7 @@ define(
|
||||
'Handlebars/Helpers/DateTime',
|
||||
'Handlebars/Helpers/Html',
|
||||
'Handlebars/Helpers/Numbers',
|
||||
'Handlebars/Helpers/EpisodeNumber',
|
||||
'Handlebars/Debug'
|
||||
], function (Templates) {
|
||||
return function () {
|
||||
|
Loading…
Reference in New Issue
Block a user