Support Editing Metadata for Multiple Books at Once via Bulk Edit Interface
This commit is contained in:
committed by
Aditya Chandel
parent
2d041f79f3
commit
82c843bbe5
@@ -41,6 +41,7 @@ import {Popover} from 'primeng/popover';
|
||||
import {Slider} from 'primeng/slider';
|
||||
import {Select} from 'primeng/select';
|
||||
import {FilterSortPreferenceService} from './filters/filter-sorting-preferences.service';
|
||||
import {TieredMenu} from 'primeng/tieredmenu';
|
||||
|
||||
export enum EntityType {
|
||||
LIBRARY = 'Library',
|
||||
@@ -73,7 +74,7 @@ const SORT_DIRECTION = {
|
||||
standalone: true,
|
||||
templateUrl: './book-browser.component.html',
|
||||
styleUrls: ['./book-browser.component.scss'],
|
||||
imports: [Button, VirtualScrollerModule, BookCardComponent, AsyncPipe, ProgressSpinner, Menu, InputText, FormsModule, BookTableComponent, BookFilterComponent, Tooltip, NgClass, Fluid, PrimeTemplate, NgStyle, OverlayPanelModule, DropdownModule, Checkbox, Popover, Slider, Select],
|
||||
imports: [Button, VirtualScrollerModule, BookCardComponent, AsyncPipe, ProgressSpinner, Menu, InputText, FormsModule, BookTableComponent, BookFilterComponent, Tooltip, NgClass, Fluid, PrimeTemplate, NgStyle, OverlayPanelModule, DropdownModule, Checkbox, Popover, Slider, Select, TieredMenu],
|
||||
providers: [SeriesCollapseFilter],
|
||||
animations: [
|
||||
trigger('slideInOut', [
|
||||
@@ -143,6 +144,7 @@ export class BookBrowserComponent implements OnInit, AfterViewInit {
|
||||
lastAppliedSort: SortOption | null = null;
|
||||
filterVisibility = true;
|
||||
private settingFiltersFromUrl = false;
|
||||
protected metadataMenuItems: MenuItem[] | undefined;
|
||||
|
||||
get currentCardSize() {
|
||||
return this.coverScalePreferenceService.currentCardSize;
|
||||
@@ -192,6 +194,19 @@ export class BookBrowserComponent implements OnInit, AfterViewInit {
|
||||
this.deselectAllBooks();
|
||||
this.clearFilter();
|
||||
});
|
||||
|
||||
this.metadataMenuItems = [
|
||||
{
|
||||
label: 'Refresh Metadata',
|
||||
icon: 'pi pi-refresh',
|
||||
command: () => this.updateMetadata()
|
||||
},
|
||||
{
|
||||
label: 'Bulk Edit Metadata',
|
||||
icon: 'pi pi-pencil',
|
||||
command: () => this.bulkEditMetadata()
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
@@ -577,4 +592,8 @@ export class BookBrowserComponent implements OnInit, AfterViewInit {
|
||||
updateMetadata(): void {
|
||||
this.dialogHelperService.openMetadataRefreshDialog(this.selectedBooks);
|
||||
}
|
||||
|
||||
bulkEditMetadata(): void {
|
||||
this.dialogHelperService.openBulkMetadataEditDialog(this.selectedBooks);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user