mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
#715 - hide New Collection button for non-admins
This commit is contained in:
parent
f76d02d315
commit
e829482b7a
2 changed files with 11 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="listTopPaging">
|
<div class="listTopPaging">
|
||||||
</div>
|
</div>
|
||||||
<button id="btnNewCollection" data-mini="true" data-icon="plus" data-inline="true">New</button>
|
<button id="btnNewCollection" data-mini="true" data-icon="plus" data-inline="true" class="hide">New</button>
|
||||||
<div class="viewSummary"></div>
|
<div class="viewSummary"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="items" class="itemsContainer"></div>
|
<div id="items" class="itemsContainer"></div>
|
||||||
|
|
|
@ -67,6 +67,16 @@
|
||||||
|
|
||||||
LibraryBrowser.saveQueryValues('boxsets', query);
|
LibraryBrowser.saveQueryValues('boxsets', query);
|
||||||
|
|
||||||
|
Dashboard.getCurrentUser().done(function(user) {
|
||||||
|
|
||||||
|
if (user.Configuration.IsAdministrator) {
|
||||||
|
$('#btnNewCollection', page).removeClass('hide');
|
||||||
|
} else {
|
||||||
|
$('#btnNewCollection', page).addClass('hide');
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue