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:
parent
e62274bc54
commit
1905b66a66
@ -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>
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</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">
|
||||||
|
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/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 () {
|
||||||
|
Loading…
Reference in New Issue
Block a user