mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-05 10:32:35 +01:00
Show published date in history details and manual search
New: Hover over age in manual search to see published date New: Show published date in history details for grab events
This commit is contained in:
parent
119677e2dd
commit
a83f49ca32
@ -1,5 +1,5 @@
|
||||
{{#if_eq eventType compare="grabbed"}}
|
||||
<dl class="dl-horizontal">
|
||||
<dl class="dl-horizontal info">
|
||||
|
||||
<dt>Name:</dt>
|
||||
<dd>{{sourceTitle}}</dd>
|
||||
@ -33,6 +33,11 @@
|
||||
{{#if age}}
|
||||
{{historyAge}}
|
||||
{{/if}}
|
||||
|
||||
{{#if publishedDate}}
|
||||
<dt>Published Date:</dt>
|
||||
<dd>{{ShortDate publishedDate}} {{LTS publishedDate}}</dd>
|
||||
{{/if}}
|
||||
{{/with}}
|
||||
</dl>
|
||||
{{/if_eq}}
|
||||
|
@ -222,3 +222,7 @@ td.delete-episode-file-cell {
|
||||
width : 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.age-cell {
|
||||
cursor : default;
|
||||
}
|
||||
|
@ -256,3 +256,9 @@ body {
|
||||
max-width : 250px;
|
||||
}
|
||||
}
|
||||
|
||||
dl.info {
|
||||
dt, dd {
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
}
|
||||
|
@ -63,4 +63,12 @@ define(
|
||||
|
||||
return moment(input).format(UiSettings.time(false));
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('LTS', function (input) {
|
||||
if (!input) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return moment(input).format('LTS');
|
||||
});
|
||||
});
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
define(
|
||||
[
|
||||
'moment',
|
||||
'backgrid',
|
||||
'Shared/UiSettingsModel',
|
||||
'Shared/FormatHelpers'
|
||||
], function (Backgrid, FormatHelpers) {
|
||||
], function (moment, Backgrid, UiSettings, FormatHelpers) {
|
||||
return Backgrid.Cell.extend({
|
||||
|
||||
className: 'age-cell',
|
||||
@ -12,14 +12,17 @@ define(
|
||||
render: function () {
|
||||
var age = this.model.get('age');
|
||||
var ageHours = this.model.get('ageHours');
|
||||
var published = moment(this.model.get('publishDate'));
|
||||
var publishedFormatted = published.format('{0} LTS'.format(UiSettings.get('shortDateFormat')));
|
||||
var formatted = age;
|
||||
var suffix = this.plural(age, 'day');
|
||||
|
||||
if (age === 0) {
|
||||
this.$el.html('{0} {1}'.format(ageHours.toFixed(1), this.plural(Math.round(ageHours), 'hour')));
|
||||
formatted = ageHours.toFixed(1);
|
||||
suffix = this.plural(Math.round(ageHours), 'hour');
|
||||
}
|
||||
|
||||
else {
|
||||
this.$el.html('{0} {1}'.format(age, this.plural(age, 'day')));
|
||||
}
|
||||
this.$el.html('<div title="{2}">{0} {1}</div>'.format(formatted, suffix, publishedFormatted));
|
||||
|
||||
this.delegateEvents();
|
||||
return this;
|
||||
@ -34,3 +37,5 @@ define(
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
'use strict';
|
||||
|
@ -1,9 +1,3 @@
|
||||
dl.info {
|
||||
dt, dd {
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.health-ok {
|
||||
margin-bottom: 30px;
|
||||
}
|
Loading…
Reference in New Issue
Block a user