mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Added history details modal
This commit is contained in:
parent
932012d7f9
commit
1c4a687854
9 changed files with 139 additions and 6 deletions
10
UI/History/Details/HistoryDetailsView.js
Normal file
10
UI/History/Details/HistoryDetailsView.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'marionette'
|
||||
], function (Marionette) {
|
||||
|
||||
return Marionette.ItemView.extend({
|
||||
template: 'History/Details/HistoryDetailsViewTemplate'
|
||||
});
|
||||
});
|
58
UI/History/Details/HistoryDetailsViewTemplate.html
Normal file
58
UI/History/Details/HistoryDetailsViewTemplate.html
Normal file
|
@ -0,0 +1,58 @@
|
|||
<div class="history-detail-modal">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<h3>
|
||||
Details
|
||||
</h3>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{#if_eq eventType compare="grabbed"}}
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
<dt>Name</dt>
|
||||
<dd>{{sourceTitle}}</dd>
|
||||
|
||||
{{#with data}}
|
||||
{{#if indexer}}
|
||||
<dt>Indexer</dt>
|
||||
<dd>{{indexer}}</dd>
|
||||
{{/if}}
|
||||
|
||||
{{#if releaseGroup}}
|
||||
<dt>Release Group</dt>
|
||||
<dd>{{releaseGroup}}</dd>
|
||||
{{/if}}
|
||||
|
||||
{{#if nzbInfoUrl}}
|
||||
<dt>Info</dt>
|
||||
<dd><a href="{{nzbInfoUrl}}">{{nzbInfoUrl}}o</a></dd>
|
||||
{{/if}}
|
||||
{{/with}}
|
||||
</dl>
|
||||
{{else}}
|
||||
{{#if data}}
|
||||
{{#with data}}
|
||||
<dl class="dl-horizontal">
|
||||
{{#if filename}}
|
||||
<dt>Filename</dt>
|
||||
<dd>{{filename}}</dd>
|
||||
{{/if}}
|
||||
|
||||
{{#if path}}
|
||||
<dt>Path</dt>
|
||||
<dd>{{path}}</dd>
|
||||
{{/if}}
|
||||
</dl>
|
||||
{{/with}}
|
||||
{{else}}
|
||||
No details available
|
||||
{{/if}}
|
||||
{{/if_eq}}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal">close</button>
|
||||
</div>
|
||||
</div>
|
||||
|
27
UI/History/HistoryDetailsCell.js
Normal file
27
UI/History/HistoryDetailsCell.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
'use strict';
|
||||
|
||||
define(
|
||||
[
|
||||
'app',
|
||||
'Cells/NzbDroneCell'
|
||||
], function (App, NzbDroneCell) {
|
||||
return NzbDroneCell.extend({
|
||||
|
||||
className: 'history-details-cell',
|
||||
|
||||
events: {
|
||||
'click': '_showDetails'
|
||||
},
|
||||
|
||||
render: function () {
|
||||
this.$el.empty();
|
||||
this.$el.html('<i class="icon-info-sign"></i>');
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
_showDetails: function () {
|
||||
App.vent.trigger(App.Commands.ShowHistoryDetails, { history: this.model });
|
||||
}
|
||||
});
|
||||
});
|
|
@ -10,9 +10,21 @@ define(
|
|||
'Cells/EpisodeTitleCell',
|
||||
'Cells/QualityCell',
|
||||
'Cells/RelativeDateCell',
|
||||
'History/HistoryDetailsCell',
|
||||
'Shared/Grid/Pager',
|
||||
'Shared/LoadingView'
|
||||
], function (Marionette, Backgrid, HistoryCollection, EventTypeCell, SeriesTitleCell, EpisodeNumberCell, EpisodeTitleCell, QualityCell, RelativeDateCell, GridPager, LoadingView) {
|
||||
], function (Marionette,
|
||||
Backgrid,
|
||||
HistoryCollection,
|
||||
EventTypeCell,
|
||||
SeriesTitleCell,
|
||||
EpisodeNumberCell,
|
||||
EpisodeTitleCell,
|
||||
QualityCell,
|
||||
RelativeDateCell,
|
||||
HistoryDetailsCell,
|
||||
GridPager,
|
||||
LoadingView) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'History/HistoryLayoutTemplate',
|
||||
|
||||
|
@ -56,6 +68,12 @@ define(
|
|||
name : 'date',
|
||||
label: 'Date',
|
||||
cell : RelativeDateCell
|
||||
},
|
||||
{
|
||||
name : 'this',
|
||||
label : '',
|
||||
cell : HistoryDetailsCell,
|
||||
sortable: false
|
||||
}
|
||||
],
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue