From caebab30236a68407e05048c50efdbd86471b3b0 Mon Sep 17 00:00:00 2001 From: Chris Hallberg <crhallberg@gmail.com> Date: Tue, 17 Dec 2013 11:09:01 -0500 Subject: [PATCH] Bootprint holds and renew bug fixes. --- .../templates/myresearch/checkedout.phtml | 30 +++++++++---------- .../templates/myresearch/holds.phtml | 22 ++++++++++++-- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/themes/bootprint/templates/myresearch/checkedout.phtml b/themes/bootprint/templates/myresearch/checkedout.phtml index 7faf9b1daa5..2f737525d34 100644 --- a/themes/bootprint/templates/myresearch/checkedout.phtml +++ b/themes/bootprint/templates/myresearch/checkedout.phtml @@ -15,8 +15,8 @@ <? if ($this->renewForm): ?> <form name="renewals" action="" method="post" id="renewals"> <div class="toolbar"> - <button type="submit" class="btn btn-link" name="renewSelected"><i class="icon-renew"></i> <?=$this->transEsc("renew_selected")?></button> - <button type="submit" class="btn btn-link" name="renewAll"><i class="icon-renew-all"></i> <?=$this->transEsc('renew_all')?></button> + <button type="submit" class="btn btn-link" name="renewSelected" value="1"><i class="icon-renew"></i> <?=$this->transEsc("renew_selected")?></button> + <button type="submit" class="btn btn-link" name="renewAll" value="1"><i class="icon-renew-all"></i> <?=$this->transEsc('renew_all')?></button> </div> <? endif; ?> @@ -40,19 +40,19 @@ </div> <div class="span9"> <? - // If this is a non-missing Solr record, we should display a link: - if (is_a($resource, 'VuFind\\RecordDriver\\SolrDefault') && !is_a($resource, 'VuFind\\RecordDriver\\Missing')) { - $title = $resource->getTitle(); - $title = empty($title) ? $this->transEsc('Title not available') : $this->escapeHtml($title); - echo '<a href="' . $this->recordLink()->getUrl($resource) . - '" class="title">' . $title . '</a>'; - } else if (isset($ilsDetails['title']) && !empty($ilsDetails['title'])){ - // If the record is not available in Solr, perhaps the ILS driver sent us a title we can show... - echo $this->escapeHtml($ilsDetails['title']); - } else { - // Last resort -- indicate that no title could be found. - echo $this->transEsc('Title not available'); - } + // If this is a non-missing Solr record, we should display a link: + if (is_a($resource, 'VuFind\\RecordDriver\\SolrDefault') && !is_a($resource, 'VuFind\\RecordDriver\\Missing')) { + $title = $resource->getTitle(); + $title = empty($title) ? $this->transEsc('Title not available') : $this->escapeHtml($title); + echo '<a href="' . $this->recordLink()->getUrl($resource) . + '" class="title">' . $title . '</a>'; + } else if (isset($ilsDetails['title']) && !empty($ilsDetails['title'])){ + // If the record is not available in Solr, perhaps the ILS driver sent us a title we can show... + echo $this->escapeHtml($ilsDetails['title']); + } else { + // Last resort -- indicate that no title could be found. + echo $this->transEsc('Title not available'); + } ?><br/> <? $listAuthor = $resource->getPrimaryAuthor(); if (!empty($listAuthor)): ?> <?=$this->transEsc('by')?>: diff --git a/themes/bootprint/templates/myresearch/holds.phtml b/themes/bootprint/templates/myresearch/holds.phtml index 3deaf9ecfa8..88c6bbdc1c0 100644 --- a/themes/bootprint/templates/myresearch/holds.phtml +++ b/themes/bootprint/templates/myresearch/holds.phtml @@ -14,9 +14,25 @@ <? if (!empty($this->recordList)): ?> <? if ($this->cancelForm): ?> - <form name="cancelForm" action="" method="post" id="cancelHold"> - <button type="submit" class="btn btn-link" name="cancelSelected" onClick="return confirm('<?=$this->translate("confirm_hold_cancel_selected_text") ?>')"><i class="icon-cancel-holds"></i> <?=$this->translate("hold_cancel_selected") ?></button> - <button type="submit" class="btn btn-link" name="cancelAll" onClick="return confirm('<?=$this->translate("confirm_hold_cancel_all_text") ?>')"><i class="icon-cancel-all-holds"></i> <?=$this->translate("hold_cancel_all") ?></button> + <form name="cancelForm" class="inline" action="" method="post" id="cancelHold"> + <input type="hidden" id="submitType" name="cancelSelected" value="1"/> + <input type="hidden" id="cancelConfirm" name="confirm" value="0"/> + <div class="btn-group"> + <button type="submit" id="cancelSelected" class="btn btn-link dropdown-toggle" data-toggle="dropdown" name="cancelSelected" value="1"><i class="icon-cancel-holds"></i> <?=$this->transEsc("hold_cancel_selected") ?></button> + <ul class="dropdown-menu"> + <li class="disabled"><a><?=$this->transEsc("confirm_hold_cancel_selected_text") ?></a></li> + <li><a href="#" onClick="$('#cancelConfirm').val(1);$('#submitType').attr('name','cancelSelected');$(this).parents('form').submit()"><?=$this->transEsc('confirm_dialog_yes') ?></a></li> + <li><a href="#"><?=$this->transEsc('confirm_dialog_no')?></a></li> + </ul> + </div> + <div class="btn-group"> + <button type="submit" id="cancelAll" class="btn btn-link dropdown-toggle" data-toggle="dropdown" name="cancelAll" value="1"><i class="icon-cancel-all-holds"></i> <?=$this->transEsc("hold_cancel_all") ?></button>> + <ul class="dropdown-menu"> + <li class="disabled"><a><?=$this->transEsc("confirm_hold_cancel_all_text") ?></a></li> + <li><a href="#" onClick="$('#cancelConfirm').val(1);$('#submitType').attr('name','cancelAll');$(this).parents('form').submit()"><?=$this->transEsc('confirm_dialog_yes') ?></a></li> + <li><a href="#"><?=$this->transEsc('confirm_dialog_no')?></a></li> + </ul> + </div> <? endif; ?> <? $iteration = 0; ?> -- GitLab