diff --git a/UI/Cells/AirDateCell.js b/UI/Cells/AirDateCell.js new file mode 100644 index 000000000..568646523 --- /dev/null +++ b/UI/Cells/AirDateCell.js @@ -0,0 +1,26 @@ +'use strict'; +define( + [ + 'backgrid', + 'moment', + 'Shared/FormatHelpers' + ], function (Backgrid, Moment, FormatHelpers) { + return Backgrid.Cell.extend({ + className: 'air-date-cell', + + render: function () { + + this.$el.empty(); + var date = this.model.get(this.column.get('name')); + + if (date) { + this.$el.html(FormatHelpers.DateHelper(date)); + + this.$el.attr('title', Moment(date).format('LLLL')); + } + + return this; + + } + }); + }); diff --git a/UI/Content/base.less b/UI/Content/base.less index 24201c5f7..30c1be6c3 100644 --- a/UI/Content/base.less +++ b/UI/Content/base.less @@ -15,19 +15,22 @@ width : 125px; position : relative; margin-bottom : 2px; + + .progressbar-back-text, .progressbar-front-text { + font-size : 11.844px; + font-weight: bold; + text-align : center; + } + .progressbar-back-text { position : absolute; width : 100%; height : 100%; - font-size : 12px; - text-align : center; } .progressbar-front-text { display : block; width : 125px; - font-size : 12px; - text-align : center; } .bar { position : absolute; diff --git a/UI/Handlebars/Helpers/Series.js b/UI/Handlebars/Helpers/Series.js index 5a2a40013..ac2a21747 100644 --- a/UI/Handlebars/Helpers/Series.js +++ b/UI/Handlebars/Helpers/Series.js @@ -35,7 +35,6 @@ define( return '/series/' + this.titleSlug; }); - Handlebars.registerHelper('percentOfEpisodes', function () { var episodeCount = this.episodeCount; var episodeFileCount = this.episodeFileCount; @@ -49,4 +48,18 @@ define( return percent; }); + Handlebars.registerHelper('seasonCountHelper', function () { + var seasonCount = this.seasonCount; + var continuing = this.status === 'continuing'; + + if (continuing) { + return new Handlebars.SafeString('Season {0}'.format(seasonCount)); + } + + if (seasonCount === 1) { + return new Handlebars.SafeString('{0} Season'.format(seasonCount)) + } + + return new Handlebars.SafeString('{0} Seasons'.format(seasonCount)) + }); }); diff --git a/UI/Series/Index/EpisodeProgressPartial.html b/UI/Series/Index/EpisodeProgressPartial.html new file mode 100644 index 000000000..b4f5931e8 --- /dev/null +++ b/UI/Series/Index/EpisodeProgressPartial.html @@ -0,0 +1,15 @@ +{{#if_eq episodeFileCount compare=episodeCount}} + {{#if_eq status compare="continuing"}} +