Skip to content

Display 'no call number' when appropriate.#5270

Open
demiankatz wants to merge 1 commit into
vufind-org:devfrom
demiankatz:no-callno
Open

Display 'no call number' when appropriate.#5270
demiankatz wants to merge 1 commit into
vufind-org:devfrom
demiankatz:no-callno

Conversation

@demiankatz
Copy link
Copy Markdown
Member

It's a little bit jarring that when a call number value is blank, we display a call number label with no value. This adds a "no call number" value that is used when call number is absent. It's a translation string, so it can be easily customized for a different experience.

Perhaps hiding the label would be a better solution, but that would add more complexity.

I'm open to opinions on this!

Copy link
Copy Markdown
Contributor

@EreMaijala EreMaijala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used to not lose the line break, so it wasn't that bad before, but I agree that this is better.

@@ -1,4 +1,6 @@
<?php if ($this->callnumberHandler): ?>
<?php if (strlen($this->displayCallnumber ?? '') === 0): ?>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<?php if (strlen($this->displayCallnumber ?? '') === 0): ?>
<?php if ('' === (string)($this->displayCallnumber ?? '')): ?>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe even trim instead of cast?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants