diff --git a/themes/fid_adlr/scss/compiled.scss b/themes/fid_adlr/scss/compiled.scss index 699527c3e3b10fcc1bd781f1a3d658e8633752ba..5027e5bac02a3db33af4fd8cda92a3f57b7f4435 100644 --- a/themes/fid_adlr/scss/compiled.scss +++ b/themes/fid_adlr/scss/compiled.scss @@ -677,6 +677,26 @@ a { // ++ DROPDOWNS - END // ++ MODALS + +// set style for buttons in dropdown for delete favorites in edit mode +.form-list-edit .dropdown { + button { + background: transparent; + border: none; + color: $black; + text-decoration: none; + padding: 3px 20px; + text-align: left; + width: 100%; + + &:hover, + &:focus { + color: #262626; + background-color: #f5f5f5; + } + } +} + // ++ MODALS - END // PAGE ELEMENTS (Top --> Down) ++ @@ -2030,7 +2050,7 @@ input.searchForm_lookfor { color: $asphalt; @media (min-width: $screen-xl-min) { - width: 80%; + width: 75%; } .result-formats { @@ -2101,8 +2121,12 @@ input.searchForm_lookfor { // move favorites and other icons to the right text-align: right; + a { + padding: .5em 0; + } + @media screen and (min-width: $screen-xl-min) { - width: 20%; + width: 25%; } .save-record, diff --git a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/list-entry.phtml b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/list-entry.phtml index 84298c319e9307727bc3cfd0ff2491cbefafae26..74c802dfd79cb7aa0df22832c24801d639a5a829 100644 --- a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/list-entry.phtml +++ b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/list-entry.phtml @@ -216,9 +216,9 @@ if ($cover): <div class="result-links hidden-print"> <?php /* finc: next line finc-specific; required to display public favorites lists, #12052, see also above - CK */ ?> <?php if ($isEditable): ?> - <i class="fa fa-fw fa-edit" aria-hidden="true"></i> <a - href="<?=$this->url('myresearch-edit')?>?id=<?=urlencode($id)?>&source=<?=urlencode($source)?><?php if (null !== $list_id): ?>&list_id=<?=urlencode($list_id)?><?php endif; ?>" - class="edit tool" aria-label="<?=$this->transEsc('Edit').': '.$this->record($this->driver)->getTitleHtml()?>"><?=$this->transEsc('Edit')?></a><br/> + <?php /* #21900 use adlr-design by setting classname btn btn-link and move i-element inside of a-element; open in data-lightbox */ ?> + <a data-lightbox href="<?=$this->url('myresearch-edit')?>?id=<?=urlencode($id)?>&source=<?=urlencode($source)?><?php if (null !== $list_id): ?>&list_id=<?=urlencode($list_id)?><?php endif; ?>" + class="edit tool btn btn-link" aria-label="<?=$this->transEsc('Edit').': '.$this->record($this->driver)->getTitleHtml()?>"><i class="fa fa-fw fa-edit" aria-hidden="true"></i> <?=$this->transEsc('Edit')?></a><br/> <?php /* Use a different delete URL if we're removing from a specific list or the overall favorites: */ $deleteUrl = null === $list_id ? $this->url('myresearch-favorites') @@ -230,9 +230,9 @@ if ($cover): $dLabel = 'delete-label-' . preg_replace('[\W]', '-', $id); ?> <div class="dropdown"> - <i class="fa fa-fw fa-trash-o" aria-hidden="true"></i> - <a class="dropdown-toggle" id="<?=$dLabel?>" role="button" data-toggle="dropdown" href="<?=$deleteUrlGet?>" aria-label="<?=$this->transEsc('Delete').': '.$this->record($this->driver)->getTitleHtml()?>"> - <?=$this->transEsc('Delete')?> + <?php /* #21900 use adlr-design by setting classname btn btn-link and move i-element inside of a-element */ ?> + <a class="dropdown-toggle btn btn-link" id="<?=$dLabel?>" role="button" data-toggle="dropdown" href="<?=$deleteUrlGet?>" aria-label="<?=$this->transEsc('Delete').': '.$this->record($this->driver)->getTitleHtml()?>"> + <i class="fa fa-fw fa-trash-o" aria-hidden="true"></i> <?=$this->transEsc('Delete')?> </a> <ul class="dropdown-menu" role="menu" aria-labelledby="<?=$dLabel?>"> <li> diff --git a/themes/fid_adlr/templates/myresearch/bulk-action-buttons.phtml b/themes/fid_adlr/templates/myresearch/bulk-action-buttons.phtml index 11809ede9476a4fdc7f4298efa58d068e546f833..fefa52f4e878623f1d7c084ad5210b8a9843e98e 100644 --- a/themes/fid_adlr/templates/myresearch/bulk-action-buttons.phtml +++ b/themes/fid_adlr/templates/myresearch/bulk-action-buttons.phtml @@ -16,16 +16,17 @@ * Changed order of action buttons */ ?> <div class="btn-group"> - <input class="btn btn-default" type="submit" name="email" value="<?=$this->transEsc('Email this')?>" title="<?=$this->transEsc('email_selected')?>"/> + <?php /* #21900 use adlr-design by setting classname btn btn-primary to the following elements */ ?> + <input class="btn btn-primary" type="submit" name="email" value="<?=$this->transEsc('Email this')?>" title="<?=$this->transEsc('email_selected')?>"/> <?php $exportOptions = $this->export()->getActiveFormats('bulk'); if (count($exportOptions) > 0): ?> - <input class="btn btn-default" type="submit" name="export" value="<?=$this->transEsc('Export')?>" title="<?=$this->transEsc('export_selected')?>"/> + <input class="btn btn-primary" type="submit" name="export" value="<?=$this->transEsc('Export')?>" title="<?=$this->transEsc('export_selected')?>"/> <?php endif; ?> <?php /* refs #17652 remove delete button - GG */ ?> <?php /*if ((null !== $this->list && $this->list->editAllowed($user)) || null === $this->list && $user): ?> <input class="btn btn-default" id="<?=$this->idPrefix?>delete_list_items_<?=null !== $this->list ? $this->escapeHtmlAttr($this->list->id) : ''?>" type="submit" name="delete" value="<?=$this->transEsc('Delete')?>" title="<?=$this->transEsc('delete_selected')?>"/> <?php endif;*/ ?> <?php if ($this->cart()->isActive()): ?> - <input class="btn btn-default" id="<?=$this->idPrefix?>updateCart" type="submit" name="add" value="<?=$this->transEsc('Add to Book Bag')?>"/> + <input class="btn btn-primary" id="<?=$this->idPrefix?>updateCart" type="submit" name="add" value="<?=$this->transEsc('Add to Book Bag')?>"/> <?php endif; ?> </div> </div> diff --git a/themes/fid_adlr/templates/myresearch/edit.phtml b/themes/fid_adlr/templates/myresearch/edit.phtml new file mode 100644 index 0000000000000000000000000000000000000000..b3e68d08184d9a2410ad50856a4d52d311ee61a7 --- /dev/null +++ b/themes/fid_adlr/templates/myresearch/edit.phtml @@ -0,0 +1,118 @@ +<!-- fid_adlr - templates - myresearch - edit --> +<?php /* copied from bootstrap3 - added h1 for sr-only - #17596 - HR */?> + +<?php + // Set up page title: + $this->headTitle($this->translate('Edit') . ' : ' . $this->driver->getBreadcrumb()); + + // Set up breadcrumbs: + $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Edit') . '</li>'; +?> +<h1 class="sr-only"><?=$this->translate('Edit') . ' : ' . $this->driver->getBreadcrumb()?></h1> + +<div class="record"> + <h2><?=$this->escapeHtml($this->driver->getBreadcrumb())?></h2> + + <form class="form-list-edit" method="post" name="editForm"> + <?php if (empty($this->savedData)): ?> + <p class="alert alert-info"> + <?php if (isset($listFilter)): ?> + <?=$this->transEsc('The record you selected is not part of the selected list.') ?> + <?php else: ?> + <?=$this->transEsc('The record you selected is not part of any of your lists.') ?> + <?php endif; ?> + </p> + <?php else: ?> + <div class="list-edit-container"> + <?php foreach ($this->savedData as $i => $current): ?> + <fieldset class="list-edit-group"> + <h3><?=$this->transEsc('List') ?>: <?=$this->escapeHtml($current['listTitle'])?></h3> + <input type="hidden" name="lists[]" value="<?=$current['listId'] ?>"/> + <?php if ($this->usertags()->getMode() !== 'disabled'): ?> + <div class="form-group"> + <label class="control-label" for="edit_tags<?=$current['listId'] ?>"><?=$this->transEsc('Tags') ?>:</label> + <input type="text" name="tags<?=$current['listId'] ?>" id="edit_tags<?=$current['listId'] ?>" class="form-control" value="<?=$this->escapeHtmlAttr($current['tags'])?>"/> + <span class="help-block"><?=$this->transEsc("add_tag_note") ?></span> + </div> + <?php endif; ?> + <div class="form-group"> + <label class="control-label" for="edit_notes<?=$current['listId'] ?>"><?=$this->transEsc('Notes') ?>:</label> + <textarea class="form-control" id="edit_notes<?=$current['listId'] ?>" name="notes<?=$current['listId'] ?>" rows="3"><?=$this->escapeHtml($current['notes'])?></textarea> + </div> + <?php /* fid_adlr: use adlr-design by setting classname btn btn-link and move i-element inside of a-element #21900 */ ?> + + <?php /* Use a different delete URL if we're removing from a specific list or the overall favorites: */ + $list_id = $current['listId']; + $list_title = $current['listTitle']; + $source = $this->driver->getSourceIdentifier(); + $id = $this->driver->getUniqueId(); + + $deleteUrl = null === $list_id + ? $this->url('myresearch-favorites') + : $this->url('userList', ['id' => $list_id]); + $deleteUrlGet = $deleteUrl . '?delete=' . urlencode($id) . '&source=' . urlencode($source); + + /* #17712 not necessary to fetch items after deleting by ajax in controller */ + $deleteUrl .= '?layout=lightbox'; + $dLabel = 'delete-label-' . preg_replace('[\W]', '-', $id); + ?> + + <?php /* fid_adlr: show dropdown instead of modal for confirmation #21900 */ ?> + <div class="dropdown"> + <?php /* fid_adlr: use adlr-design by setting classname btn btn-link and move i-element inside of a-element #21900 */ ?> + <a class="dropdown-toggle btn btn-link" id="<?=$dLabel?>" role="button" data-toggle="dropdown" aria-label="<?=$this->transEsc('Delete').': '.$this->record($this->driver)->getTitleHtml()?>"> + <i class="fa fa-fw fa-trash-o" aria-hidden="true"></i> <?=$this->transEsc('Delete')?> + </a> + <ul class="dropdown-menu" role="menu" aria-labelledby="<?=$dLabel?>"> + <li> + <button href="javascript:document.getElementById('<?=$dLabel?>').focus();" title="<?= $this->transEsc('confirm_delete_brief') ?>" onClick="$.post( + '<?= $deleteUrl ?>', + { + 'delete':'<?= $this->escapeJs($id) ?>', + 'source':'<?= $this->escapeJs($source) ?>', + 'confirm':true + }, function(){ + $('input[value=<?=$id?>]').parent().remove(0); + <?php /* reset needed for possible old MyResearchController::mylistAction in instances withot clearMessages */ ?> + <?php if (null === $list_id) :?> + VuFind.lightbox.alert('<?= $this->transEsc('Item removed from favorites')?>', 'success'); + <?php else :?> + VuFind.lightbox.alert('<?= $this->transEsc('Item removed from list')?>', 'success'); + <?php endif; ?> + }).fail(function(data) { + $('.fa-spinner.fa-spin').removeClass('fa-spinner fa-spin').addClass('fa-trash-o'); + VuFind.lightbox.alert( + '<?= $this->transEsc('Delete') . ' ' . $this->transEsc('of') . ' ' . htmlspecialchars($this->record($this->driver)->getTitleHtml()) . ': ' . $this->transEsc('errorcode_error')?>', + 'danger' + ) + }); + $(this).closest('.dropdown').find('.fa-trash-o').removeClass('fa-trash-o').addClass('fa-spinner fa-spin');"> + <?= $this->transEsc('confirm_dialog_yes') ?> + </button> + </li> + <li><a><?=$this->transEsc('confirm_dialog_no')?></a></li> + </ul> + </div> + </fieldset> + <?php endforeach; ?> + </div> + <?php endif; ?> + <?php if (count($this->lists) > 0): ?> + <hr/> + <div class="form-group"> + <select name="addToList" class="form-control"> + <option value="-1">- <?=$this->transEsc('Add to another list')?> -</option> + <?php foreach ($this->lists as $listID => $listTitle): ?> + <option value="<?=$listID ?>"><?=$this->escapeHtml($listTitle) ?></option> + <?php endforeach; ?> + </select> + </div> + <?php endif; ?> + <?php if (!empty($this->savedData) || count($this->lists) > 0): ?> + <div class="form-group"> + <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Save') ?>" aria-label="<?=$this->transEsc('Save') ?>"/> + </div> + <?php endif; ?> + </form> +</div> +<!-- fid_adlr - templates - myresearch - edit - END -->