UrlName, HttpInput::Str(GET, 'artwork-url-name')); // Artwork found under an artist alternate name, redirect there and exit. http_response_code(Enums\HttpCode::MovedPermanently->value); header('Location: ' . $artwork->Url); exit(); } catch(Exceptions\ArtistNotFoundException){ // The artwork is really not found, throw the original exception. throw $ex; } } $isReviewerView = Session::$User->Benefits->CanReviewArtwork ?? false; $isAdminView = Session::$User->Benefits->CanReviewOwnArtwork ?? false; // If the artwork is not approved, and we're not an admin or the submitter when they can edit, don't show it. if( (Session::$User === null && $artwork->Status != Enums\ArtworkStatusType::Approved) || (Session::$User !== null && $artwork->Status != Enums\ArtworkStatusType::Approved && $artwork->SubmitterUserId != Session::$User->UserId && !$isReviewerView) ){ throw new Exceptions\InvalidPermissionsException(); } // We got here because an artwork was successfully submitted. if($isSaved){ session_unset(); } // We got here because an artwork PATCH operation had errors and the user has to try again. if($exception){ http_response_code(Enums\HttpCode::UnprocessableContent->value); // Before we overwrite the original artwork with our new one, restore the old status, because if the new status is `approved` then it will hide the status form entirely, which will be confusing. $oldStatus = $artwork->Status; /** @var Artwork $artwork */ $artwork = $_SESSION['artwork'] ?? $artwork; $artwork->Status = $oldStatus; session_unset(); } } catch(Exceptions\ArtworkNotFoundException){ Template::ExitWithCode(Enums\HttpCode::NotFound); } catch(Exceptions\InvalidPermissionsException){ Template::ExitWithCode(Enums\HttpCode::Forbidden); } ?>Name, css: ['/css/artwork.css']) ?>

Name) ?>

Artwork saved!

Metadata

Reviewer !== null){ ?>
Title: Name) ?> (#ArtworkId ?>)
Artist: Artist->Name) ?>Artist->AlternateNames ?? []) > 0){ ?> (A.K.A. , ', array_map('Formatter::EscapeHtml', $artwork->Artist->AlternateNames)) ?>)Artist->DeathYear !== null){ ?> (d. Artist->DeathYear ?>) (#Artist->ArtistId ?>)
Year completed: CompletedYear === null){ ?>UnknownCompletedYearIsCirca){ ?>Circa CompletedYear ?>
Tags:
Dimensions: Dimensions ?>
Status: Status->value) ?> Ebook)){ ?> — in use by Ebook->Title) ?> Ebook->IsPlaceholder()){ ?>(unreleased)
Submitted by: Submitter === null){ ?>AnonymousSubmitter->Name !== null){ ?> Submitter->Name) ?>Submitter->Email) ?>Submitter !== null){ ?> (#Submitter->UserId ?>)
Reviewed by: Reviewer->Name !== null){ ?> Reviewer->Name) ?>Reviewer->Email) ?> (#Reviewer->UserId ?>)

U.S. public domain proof

MuseumUrl !== null){ ?>

Museum page

MuseumUrl) ?>

Museum !== null){ ?>

Approved museum: Museum->Name) ?> (Museum->Domain) ?>)

Not an approved museum.

PublicationYear !== null){ ?>

Page scans

Exception !== null){ ?>

Public domain status exception reason

Exception, false) ?> Notes !== null){ ?>

Special notes

Notes, false) ?> CanBeEditedBy(Session::$User)){ ?>

Edit artwork

An editor or the submitter may edit this artwork before it’s approved. Once it’s approved, it can no longer be edited.

Edit this artwork.

CanStatusBeChangedBy(Session::$User) || $artwork->CanEbookUrlBeChangedBy(Session::$User)){ ?>

Editor options

CanStatusBeChangedBy(Session::$User)){ ?>

Review the metadata and PD proof for this artwork submission. Approve to make it available for future producers. Once an artwork is approved, it can no longer be edited.

CanStatusBeChangedBy(Session::$User)){ ?> CanEbookUrlBeChangedBy(Session::$User)){ ?> Ebook)){ ?> value="Ebook->FullUrl) ?>" />