@{ /****************************************************************************** // 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 @using Marechai.Database.Models @inherits OwningComponentBase @inject IStringLocalizer L @inject Iso31661NumericService CountriesService @inject DocumentCompaniesService CompaniesService @inject DocumentRolesService DocumentRolesService @inject CompaniesByBookService CompaniesByBookService @inject NavigationManager NavigationManager @inject IWebHostEnvironment Host @inject IJSRuntime JSRuntime @inject Microsoft.AspNetCore.Identity.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) { } else { } @L["Back to list"]
@{ // TODO: Book synopsis } @if (!_editing) {

@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
} @_deleteTitle @_deleteText }