Skip to content
Snippets Groups Projects
Commit 7fcbde35 authored by Chris Hallberg's avatar Chris Hallberg Committed by Demian Katz
Browse files

MyResearch.

parent 7e97a9b2
No related merge requests found
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -175,6 +175,27 @@ footer {
.author-list { flex: 0 1 100%; }
}
/* ------ MyResearch ------ */
.form-login .btn-link ~ .btn-link { padding-left: 0; } // Login link spacing
.myresearch-menu a {
display: block;
padding: 10px 15px;
&:hover,
&:focus { background-color: @nav-link-hover-bg; }
.badge { float: right; }
}
.myresearch-menu a.active {
background-color: @brand-primary;
color: #fff;
.badge {
background-color: #fff;
color: @gray-darker;
}
}
.list-edit-container { .clearfix(); }
/* --- PubDateVis --- */
#dateVisColorSettings {
background-color: #fff; // background of box
......
......@@ -4,11 +4,9 @@
<? endif; ?>
<? $user = $this->auth()->isLoggedIn(); ?>
<div class="bulkActionButtons">
<div class="checkbox">
<label>
<input type="checkbox" name="selectAll" class="checkbox-select-all"/>
<?=$this->transEsc('select_page')?> | <?=$this->transEsc('with_selected')?>:
</label>
<div class="bulk-checkbox">
<input type="checkbox" name="selectAll" class="checkbox-select-all" id="myresearchCheckAll"/>
<label for="myresearchCheckAll"><?=$this->transEsc('select_page')?> | <?=$this->transEsc('with_selected')?>:</label>
</div>
<div class="btn-group">
<input class="btn btn-default" type="submit" name="email" value="<?=$this->transEsc('Email')?>" title="<?=$this->transEsc('email_selected')?>"/>
......
......@@ -19,7 +19,7 @@
<div class="checkbox">
<label>
<input type="checkbox" name="selectAll" class="checkbox-select-all"/>
<?=$this->transEsc('select_page')?> |
<?=$this->transEsc('select_page')?>
</label>
<input type="submit" class="btn btn-default" id="renewSelected" name="renewSelected" value="<?=$this->transEsc("renew_selected")?>" />
<input type="submit" class="btn btn-default" id="renewAll" name="renewAll" value="<?=$this->transEsc('renew_all')?>" />
......
......@@ -4,9 +4,6 @@
// 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>';
// Load Javascript dependencies into header:
$this->headScript()->appendFile("bulk_actions.js");
?>
<div class="record">
<h2><?=$this->escapeHtml($this->driver->getBreadcrumb())?></h2>
......@@ -21,31 +18,31 @@
<? endif; ?>
</p>
<? else: ?>
<? foreach ($this->savedData as $i=>$current): ?>
<fieldset>
<legend>
<a href="<?=$this->url('userList', ['id' => $current['listId']]) ?>?delete=<?=urlencode($this->driver->getUniqueId())?>&amp;source=<?=urlencode($this->driver->getSourceIdentifier())?>" id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>delete<?=$current['listId'] ?>" title="<?=$this->transEsc('confirm_delete')?>" class="close">&times;</a> <?=$this->transEsc('List') ?>: <?=$this->escapeHtml($current['listTitle'])?>
</legend>
<input type="hidden" name="lists[]" value="<?=$current['listId'] ?>"/>
<? if ($this->usertags()->getMode() !== 'disabled'): ?>
<div class="list-edit-container">
<? 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'] ?>"/>
<? 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>
<? endif; ?>
<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>
<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>
<? 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>
</fieldset>
<? if($i < count($this->savedData)-1): ?>
<hr/>
<? endif; ?>
<? endforeach; ?>
<a href="<?=$this->url('userList', ['id' => $current['listId']]) ?>?delete=<?=urlencode($this->driver->getUniqueId())?>&amp;source=<?=urlencode($this->driver->getSourceIdentifier())?>" id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>delete<?=$current['listId'] ?>" data-lightbox>
<i class="fa fa-trash"></i> <?=$this->transEsc('delete') /* TODO: replace with better string */ ?>
</a>
</fieldset>
<? endforeach; ?>
</div>
<? endif; ?>
<? if (count($this->lists) > 0): ?>
<hr />
<hr/>
<div class="form-group">
<select name="addToList" class="form-control">
<option value="-1">- <?=$this->transEsc('Add to another list')?> -</option>
......
......@@ -78,7 +78,7 @@
. '" 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']);
echo '<span class="title">' . $this->escapeHtml($ilsDetails['title']) . '</span>';
} else {
// Last resort -- indicate that no title could be found.
echo $this->transEsc('Title not available');
......@@ -158,7 +158,6 @@
<? if (isset($ilsDetails['cancel_link'])): ?>
<p><a href="<?=$this->escapeHtmlAttr($ilsDetails['cancel_link']) ?>"><?=$this->transEsc("hold_cancel") ?></a></p>
<? endif; ?>
</div>
<? if ($thumbnail && $thumbnailAlignment == 'right'): ?>
<?=$thumbnail ?>
......
......@@ -158,7 +158,6 @@
<? if (isset($ilsDetails['cancel_link'])): ?>
<p><a href="<?=$this->escapeHtmlAttr($ilsDetails['cancel_link']) ?>"><?=$this->transEsc("ill_request_cancel") ?></a></p>
<? endif; ?>
</div>
<? if ($thumbnail && $thumbnailAlignment == 'right'): ?>
<?=$thumbnail ?>
......
<h4><?=$this->transEsc('Your Account')?></h4>
<div class="list-group">
<div class="myresearch-menu">
<? if ($this->userlist()->getMode() !== 'disabled'): ?>
<a href="<?=$this->url('myresearch-favorites')?>" class="list-group-item<?=$this->active == 'favorites' ? ' active' : ''?>">
<a href="<?=$this->url('myresearch-favorites')?>"<?=$this->active == 'favorites' ? ' class="active"' : ''?>>
<i class="fa fa-fw fa-star" aria-hidden="true"></i> <?=$this->transEsc('Favorites')?>
</a>
<? endif; ?>
<? if ('ils-none' !== $this->ils()->getOfflineMode()): ?>
<? if ($this->ils()->checkCapability('getMyTransactions')): ?>
<a href="<?=$this->url('myresearch-checkedout')?>" class="list-group-item<?=$this->active == 'checkedout' ? ' active' : ''?>">
<a href="<?=$this->url('myresearch-checkedout')?>"<?=$this->active == 'checkedout' ? ' class="active"' : ''?>">
<i class="fa fa-fw fa-book" aria-hidden="true"></i> <?=$this->transEsc('Checked Out Items')?>
</a>
<? endif; ?>
<? if ($this->ils()->checkCapability('getMyHolds')): ?>
<a href="<?=$this->url('myresearch-holds')?>" class="list-group-item<?=$this->active == 'holds' ? ' active' : ''?>">
<a href="<?=$this->url('myresearch-holds')?>"<?=$this->active == 'holds' ? ' class="active"' : ''?>">
<i class="fa fa-fw fa-flag" aria-hidden="true"></i> <?=$this->transEsc('Holds and Recalls')?>
</a>
<? endif; ?>
<? if ($this->ils()->checkFunction('StorageRetrievalRequests')): ?>
<a href="<?=$this->url('myresearch-storageretrievalrequests')?>" class="list-group-item<?=$this->active == 'storageRetrievalRequests' ? ' active' : ''?>">
<a href="<?=$this->url('myresearch-storageretrievalrequests')?>"<?=$this->active == 'storageRetrievalRequests' ? ' class="active"' : ''?>">
<i class="fa fa-fw fa-archive" aria-hidden="true"></i> <?=$this->transEsc('Storage Retrieval Requests')?>
</a>
<? endif; ?>
<? if ($this->ils()->checkFunction('ILLRequests')): ?>
<a href="<?=$this->url('myresearch-illrequests')?>" class="list-group-item<?=$this->active == 'ILLRequests' ? ' active' : ''?>">
<a href="<?=$this->url('myresearch-illrequests')?>"<?=$this->active == 'ILLRequests' ? ' class="active"' : ''?>">
<i class="fa fa-fw fa-exchange" aria-hidden="true"></i> <?=$this->transEsc('Interlibrary Loan Requests')?>
</a>
<? endif; ?>
<? if ($this->ils()->checkCapability('getMyFines')): ?>
<a href="<?=$this->url('myresearch-fines')?>" class="list-group-item<?=$this->active == 'fines' ? ' active' : ''?>">
<a href="<?=$this->url('myresearch-fines')?>"<?=$this->active == 'fines' ? ' class="active"' : ''?>">
<i class="fa fa-fw fa-usd" aria-hidden="true"></i> <?=$this->transEsc('Fines')?>
</a>
<? endif; ?>
<? if ($this->ils()->checkCapability('getMyProfile')): ?>
<a href="<?=$this->url('myresearch-profile')?>" class="list-group-item<?=$this->active == 'profile' ? ' active' : ''?>">
<a href="<?=$this->url('myresearch-profile')?>"<?=$this->active == 'profile' ? ' class="active"' : ''?>">
<i class="fa fa-fw fa-user" aria-hidden="true"></i> <?=$this->transEsc('Profile')?>
</a>
<? endif; ?>
<? $user = $this->auth()->isLoggedIn(); if ($user && $user->libraryCardsEnabled()): ?>
<a href="<?=$this->url('librarycards-home')?>" class="list-group-item<?=$this->active == 'librarycards' ? ' active' : ''?>">
<a href="<?=$this->url('librarycards-home')?>"<?=$this->active == 'librarycards' ? ' class="active"' : ''?>">
<i class="fa fa-fw fa-barcode" aria-hidden="true"></i> <?=$this->transEsc('Library Cards')?>
</a>
<? endif; ?>
<? endif; ?>
<? if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?>
<a href="<?=$this->url('search-history')?>?require_login" class="list-group-item<?=$this->active == 'history' ? ' active' : ''?>">
<a href="<?=$this->url('search-history')?>?require_login"<?=$this->active == 'history' ? ' class="active"' : ''?>">
<i class="fa fa-fw fa-search" aria-hidden="true"></i> <?=$this->transEsc('history_saved_searches')?>
</a>
<? endif; ?>
<? if ($user = $this->auth()->isLoggedIn()): ?>
<a href="<?=$this->url('myresearch-logout')?>" class="list-group-item">
<a href="<?=$this->url('myresearch-logout')?>">
<i class="fa fa-fw fa-sign-out" aria-hidden="true"></i> <?=$this->transEsc("Log Out")?>
</a>
<? endif; ?>
</div>
<? if ($this->auth()->isLoggedIn() && $this->auth()->getManager()->supportsPasswordChange()): ?>
<h4><?=$this->transEsc('Preferences')?></h4>
<div class="list-group">
<a href="<?=$this->url('myresearch-changepassword') ?>" class="list-group-item<?=$this->active == 'newpassword' ? ' active' : ''?>">
<div class="myresearch-menu">
<a href="<?=$this->url('myresearch-changepassword') ?>"<?=$this->active == 'newpassword' ? ' class="active"' : ''?>">
<i class="fa fa-fw fa-lock" aria-hidden="true"></i> <?=$this->transEsc('Change Password') ?>
</a>
</div>
<? endif; ?>
<? if ($this->userlist()->getMode() !== 'disabled' && $user = $this->auth()->isLoggedIn()): ?>
<h4><?=$this->transEsc('Your Lists')?></h4>
<div class="list-group">
<a href="<?=$this->url('myresearch-favorites')?>" class="list-group-item<?=$this->active == 'favorites' ? ' active' : ''?>">
<div class="myresearch-menu">
<a href="<?=$this->url('myresearch-favorites')?>"<?=$this->active == 'favorites' ? ' class="active"' : ''?>">
<i class="fa fa-fw fa-star" aria-hidden="true"></i> <?=$this->transEsc('Your Favorites')?>
</a>
<? $lists = $user->getLists() ?>
<? foreach ($lists as $list): ?>
<a href="<?=$this->url('userList', ['id' => $list['id']])?>" class="list-group-item<?=$this->active == 'list' . $list['id'] ? ' active' : ''?>">
<?=$this->escapeHtml($list['title'])?>
<span class="badge"><?=$list->cnt?></span>
</a>
<a href="<?=$this->url('userList', ['id' => $list['id']])?>"<?=$this->active == 'list' . $list['id'] ? ' class="active"' : ''?>">
<?=$this->escapeHtml($list['title'])?>
<span class="badge"><?=$list->cnt ?></span>
</a>
<? endforeach; ?>
<a href="<?=$this->url('editList', ['id'=>'NEW'])?>" class="list-group-item">
<a href="<?=$this->url('editList', ['id'=>'NEW'])?>">
<i class="fa fa-fw fa-plus" aria-hidden="true"></i> <?=$this->transEsc('Create a List') ?>
</a>
</div>
......
......@@ -28,9 +28,19 @@
<?=$this->flashmessages()?>
<div class="<?=$this->layoutClass('mainbody')?>">
<div class="clearfix hidden-print">
<h2 class="pull-left flip"><?=$list ? $this->escapeHtml($list->title) : $this->transEsc("Your Favorites")?></h2>
<div class="pull-right flip">
<h2><?=$list ? $this->escapeHtml($list->title) : $this->transEsc("Your Favorites")?></h2>
<div class="search-header">
<? if ($recordTotal > 0): ?>
<?
$transParams = [
'%%start%%' => $this->localizedNumber($this->results->getStartRecord()),
'%%end%%' => $this->localizedNumber($this->results->getEndRecord()),
'%%total%%' => $this->localizedNumber($recordTotal)
];
?>
<span class="search-stats"><?=$this->translate('showing_items_of_html', $transParams); ?></span>
<? endif; ?>
<div class="search-controls">
<? if (isset($list)): ?>
<? if ($list->editAllowed($account->isLoggedIn())): ?>
<a href="<?=$this->url('editList', ['id' => $list->id]) ?>" class="btn btn-link"><i class="fa fa-edit" aria-hidden="true"></i> <?=$this->transEsc("edit_list")?></a>
......@@ -45,28 +55,14 @@
</div>
<? endif; ?>
<? endif; ?>
<? if ($recordTotal > 0): ?>
<?
$transParams = [
'%%start%%' => $this->localizedNumber($this->results->getStartRecord()),
'%%end%%' => $this->localizedNumber($this->results->getEndRecord()),
'%%total%%' => $this->localizedNumber($recordTotal)
];
?>
<?=$this->translate('showing_items_of_html', $transParams); ?>
<? endif; ?>
</div>
</div>
<? if ($list && !empty($list->description)): ?>
<p><?=$this->escapeHtml($list->description)?></p>
<? endif; ?>
<? if ($recordTotal > 0): ?>
<div class="resulthead">
<div class="pull-right flip">
<?=$this->render('search/controls/limit.phtml')?>
<?=$this->render('search/controls/sort.phtml')?>
</div>
</div>
<?=$this->render('search/controls/limit.phtml')?>
<?=$this->render('search/controls/sort.phtml')?>
<form class="form-inline" method="post" name="bulkActionForm" action="<?=$this->url('cart-myresearchbulk')?>" data-lightbox data-lightbox-onsubmit="bulkFormHandler">
<?=$this->context($this)->renderInContext('myresearch/bulk-action-buttons.phtml', ['idPrefix' => '', 'list' => isset($list) ? $list : null, 'account' => $this->account])?>
<? foreach ($this->results->getResults() as $i=>$current): ?>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment