@{ /****************************************************************************** // MARECHAI: Master repository of computing history artifacts information // ---------------------------------------------------------------------------- // // Author(s) : Natalia Portillo // // --[ License ] -------------------------------------------------------------- // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- // Copyright © 2003-2020 Natalia Portillo *******************************************************************************/ } @page "/admin/books/details/{Id:long}" @page "/admin/books/edit/{Id:long}" @page "/admin/books/create" @using Marechai.Database.Models @using Marechai.Database @inherits OwningComponentBase @inject IStringLocalizer L @inject Iso31661NumericService CountriesService @inject DocumentCompaniesService CompaniesService @inject DocumentRolesService DocumentRolesService @inject CompaniesByBookService CompaniesByBookService @inject MachineFamiliesService MachineFamiliesService @inject BooksByMachineFamilyService BooksByMachineFamilyService @inject MachinesService MachinesService @inject BooksByMachineService BooksByMachineService @inject DocumentPeopleService PeopleService @inject PeopleByBookService PeopleByBookService @inject IFileReaderService FileReaderService @inject BookScansService BookScansService @inject NavigationManager NavigationManager @inject IWebHostEnvironment Host @inject IJSRuntime JSRuntime @inject UserManager UserManager @inject AuthenticationStateProvider AuthenticationStateProvider @attribute [Authorize(Roles = "UberAdmin, Admin")]

@L["Book details"]


@if(!_loaded) {

@L["Loading..."]

return; }
@L["Title using latin script"] @L["Please enter a valid title."] @if(_editing || _model.NativeTitle != null) { @L["Native title, that is, title using native script (cyrillic, chinese, etc)"] @if(_editing) { @L["Unknown (native title)"] } @if(!_editing || !_unknownNativeTitle) { @L["Please enter a valid native title."] } } @if(_editing || _model.Published != null) { @L["Published"] @if(_editing) { @L["Unknown (publication date)"] } @if(!_editing || !_unknownPublished) { @L["Please enter a valid publication date."] } } @if(_editing || _model.CountryId != null) { @L["Country of publication"] @if(_editing) { @L["Unknown (country of publication)"] } @if(!_editing || !_unknownCountry) { } } @if(_editing || _model.Isbn != null) { @L["ISBN"] @if(_editing) { @L["Unknown (ISBN)"] } @if(!_editing || !_unknownIsbn) { @L["Please enter a valid ISBN."] } } @if(_editing || _model.Pages.HasValue) { @L["Pages"] @if(_editing) { @L["Unknown (pages)"] } @if(!_editing || !_unknownPages) { @L["Please enter a valid number of pages."] } } @if(_editing || _model.Edition.HasValue) { @L["Edition"] @if(_editing) { @L["Unknown (edition)"] } @if(!_editing || !_unknownEdition) { @L["Please enter a valid edition number."] } } @{ // TODO: Source book } @{ // TODO: Link to previous edition }
@if(!_editing && !_editingScan && !_addingScan) { } else { } @L["Back to list"]
@{ // TODO: Book synopsis } @if(!_editing && !_editingScan && !_addingScan) {

@L["Companies involved in this book"]

@if(_addingCompany) {
@L["Company"] @L["Role"]
} @if(_bookCompanies?.Count > 0) {
@foreach(var item in _bookCompanies) { }
@L["Company"] @L["Role"]
@item.Company @item.Role
}

@L["People involved in this book"]

@if(_addingPerson) {
@L["Person"] @L["Role"]
} @if(_bookPeople?.Count > 0) {
@foreach(var item in _bookPeople) { }
@L["Person"] @L["Role"]
@item.FullName @item.Role
}

@L["Machine families this book talks about"]

@if(_addingMachineFamily) {
@L["Family"]
} @if(_bookMachineFamilies?.Count > 0) {
@foreach(var item in _bookMachineFamilies) { }
@L["Family"]
@item.MachineFamily
}

@L["Machines this book talks about"]

@if(_addingMachine) {
@L[""]
} @if(_bookMachines?.Count > 0) {
@foreach(var item in _bookMachines) { }
@L["Machine"]
@item.Machine
} @if(_scans.Count > 0) { foreach(var scan in _scans) {
} } @_deleteTitle @_deleteText } @if(_addingScan && !_editing) { @if(!_uploaded) { @if(!_uploading) { @L["Choose scan file"]
@L["Scan type"] @L["Page"] @L["Unknown (scan page)"] @if(!_unknownScanPage) { @L["Please enter a valid scanned page."] }
} else { @L["Uploading..."]
@($"{_progressValue:F2}")%
} @if(_uploadError) { @_uploadErrorMessage } } else {
@string.Format(L["Image format recognized as {0}"], _imageFormat)
@if(_allFinished) { @L["All finished!"] }
@L["Extracting Exif information..."] @if(_extractExif == true) { @L["OK!"] } else if(_extractExif == false) { @L["Error!"] }
@L["Moving file to proper place..."] @if(_moveFile == true) { @L["OK!"] } else if(_moveFile == false) { @L["Error!"] } @if(_moveFile == true) { }
@L["Converting photo to JPEG with an HD resolution (thumbnail)..."] @if(_convertJpegHdTh == true) { @L["OK!"] } else if(_convertJpegHdTh == false) { @L["Error!"] } @if(_convertJpegHdTh == true) { }
@L["Converting photo to JPEG with a 1440p resolution (thumbnail)..."] @if(_convertJpeg1440Th == true) { @L["OK!"] } else if(_convertJpeg1440Th == false) { @L["Error!"] } @if(_convertJpeg1440Th == true) { }
@L["Converting photo to JPEG with a 4K resolution (thumbnail)..."] @if(_convertJpeg4kTh == true) { @L["OK!"] } else if(_convertJpeg4kTh == false) { @L["Error!"] } @if(_convertJpeg4kTh == true) { }
@L["Converting photo to JPEG with an HD resolution..."] @if(_convertJpegHd == true) { @L["OK!"] } else if(_convertJpegHd == false) { @L["Error!"] } @if(_convertJpegHd == true) { }
@L["Converting photo to JPEG with a 1440p resolution..."] @if(_convertJpeg1440 == true) { @L["OK!"] } else if(_convertJpeg1440 == false) { @L["Error!"] } @if(_convertJpeg1440 == true) { }
@L["Converting photo to JPEG with a 4K resolution..."] @if(_convertJpeg4k == true) { @L["OK!"] } else if(_convertJpeg4k == false) { @L["Error!"] } @if(_convertJpeg4k == true) { }
@L["Converting photo to JPEG2000 with an HD resolution (thumbnail)..."] @if(_convertJp2kHdTh == true) { @L["OK!"] } else if(_convertJp2kHdTh == false) { @L["Error!"] } @if(_convertJp2kHdTh == true) { }
@L["Converting photo to JPEG2000 with a 1440p resolution (thumbnail)..."] @if(_convertJp2k1440Th == true) { @L["OK!"] } else if(_convertJp2k1440Th == false) { @L["Error!"] } @if(_convertJp2k1440Th == true) { }
@L["Converting photo to JPEG2000 with a 4K resolution (thumbnail)..."] @if(_convertJp2k4kTh == true) { @L["OK!"] } else if(_convertJp2k4kTh == false) { @L["Error!"] } @if(_convertJp2k4kTh == true) { }
@L["Converting photo to JPEG2000 with an HD resolution..."] @if(_convertJp2kHd == true) { @L["OK!"] } else if(_convertJp2kHd == false) { @L["Error!"] } @if(_convertJp2kHd == true) { }
@L["Converting photo to JPEG2000 with a 1440p resolution..."] @if(_convertJp2k1440 == true) { @L["OK!"] } else if(_convertJp2k1440 == false) { @L["Error!"] } @if(_convertJp2k1440 == true) { }
@L["Converting photo to JPEG2000 with a 4K resolution..."] @if(_convertJp2k4k == true) { @L["OK!"] } else if(_convertJp2k4k == false) { @L["Error!"] } @if(_convertJp2k4k == true) { }
@L["Converting photo to WebP with an HD resolution (thumbnail)..."] @if(_convertWebpHdTh == true) { @L["OK!"] } else if(_convertWebpHdTh == false) { @L["Error!"] } @if(_convertWebpHdTh == true) { }
@L["Converting photo to WebP with a 1440p resolution (thumbnail)..."] @if(_convertWebp1440Th == true) { @L["OK!"] } else if(_convertWebp1440Th == false) { @L["Error!"] } @if(_convertWebp1440Th == true) { }
@L["Converting photo to WebP with a 4K resolution (thumbnail)..."] @if(_convertWebp4kTh == true) { @L["OK!"] } else if(_convertWebp4kTh == false) { @L["Error!"] } @if(_convertWebp4kTh == true) { }
@L["Converting photo to WebP with an HD resolution..."] @if(_convertWebpHd == true) { @L["OK!"] } else if(_convertWebpHd == false) { @L["Error!"] } @if(_convertWebpHd == true) { }
@L["Converting photo to WebP with a 1440p resolution..."] @if(_convertWebp1440 == true) { @L["OK!"] } else if(_convertWebp1440 == false) { @L["Error!"] } @if(_convertWebp1440 == true) { }
@L["Converting photo to WebP with a 4K resolution..."] @if(_convertWebp4k == true) { @L["OK!"] } else if(_convertWebp4k == false) { @L["Error!"] } @if(_convertWebp4k == true) { }
@L["Converting photo to HEIF with an HD resolution (thumbnail)..."] @if(_convertHeifHdTh == true) { @L["OK!"] } else if(_convertHeifHdTh == false) { @L["Error!"] } @if(_convertHeifHdTh == true) { }
@L["Converting photo to HEIF with a 1440p resolution (thumbnail)..."] @if(_convertHeif1440Th == true) { @L["OK!"] } else if(_convertHeif1440Th == false) { @L["Error!"] } @if(_convertHeif1440Th == true) { }
@L["Converting photo to HEIF with a 4K resolution (thumbnail)..."] @if(_convertHeif4kTh == true) { @L["OK!"] } else if(_convertHeif4kTh == false) { @L["Error!"] } @if(_convertHeif4kTh == true) { }
@L["Converting photo to HEIF with an HD resolution..."] @if(_convertHeifHd == true) { @L["OK!"] } else if(_convertHeifHd == false) { @L["Error!"] } @if(_convertHeifHd == true) { }
@L["Converting photo to HEIF with a 1440p resolution..."] @if(_convertHeif1440 == true) { @L["OK!"] } else if(_convertHeif1440 == false) { @L["Error!"] } @if(_convertHeif1440 == true) { }
@L["Converting photo to HEIF with a 4K resolution..."] @if(_convertHeif4k == true) { @L["OK!"] } else if(_convertHeif4k == false) { @L["Error!"] } @if(_convertHeif4k == true) { }
@L["Converting photo to AV1F with an HD resolution (thumbnail)..."] @if(_convertAvifHdTh == true) { @L["OK!"] } else if(_convertAvifHdTh == false) { @L["Error!"] } @if(_convertAvifHdTh == true) { }
@L["Converting photo to AV1F with a 1440p resolution (thumbnail)..."] @if(_convertAvif1440Th == true) { @L["OK!"] } else if(_convertAvif1440Th == false) { @L["Error!"] } @if(_convertAvif1440Th == true) { }
@L["Converting photo to AV1F with a 4K resolution (thumbnail)..."] @if(_convertAvif4kTh == true) { @L["OK!"] } else if(_convertAvif4kTh == false) { @L["Error!"] } @if(_convertAvif4kTh == true) { }
@L["Converting photo to AV1F with an HD resolution..."] @if(_convertAvifHd == true) { @L["OK!"] } else if(_convertAvifHd == false) { @L["Error!"] } @if(_convertAvifHd == true) { }
@L["Converting photo to AV1F with a 1440p resolution..."] @if(_convertAvif1440 == true) { @L["OK!"] } else if(_convertAvif1440 == false) { @L["Error!"] } @if(_convertAvif1440 == true) { }
@L["Converting photo to AV1F with a 4K resolution..."] @if(_convertAvif4k == true) { @L["OK!"] } else if(_convertAvif4k == false) { @L["Error!"] } @if(_convertAvif4k == true) { }
@L["Adding photo to database..."] @if(_addToDatabase == true) { @L["OK!"] } else if(_addToDatabase == false) { @L["Error!"] }
} } @if(_editingScan && !_editing) {
@L["Uploaded by"] ")" /> @L["Uploaded date"] @L["Scan type"] @L["Page"] @L["Unknown (scan page)"] @if(!_unknownScanPage) { @L["Please enter a valid scanned page."] } @L["Author"] @L["Unknown (author)"] @if(!_unknownScanAuthor) { @L["Please enter a valid author."] } @L["Scanner manufacturer"] @L["Unknown (scanner manufacturer)"] @if(!_unknownScanScannerManufacturer) { @L["Please enter a valid scanner manufacturer."] } @L["Scanner model"] @L["Unknown (scanner model)"] @if(!_unknownScanScannerModel) { @L["Please enter a valid scanner model."] } @L["Color space"] @L["Unknown (color space)"] @if(!_unknownScanColorSpace) { } @L["Creation date"] @L["Unknown (creation date)"] @if(!_unknownScanCreationDate) { @L["Please enter a correct creation date."] } @L["Exif version"] @L["Unknown (exif version)"] @if(!_unknownScanExifVersion) { @L["Please enter a valid Exif version."] } @L["Horizontal resolution"] @L["Unknown (horizontal resolution)"] @if(!_unknownScanHorizontalResolution) { @L["Please enter a valid horizontal resolution."] } @L["Resolution unit"] @L["Unknown (resolution unit)"] @if(!_unknownScanResolutionUnit) { } @L["Software used"] @L["Unknown (software used)"] @if(!_unknownScanSoftwareUsed) { @L["Please enter a valid software used."] } @L["Vertical resolution"] @L["Unknown (vertical resolution)"] @if(!_unknownScanVerticalResolution) { @L["Please enter a valid vertical resolution."] } @L["User comments"] @L["Unknown or empty (user comments)"] @if(!_unknownScanComments) { @L["Please enter valid comments."] }
}