From edbf616dc9b71632a4bfaee573c1479de9fbac7c Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Tue, 6 Jan 2015 15:24:53 -0500 Subject: [PATCH] More consistent/flexible rendering of expire/create dates. --- themes/blueprint/templates/myresearch/holds.phtml | 9 +++++++-- themes/blueprint/templates/myresearch/illrequests.phtml | 7 +++++-- .../templates/myresearch/storageretrievalrequests.phtml | 7 +++++-- themes/bootstrap3/templates/myresearch/holds.phtml | 9 +++++++-- themes/bootstrap3/templates/myresearch/illrequests.phtml | 7 +++++-- .../templates/myresearch/storageretrievalrequests.phtml | 7 +++++-- themes/jquerymobile/templates/myresearch/holds.phtml | 9 +++++++-- 7 files changed, 41 insertions(+), 14 deletions(-) diff --git a/themes/blueprint/templates/myresearch/holds.phtml b/themes/blueprint/templates/myresearch/holds.phtml index 34d6c2be38b..315252f88d9 100644 --- a/themes/blueprint/templates/myresearch/holds.phtml +++ b/themes/blueprint/templates/myresearch/holds.phtml @@ -108,8 +108,13 @@ <br /> <? endif; ?> - <strong><?=$this->transEsc('Created') ?>:</strong> <?=$this->escapeHtml($ilsDetails['create']) ?> | - <strong><?=$this->transEsc('Expires') ?>:</strong> <?=$this->escapeHtml($ilsDetails['expire']) ?> + <? if (!empty($ilsDetails['create'])): ?> + <strong><?=$this->transEsc('Created') ?>:</strong> <?=$this->escapeHtml($ilsDetails['create']) ?> + <? if (!empty($ilsDetails['expire'])): ?>|<? endif; ?> + <? endif; ?> + <? if (!empty($ilsDetails['expire'])): ?> + <strong><?=$this->transEsc('Expires') ?>:</strong> <?=$this->escapeHtml($ilsDetails['expire']) ?> + <? endif; ?> <br /> <? if (isset($this->cancelResults['items'])): ?> diff --git a/themes/blueprint/templates/myresearch/illrequests.phtml b/themes/blueprint/templates/myresearch/illrequests.phtml index 6180be3e6b5..54bca16280f 100644 --- a/themes/blueprint/templates/myresearch/illrequests.phtml +++ b/themes/blueprint/templates/myresearch/illrequests.phtml @@ -108,9 +108,12 @@ <br /> <? endif; ?> - <strong><?=$this->transEsc('Created') ?>:</strong> <?=$this->escapeHtml($ilsDetails['create']) ?> + <? if (!empty($ilsDetails['create'])): ?> + <strong><?=$this->transEsc('Created') ?>:</strong> <?=$this->escapeHtml($ilsDetails['create']) ?> + <? if (!empty($ilsDetails['expire'])): ?>|<? endif; ?> + <? endif; ?> <? if (!empty($ilsDetails['expire'])): ?> - | <strong><?=$this->transEsc('Expires') ?>:</strong> <?=$this->escapeHtml($ilsDetails['expire']) ?> + <strong><?=$this->transEsc('Expires') ?>:</strong> <?=$this->escapeHtml($ilsDetails['expire']) ?> <? endif; ?> <br /> diff --git a/themes/blueprint/templates/myresearch/storageretrievalrequests.phtml b/themes/blueprint/templates/myresearch/storageretrievalrequests.phtml index 9f99c4dbfec..dc092f7373e 100644 --- a/themes/blueprint/templates/myresearch/storageretrievalrequests.phtml +++ b/themes/blueprint/templates/myresearch/storageretrievalrequests.phtml @@ -108,9 +108,12 @@ <br /> <? endif; ?> - <strong><?=$this->transEsc('Created') ?>:</strong> <?=$this->escapeHtml($ilsDetails['create']) ?> + <? if (!empty($ilsDetails['create'])): ?> + <strong><?=$this->transEsc('Created') ?>:</strong> <?=$this->escapeHtml($ilsDetails['create']) ?> + <? if (!empty($ilsDetails['expire'])): ?>|<? endif; ?> + <? endif; ?> <? if (!empty($ilsDetails['expire'])): ?> - | <strong><?=$this->transEsc('Expires') ?>:</strong> <?=$this->escapeHtml($ilsDetails['expire']) ?> + <strong><?=$this->transEsc('Expires') ?>:</strong> <?=$this->escapeHtml($ilsDetails['expire']) ?> <? endif; ?> <br /> diff --git a/themes/bootstrap3/templates/myresearch/holds.phtml b/themes/bootstrap3/templates/myresearch/holds.phtml index 61d6bf3e329..5f5472fa337 100644 --- a/themes/bootstrap3/templates/myresearch/holds.phtml +++ b/themes/bootstrap3/templates/myresearch/holds.phtml @@ -118,8 +118,13 @@ <br /> <? endif; ?> - <strong><?=$this->transEsc('Created') ?>:</strong> <?=$this->escapeHtml($ilsDetails['create']) ?> | - <strong><?=$this->transEsc('Expires') ?>:</strong> <?=$this->escapeHtml($ilsDetails['expire']) ?> + <? if (!empty($ilsDetails['create'])): ?> + <strong><?=$this->transEsc('Created') ?>:</strong> <?=$this->escapeHtml($ilsDetails['create']) ?> + <? if (!empty($ilsDetails['expire'])): ?>|<? endif; ?> + <? endif; ?> + <? if (!empty($ilsDetails['expire'])): ?> + <strong><?=$this->transEsc('Expires') ?>:</strong> <?=$this->escapeHtml($ilsDetails['expire']) ?> + <? endif; ?> <br /> <? if (isset($this->cancelResults['items'])): ?> diff --git a/themes/bootstrap3/templates/myresearch/illrequests.phtml b/themes/bootstrap3/templates/myresearch/illrequests.phtml index ca2373fbfd4..d4e553991f0 100644 --- a/themes/bootstrap3/templates/myresearch/illrequests.phtml +++ b/themes/bootstrap3/templates/myresearch/illrequests.phtml @@ -114,9 +114,12 @@ <br /> <? endif; ?> - <strong><?=$this->transEsc('Created') ?>:</strong> <?=$this->escapeHtml($ilsDetails['create']) ?> + <? if (!empty($ilsDetails['create'])): ?> + <strong><?=$this->transEsc('Created') ?>:</strong> <?=$this->escapeHtml($ilsDetails['create']) ?> + <? if (!empty($ilsDetails['expire'])): ?>|<? endif; ?> + <? endif; ?> <? if (!empty($ilsDetails['expire'])): ?> - | <strong><?=$this->transEsc('Expires') ?>:</strong> <?=$this->escapeHtml($ilsDetails['expire']) ?> + <strong><?=$this->transEsc('Expires') ?>:</strong> <?=$this->escapeHtml($ilsDetails['expire']) ?> <? endif; ?> <br /> diff --git a/themes/bootstrap3/templates/myresearch/storageretrievalrequests.phtml b/themes/bootstrap3/templates/myresearch/storageretrievalrequests.phtml index 6d8c5440264..accbfa7066e 100644 --- a/themes/bootstrap3/templates/myresearch/storageretrievalrequests.phtml +++ b/themes/bootstrap3/templates/myresearch/storageretrievalrequests.phtml @@ -112,9 +112,12 @@ <br /> <? endif; ?> - <strong><?=$this->transEsc('Created') ?>:</strong> <?=$this->escapeHtml($ilsDetails['create']) ?> + <? if (!empty($ilsDetails['create'])): ?> + <strong><?=$this->transEsc('Created') ?>:</strong> <?=$this->escapeHtml($ilsDetails['create']) ?> + <? if (!empty($ilsDetails['expire'])): ?>|<? endif; ?> + <? endif; ?> <? if (!empty($ilsDetails['expire'])): ?> - | <strong><?=$this->transEsc('Expires') ?>:</strong> <?=$this->escapeHtml($ilsDetails['expire']) ?> + <strong><?=$this->transEsc('Expires') ?>:</strong> <?=$this->escapeHtml($ilsDetails['expire']) ?> <? endif; ?> <br /> diff --git a/themes/jquerymobile/templates/myresearch/holds.phtml b/themes/jquerymobile/templates/myresearch/holds.phtml index e17e5e0a0bc..5d705129400 100644 --- a/themes/jquerymobile/templates/myresearch/holds.phtml +++ b/themes/jquerymobile/templates/myresearch/holds.phtml @@ -102,8 +102,13 @@ <? endif; ?> <p> - <strong><?=$this->transEsc('Created') ?>:</strong> <?=$this->escapeHtml($ilsDetails['create']) ?> | - <strong><?=$this->transEsc('Expires') ?>:</strong> <?=$this->escapeHtml($ilsDetails['expire']) ?> + <? if (!empty($ilsDetails['create'])): ?> + <strong><?=$this->transEsc('Created') ?>:</strong> <?=$this->escapeHtml($ilsDetails['create']) ?> + <? if (!empty($ilsDetails['expire'])): ?>|<? endif; ?> + <? endif; ?> + <? if (!empty($ilsDetails['expire'])): ?> + <strong><?=$this->transEsc('Expires') ?>:</strong> <?=$this->escapeHtml($ilsDetails['expire']) ?> + <? endif; ?> </p> </div> <? if ($openAnchor): ?></a><? endif; ?> -- GitLab