diff --git a/themes/foundation5/scss/default.scss b/themes/foundation5/scss/default.scss index 122f85b7010a4d04de1e3ea987b943215dd77e8a..a755b79c918872942c19f5ad6e7ec4972161dc6e 100644 --- a/themes/foundation5/scss/default.scss +++ b/themes/foundation5/scss/default.scss @@ -183,9 +183,10 @@ ul { } } + // make sure it doesn't bleed through - fixme .active { -// background-color: $primary-color; -// color: $white !important; + background-color: $primary-color; + color: lighten($side-nav-link-color-active, 40%); z-index: 2; &:hover {background-color: lighten($secondary-color,5%);} @@ -915,17 +916,28 @@ img.recordcover { // SIDEBAR filters - "remove filters" .sidebar .filters { // first title reposition and borders - .title:first-of-type { border-left:1px solid $primary-color; border-right:1px solid $primary-color; border-top:1px solid $primary-color; padding-left: 1rem } + .title:first-of-type { + border-left:1px solid $primary-color; + border-right:1px solid $primary-color; + border-top:1px solid $primary-color; + padding-left: 1rem; + } // Sidebar filters highlight chosen filter ul.side-nav li .active { background-color: $primary-color; color: #fff; padding-left: 1rem; - span {padding-right:.27rem;padding-top:0;} - &:hover, &:focus { + + span { + padding-right: .27rem; + padding-top: 0; + } + + &:hover, + &:focus { background-color: lighten($primary-color,5%); color: invert($side-nav-link-color); - } + } } // Borders around remove-filters-button diff --git a/themes/foundation5/templates/admin/tags/checkbox.phtml b/themes/foundation5/templates/admin/tags/checkbox.phtml new file mode 100644 index 0000000000000000000000000000000000000000..838852bf5fb09ee096a927ef60c8dcefdc9def66 --- /dev/null +++ b/themes/foundation5/templates/admin/tags/checkbox.phtml @@ -0,0 +1,8 @@ +<!-- admin - tags - checkbox.phtml --> +<div class="checkbox"> + <label for="<?=$this->prefix?>checkbox_<?=$this->tag['id']?>"> + <input id="<?=$this->prefix?>checkbox_<?=$this->tag['id']?>" type="checkbox" name="ids[]" value="<?=$this->escapeHtmlAttr($this->tag['id'])?>" class="checkbox_ui"/> + <input type="hidden" name="idsAll[]" value="<?=$this->escapeHtmlAttr($this->tag['id'])?>" /> + </label> +</div> +<!-- admin - tags - checkbox.phtml - END --> \ No newline at end of file diff --git a/themes/foundation5/templates/admin/tags/home.phtml b/themes/foundation5/templates/admin/tags/home.phtml new file mode 100644 index 0000000000000000000000000000000000000000..fa16398d71d5dc147f59174cc28aad26893335bf --- /dev/null +++ b/themes/foundation5/templates/admin/tags/home.phtml @@ -0,0 +1,35 @@ +<!-- admin - tags - home.phtml --> +<? + // Set page title. + $this->headTitle($this->translate('VuFind Administration - Tag Management')); +?> +<div class="row"> + <div class="<?=$this->layoutClass('mainbody')?>"> + <h2><?=$this->translate('Tag Management')?></h2> + + <?=$this->render("admin/tags/menu.phtml")?> + + <h3><?=$this->translate('Statistics')?></h3> + <table> + <tr> + <th><?=$this->transEsc('total_users')?></th> + <th><?=$this->transEsc('total_resources')?></th> + <th><?=$this->transEsc('total_tags')?></th> + <th><?=$this->transEsc('unique_tags')?></th> + <th><?=$this->transEsc('anonymous_tags')?></th> + </tr> + <tr> + <td><?=$statistics['users']?></td> + <td><?=$statistics['resources']?></td> + <td><?=$statistics['total']?></td> + <td><?=$statistics['unique']?></td> + <td><?=$statistics['anonymous']?></td> + </tr> + </table> + </div> + + <div class="<?=$this->layoutClass('sidebar')?>"> + <?=$this->render("admin/menu.phtml")?> + </div> +</div> +<!-- admin - tags - home.phtml - END --> \ No newline at end of file diff --git a/themes/foundation5/templates/admin/tags/list.phtml b/themes/foundation5/templates/admin/tags/list.phtml new file mode 100644 index 0000000000000000000000000000000000000000..cd9ab0753b3d516cf99ef0b1be33fe7d800042f7 --- /dev/null +++ b/themes/foundation5/templates/admin/tags/list.phtml @@ -0,0 +1,112 @@ +<!-- admin - tags - list.phtml --> +<?php + // Set page title. + $this->headTitle($this->translate('VuFind Administration - Tag Management')); +?> + +<div class="row"> + <div class="<?=$this->layoutClass('mainbody')?>"> + <h2><?=$this->translate('Tag Management')?></h2> + <h3><?=$this->translate('List Tags')?></h3> + + <?=$this->render("admin/tags/menu.phtml")?> + + <?=$this->flashmessages()?> + + <div class="tagForm"> + <form action="<?= $this->url('admin/tags', array('action' => 'List'))?>" method="get"> + + <fieldset> + <legend><?=$this->translate('filter_tags')?></legend> + + <div class="row"> + <div class="medium-3 columns"> + <label for="user_id"><?=$this->translate('Username')?></label> + <select name="user_id" id="user_id"> + <option value="ALL"><?=$this->translate('All')?></option> + <? foreach($this->uniqueUsers as $user):?> + <option value="<?= $user['user_id'] ?>"<? if(isset($this->params['user_id']) && $user['user_id'] == $this->params['user_id']): ?> selected="selected"<? endif;?>> + <?=$user['username'] ?> + </option> + <? endforeach;?> + </select> + </div> + <div class="medium-3 columns"> + <label for="tag_id"><?=$this->translate('Tag')?></label> + <select name="tag_id" id="tag_id"> + <option value="ALL"><?=$this->translate('All')?></option> + <? foreach($this->uniqueTags as $tag):?> + <option value="<?= $tag['tag_id'] ?>"<? if(isset($this->params['tag_id']) && $tag['tag_id'] == $this->params['tag_id']): ?> selected="selected"<? endif;?>> + <?=$tag['tag'] ?> + </option> + <? endforeach;?> + </select> + </div> + <div class="medium-3 columns"> + <label for="resource_id"><?=$this->translate('Title')?></label> + <select name="resource_id" id="resource_id"> + <option value="ALL"><?=$this->translate('All')?></option> + <? foreach($this->uniqueResources as $resource):?> + <option value="<?= $resource['resource_id']; ?>" title="<?=$resource['title'] ?>"<? if(isset($this->params['resource_id']) && $resource['resource_id'] == $this->params['resource_id']): ?> selected="selected"<? endif;?>> + <?=$this->truncate($resource['title'], 80) ?> (<?=$resource['resource_id'] ?>) + </option> + <? endforeach;?> + </select> + </div> + <div class="medium-3 columns"> + <label for="taglistsubmit"> </label> + <input type="submit" id="taglistsubmit" value="<?=$this->transEsc('Filter')?>" class="button small"> + <? if((isset($this->params['user_id']) && !is_null($this->params['user_id'])) || (isset($this->params['tag_id']) && !is_null($this->params['tag_id'])) || (isset($this->params['resource_id']) && !is_null($this->params['resource_id']))):?> + <a href="<?= $this->url('admin/tags', array('action' => 'List')); ?>"><?=$this->translate('clear_tag_filter')?></a> + <? endif;?> + </div> + </div> + + </fieldset> + + </form> + </div> + + <? if(count($this->results) > 0):?> + <div class="tagsList"> + <form action="<?= $this->url('admin/tags', array('action' => 'Delete'))?>" method="post"> + <input type="hidden" name="user_id" value="<?=isset($this->params['user_id']) ? $this->params['user_id'] : '' ?>" /> + <input type="hidden" name="tag_id" value="<?=isset($this->params['tag_id']) ? $this->params['tag_id'] : '' ?>" /> + <input type="hidden" name="resource_id" value="<?=isset($this->params['resource_id']) ? $this->params['resource_id'] : '' ?>" /> + <input type="hidden" name="origin" value="list" /> + + <table> + <tr> + <th> </th> + <th><?=$this->translate('Username')?></th> + <th><?=$this->translate('Tag')?></th> + <th><?=$this->translate('Title')?></th> + </tr> + + <? foreach ($this->results as $tag): ?> + <tr> + <td><?=$this->render('admin/tags/checkbox', array('tag'=>$tag)) ; ?></td> + <td><?=$tag->username ?> (<?= $tag->user_id?>)</td> + <td><?=$tag->tag?> (<?= $tag->tag_id?>)</td> + <td><?=$tag->title?> (<?= $tag->resource_id?>)</td> + </tr> + <? endforeach;?> + </table> + + <input type="submit" name="deleteSelected" value="<?=$this->transEsc('delete_selected')?>" class="button small"> + <input type="submit" name="deletePage" value="<?=$this->transEsc('delete_page')?>" class="button small"> + <input type="submit" name="deleteFilter" value="<?=$this->transEsc('delete_all')?>" class="button small"> + + </form> + </div> + <?=$this->paginationControl($this->results, 'Sliding', 'Helpers/pagination.phtml', array('params' => $this->params))?> + <? else:?> + <p><?=$this->translate('tag_filter_empty')?></p> + <? endif;?> + </div> + + <div class="<?=$this->layoutClass('sidebar')?>"> + <?=$this->render("admin/menu.phtml")?> + </div> +</div> +<!-- admin - tags - list.phtml - END --> \ No newline at end of file diff --git a/themes/foundation5/templates/admin/tags/manage.phtml b/themes/foundation5/templates/admin/tags/manage.phtml new file mode 100644 index 0000000000000000000000000000000000000000..23756ecc370c81f521b1ae50602a121969773765 --- /dev/null +++ b/themes/foundation5/templates/admin/tags/manage.phtml @@ -0,0 +1,93 @@ +<!-- admin - tags - manage.phtml --> +<? + // Set page title. + $this->headTitle($this->translate('VuFind Administration - Tag Maintenance')); +?> +<div class="row"> + <div class="<?=$this->layoutClass('mainbody')?>"> + <h2><?=$this->translate('Tag Management')?></h2> + <h3><?=$this->translate('Manage Tags')?></h3> + + <?=$this->render("admin/tags/menu.phtml")?> + + <?=$this->flashmessages()?> + + <form action="<?= $this->url('admin/tags', array('action' => 'Manage'));?>" method="post" role="form"> + <div class="row"> + <label for="type" class="medium-2 columns"><?=$this->translate('delete_tags_by')?>:</label> + <div class="medium-6 columns"> + <select id="type" name="type"> + <option value="user" <? if("user" == $this->type) echo " selected=selected";?>><?=$this->translate('Username')?></option> + <option value="tag" <? if("tag" == $this->type) echo " selected=selected";?>><?=$this->translate('Tag')?></option> + <option value="resource" <? if("resource" == $this->type) echo " selected=selected";?>><?=$this->translate('Title')?></option> + </select> + </div> + <div class="medium-4 columns"> + <input type="submit" value="<?=$this->translate('Submit')?>" class="button small"/> + </div> + </div> + </form> + + <? if(false !== $this->type):?> + <form action="<?= $this->url('admin/tags', array('action' => 'Delete'))?>" method="post"> + <input type="hidden" name="origin" value="manage" /> + <input type="hidden" name="type" value="<?= $this->type; ?>" /> + <? if("user" == $type):?> + <div class="row"> + <label for="user_id" class="medium-2 columns"><?=$this->translate('Username')?></label> + <div class="medium-6 columns"> + <select name="user_id" id="user_id"> + <? foreach($this->uniqueUsers as $user):?> + <option value="<?= $user['user_id'] ?>"> + <?= $user['username'] ?> + </option> + <? endforeach;?> + </select> + </div> + <div class="medium-4 columns"> + <input type="submit" name="deleteFilter" value="<?=$this->translate('delete_tags')?>" class="button small"/> + </div> + </div> + <? elseif("tag" == $type):?> + <div class="row"> + <label for="tag_id" class="medium-2 columns"><?=$this->translate('Tag')?></label> + <div class="medium-6 columns"> + <select name="tag_id" id="tag_id"> + <? foreach($this->uniqueTags as $tag):?> + <option value="<?= $tag['tag_id'] ?>"> + <?= $tag['tag'] ?> + </option> + <? endforeach;?> + </select> + </div> + <div class="medium-4 columns"> + <input type="submit" name="deleteFilter" value="<?=$this->translate('delete_tags')?>" class="button small"/> + </div> + </div> + <? elseif("resource" == $type):?> + <div class="row"> + <label for="resource_id" class="medium-2 columns"><?=$this->translate('Title')?></label> + <div class="medium-6 columns"> + <select name="resource_id" id="resource_id"> + <? foreach($this->uniqueResources as $resource):?> + <option value="<?=$resource['resource_id'] ?>" title="<?=$resource['title'] ?>"> + <?=$this->truncate($resource['title'], 80) ?> (<?= $resource['resource_id'] ?>) + </option> + <? endforeach;?> + </select> + </div> + <div class="medium-4 columns"> + <input type="submit" name="deleteFilter" value="<?=$this->translate('delete_tags')?>" class="button small"/> + </div> + </div> + <? endif;?> + </form> + <? endif;?> + + </div> + + <div class="<?=$this->layoutClass('sidebar')?>"> + <?=$this->render("admin/menu.phtml")?> + </div> +</div> +<!-- admin - tags - manage.phtml - END --> \ No newline at end of file diff --git a/themes/foundation5/templates/admin/tags/menu.phtml b/themes/foundation5/templates/admin/tags/menu.phtml new file mode 100644 index 0000000000000000000000000000000000000000..bcc61572ef0d80f4250511e7aaf9a4885f1cc1d1 --- /dev/null +++ b/themes/foundation5/templates/admin/tags/menu.phtml @@ -0,0 +1,8 @@ +<!-- admin - tags - toolbar.phtml --> +<div class="toolbar"> + <dl class="nav sub-nav"> + <dd<?=strtolower($this->layout()->templateName) == "tagslist" ? ' class="active"' : ''?>><a href="<?=$this->url('admin/tags', array('action' => 'List'))?>"><?=$this->transEsc('List Tags')?></a></dd> + <dd<?=strtolower($this->layout()->templateName) == "tagsmanage" ? ' class="active"' : ''?>><a href="<?=$this->url('admin/tags', array('action' => 'Manage'))?>"><?=$this->transEsc('Manage Tags')?></a></dd> + </dl> +</div> +<!-- admin - tags - toolbar.phtml - END --> \ No newline at end of file diff --git a/themes/foundation5/templates/cart/export.phtml b/themes/foundation5/templates/cart/export.phtml index 28c2166fc8958b0dc79eca8e70070a5b3c525786..4b2e2791e8ffef781671b2c7697d238d41500f15 100644 --- a/themes/foundation5/templates/cart/export.phtml +++ b/themes/foundation5/templates/cart/export.phtml @@ -24,7 +24,7 @@ $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink <button type="button" class="button secondary small hide" data-dropdown="itemhide" aria-controls="itemhide" aria-expanded="false"> <?=count($this->records).' '.$this->transEsc('items') ?> </button> - <ul id="itemhide" class="f-dropdown" data-dropdown-content aria-hidden="true" tabindex="-1"> + <ul id="itemhide" class="f-dropdown open" data-dropdown-content aria-hidden="true" tabindex="-1"> <? foreach ($this->records as $current): ?> <li><?=$this->escapeHtml($current->getBreadcrumb())?></li> <? endforeach; ?> @@ -39,14 +39,15 @@ $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink <div class="medium-9 columns"> <select name="format" id="format" class="auto-width"> <? foreach ($this->exportOptions as $exportOption): ?> - <option value="<?=$this->escapeHtmlAttr($exportOption)?>"><?=$this->transEsc($this->export()->getLabelForFormat($exportOption))?></option> + <? if ($firstOption == null) $firstOption = $exportOption; ?> + <option value="<?=$this->escapeHtmlAttr($exportOption)?>"<? if($this->export()->needsRedirect($exportOption)): ?> data-redirect<? endif; ?>><?=$this->transEsc($this->export()->getLabelForFormat($exportOption))?></option> <? endforeach; ?> </select> </div> </div> <div class="row"> <div class="medium-9 columns medium-offset-3"> - <input class="button secondary small" type="submit" name="submit" value="<?=$this->transEsc('Export')?>"/> + <input class="button secondary small" type="submit" name="submit" value="<?=$this->transEsc('Export')?>" <? if($this->export()->needsRedirect($firstOption)): ?> data-lightbox-ignore<? endif; ?>/> </div> </div> </form> @@ -54,6 +55,14 @@ $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink <? $script = <<<JS $('button.button.hide').removeClass('hide'); + $('#itemhide').removeClass('open'); + $('#format').change(function exportFormatChange(e) { + if (this.selectedOptions[0].getAttribute('data-redirect') === null) { + $('.export.button').removeAttr('data-lightbox-ignore'); + } else { + $('.export.button').attr('data-lightbox-ignore', '1'); + } + }); JS; ?> <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET') ?> diff --git a/themes/foundation5/templates/devtools/deminify.phtml b/themes/foundation5/templates/devtools/deminify.phtml new file mode 100644 index 0000000000000000000000000000000000000000..daf211ce6f01a74cf93414a10be1ace95755a225 --- /dev/null +++ b/themes/foundation5/templates/devtools/deminify.phtml @@ -0,0 +1,39 @@ +<? + $this->headTitle('Deminifier'); +?> + +<h2>Deminifier</h2> + +<? if (!$min): ?> + <form method='POST'> + Minified text: + <textarea name="min"></textarea> + <input type="submit" /> + </form> +<? else: ?> + <h3>Minified Object</h3> + <pre><? print_r($min) ?></pre> +<? endif; ?> + +<? if ($results): ?> + <h3>Results Object</h3> + <p>Class: <?=get_class($results)?></p> +<? endif; ?> + +<? if ($query): ?> + <h3>Query Object</h3> + <pre><? print_r($query) ?></pre> +<? endif; ?> + +<? if ($backendParams || $queryParams): ?> + <h3>Backend Parameters</h3> + <? if ($queryParams): ?> + <h4>Query Parameters</h4> + <pre><? print_r($queryParams) ?></pre> + <? endif ; ?> + <? if ($backendParams): ?> + <h4>Non-query Parameters</h4> + <pre><? print_r($backendParams) ?></pre> + <? endif ; ?> +<? endif; ?> + diff --git a/themes/foundation5/templates/upgrade/getsourcedir.phtml b/themes/foundation5/templates/upgrade/getsourcedir.phtml index f8800a7e25c7b172930dd99872332f36c0032235..32fb4324f8c2d14c3488c3ad382a045ead3d4c93 100644 --- a/themes/foundation5/templates/upgrade/getsourcedir.phtml +++ b/themes/foundation5/templates/upgrade/getsourcedir.phtml @@ -13,7 +13,7 @@ $this->layout()->breadcrumbs = '<li><a href="' . $this->url('upgrade-home') . '" <input type="text" name="sourcedir"/> <input class="button secondary small" type="submit" aria-label="submit form"/> </form> <hr /> -<h3>Option 2: Upgrade from VuFind 2.x</h3> +<h3>Option 2: Upgrade from VuFind 2.x or newer</h3> <form class="form-inline" method="post" action="<?=$this->url('upgrade-getsourceversion')?>"> <p> Please enter the version number you are upgrading from (e.g. 2.0.1):