mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add Writers to overview and handle cast and crew better
This commit is contained in:
parent
e83fcf89fb
commit
660e4a0a3c
3 changed files with 37 additions and 1 deletions
|
@ -912,6 +912,35 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
|
|||
}
|
||||
}
|
||||
|
||||
function renderWriter(page, item, context) {
|
||||
var writers = (item.People || []).filter(function (person) {
|
||||
return person.Type === 'Writer';
|
||||
});
|
||||
|
||||
var html = writers.map(function (person) {
|
||||
return '<a style="color:inherit;" class="button-link" is="emby-linkbutton" href="' + appRouter.getRouteUrl({
|
||||
Name: person.Name,
|
||||
Type: 'Person',
|
||||
ServerId: item.ServerId,
|
||||
Id: person.Id
|
||||
}, {
|
||||
context: context
|
||||
}) + '">' + person.Name + '</a>';
|
||||
}).join(', ');
|
||||
|
||||
var writersLabel = page.querySelector('.writersLabel');
|
||||
writersLabel.innerHTML = globalize.translate(writers.length > 1 ? 'Writers' : 'Writer');
|
||||
var directorsValue = page.querySelector('.writers');
|
||||
directorsValue.innerHTML = html;
|
||||
|
||||
var writersGroup = page.querySelector('.writersGroup');
|
||||
if (writers.length) {
|
||||
writersGroup.classList.remove('hide');
|
||||
} else {
|
||||
writersGroup.classList.add('hide');
|
||||
}
|
||||
}
|
||||
|
||||
function renderDirector(page, item, context) {
|
||||
var directors = (item.People || []).filter(function (person) {
|
||||
return person.Type === 'Director';
|
||||
|
@ -989,6 +1018,7 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
|
|||
renderMoreFromSeason(page, item, apiClient);
|
||||
renderMoreFromArtist(page, item, apiClient);
|
||||
renderDirector(page, item, context);
|
||||
renderWriter(page, item, context);
|
||||
renderGenres(page, item, context);
|
||||
renderChannelGuide(page, apiClient, item);
|
||||
renderTagline(page, item);
|
||||
|
@ -1733,7 +1763,7 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
|
|||
|
||||
function renderCast(page, item) {
|
||||
var people = (item.People || []).filter(function (p) {
|
||||
return 'Director' !== p.Type;
|
||||
return p.Type === 'Actor';
|
||||
});
|
||||
|
||||
if (!people.length) {
|
||||
|
|
|
@ -117,6 +117,11 @@
|
|||
<div class="directorsLabel label"></div>
|
||||
<div class="directors content"></div>
|
||||
</div>
|
||||
|
||||
<div class="detailsGroupItem writersGroup hide">
|
||||
<div class="writersLabel label"></div>
|
||||
<div class="writers content"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="trackSelections hide focuscontainer-x">
|
||||
|
|
|
@ -1529,6 +1529,7 @@
|
|||
"Whitelist": "Whitelist",
|
||||
"WizardCompleted": "That's all we need for now. Jellyfin has begun collecting information about your media library. Check out some of our apps, and then click <b>Finish</b> to view the <b>Dashboard</b>.",
|
||||
"Writer": "Writer",
|
||||
"Writers": "Writers",
|
||||
"XmlDocumentAttributeListHelp": "These attributes are applied to the root element of every XML response.",
|
||||
"XmlTvKidsCategoriesHelp": "Programs with these categories will be displayed as programs for children. Separate multiple with '|'.",
|
||||
"XmlTvMovieCategoriesHelp": "Programs with these categories will be displayed as movies. Separate multiple with '|'.",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue