mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add tag support to list view
This commit is contained in:
parent
f591296bfe
commit
d01cfa498b
3 changed files with 25 additions and 5 deletions
|
@ -1080,7 +1080,7 @@ function renderDetails(page, item, apiClient, context) {
|
|||
renderLinks(page, item);
|
||||
}
|
||||
|
||||
renderTags(page, item);
|
||||
renderTags(page, item, context);
|
||||
renderSeriesAirTime(page, item);
|
||||
}
|
||||
|
||||
|
@ -1299,7 +1299,7 @@ function renderSeriesAirTime(page, item) {
|
|||
}
|
||||
}
|
||||
|
||||
function renderTags(page, item) {
|
||||
function renderTags(page, item, context) {
|
||||
const itemTags = page.querySelector('.itemTags');
|
||||
const tagElements = [];
|
||||
let tags = item.Tags || [];
|
||||
|
@ -1309,8 +1309,13 @@ function renderTags(page, item) {
|
|||
}
|
||||
|
||||
tags.forEach(tag => {
|
||||
const href = appRouter.getRouteUrl('tag', {
|
||||
context,
|
||||
tag,
|
||||
serverId: item.ServerId
|
||||
});
|
||||
tagElements.push(
|
||||
`<a href="#/search.html?query=${encodeURIComponent(tag)}" class="button-link emby-button" is="emby-linkbutton">`
|
||||
`<a href="${href}" class="button-link emby-button" is="emby-linkbutton">`
|
||||
+ escapeHtml(tag)
|
||||
+ '</a>'
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue