Always load lg-admin plugin
This commit is contained in:
parent
6376e3b550
commit
695ec94d7c
2 changed files with 4 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ class lgAdmin {
|
|||
constructor(instance, $LG) {
|
||||
this.core = instance;
|
||||
this.$LG = $LG;
|
||||
this.isStaff = instance.settings.isStaff;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
@ -19,6 +20,7 @@ class lgAdmin {
|
|||
onAfterSlide(event) {
|
||||
const photoId = this.core.galleryItems[event.detail.index].slideName;
|
||||
document.getElementById("lg-admin").href = `https://photos.crans.org/admin/photologue/photo/${photoId}/change/`;
|
||||
document.getElementById("lg-admin").style.display = this.isStaff ? 'block' : 'none';
|
||||
}
|
||||
|
||||
// Admin must have destroy prototype
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue