diff --git a/application/views/scripts/objects/table.phtml b/application/views/scripts/objects/table.phtml index c624f0c6..9dc88319 100644 --- a/application/views/scripts/objects/table.phtml +++ b/application/views/scripts/objects/table.phtml @@ -1,11 +1,12 @@ compact): ?>
tabs ?> -

escape($this->title) ?>

+ +

escape($this->title) ?>quickSearch ?>

addLink ?> -filterEditor && ! $this->filterEditor->getFilter()->isEmpty())): ?> +filterEditor && ! $this->filterEditor->getFilter()->isEmpty()): ?> filterEditor ?> table->getPaginator() ?> diff --git a/library/Director/Web/Controller/ActionController.php b/library/Director/Web/Controller/ActionController.php index c7fbab1f..bee7afbf 100644 --- a/library/Director/Web/Controller/ActionController.php +++ b/library/Director/Web/Controller/ActionController.php @@ -156,6 +156,21 @@ abstract class ActionController extends Controller return $this->view->tabs; } + protected function provideQuickSearch() + { + $htm = '
' + . '' + . '
'; + + $this->view->quickSearch = sprintf( + $htm, + $this->getRequest()->getUrl()->without('q')->without('page'), + $this->translate('Search...') + ); + + return $this; + } + protected function setViewScript($name) { $this->_helper->viewRenderer->setNoController(true); diff --git a/public/css/module.less b/public/css/module.less index 4e1b2416..3771f2d7 100644 --- a/public/css/module.less +++ b/public/css/module.less @@ -184,6 +184,35 @@ input[type=text], input[type=password], textarea, select { } } +form.quicksearch { + float: right; + + input.search { + width: 8em; + min-width: auto; + border: none; + background-size: 0.75em auto; + background-position: 0.5em 0.75em; + padding-left: 1.5em; + &:focus { + width: 16em; + .transition(width 0.5s ease); + border: none; + } + } +} + +h1 form.quicksearch { + font-size: 0.75em; + font-weight: normal; + padding-left: 1em; + float: none; +} + +#layout.twocols h1 form.quicksearch { + float: right; +} + ul.extensible-set { margin: 0; padding: 0;