diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2024-02-17 12:37:04 +0200 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2024-02-20 09:08:42 +0200 |
commit | b126bca04885c35e088e799385e85dfe8481ed54 (patch) | |
tree | 1543b26f4564b7d9a4c72abc93594d6e6cd7bba7 /web | |
parent | search: redirect to index upon empty search (diff) | |
download | soko-b126bca04885c35e088e799385e85dfe8481ed54.tar.gz soko-b126bca04885c35e088e799385e85dfe8481ed54.tar.bz2 soko-b126bca04885c35e088e799385e85dfe8481ed54.zip |
migrate package search page
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'web')
-rw-r--r-- | web/templates/packages/search.tmpl | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/web/templates/packages/search.tmpl b/web/templates/packages/search.tmpl deleted file mode 100644 index 894d372..0000000 --- a/web/templates/packages/search.tmpl +++ /dev/null @@ -1,73 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -{{template "head" .Header}} -<body> -{{template "header" .Header}} - -<div class="container mb-5"> - <div class="row"> - <div class="col-12"> - - - <h1 class="first-header">Search Results <small>for {{.Search}}</small> - <a title="Atom feed" href="/packages/search.atom?q={{.Search}}" class="kk-feed-icon"><span class="fa fa-fw fa-rss-square"></span></a></h1> - - {{ if .Packages }} - <div class="panel panel-default"> - <div class="panel-heading"> - Results 1—{{len .Packages}} of {{len .Packages}} - </div> - <div class="list-group"> - {{range .Packages}} - <a class="list-group-item list-group-item-action" href="/packages/{{.Atom}}"> - <h3 class="kk-search-result-header"><span class="text-muted">{{.Category}}/</span>{{.Name}}</h3> - {{ (index .Versions 0).Description}} - </a> - {{end}} - </div> - <!-- TODO paging - <div class="panel-footer"> - <div class="btn-group" role="group" aria-label="Result navigation"> - <%= link_to '< Prev', search_packages_path(q: params[:q], o: [@offset - PackageRepository.default_search_size, 0].max), class: 'btn btn-default' + (@offset > 0 ? '' : ' disabled') %> - <%= link_to 'Next >', search_packages_path(q: params[:q], o: @offset + PackageRepository.default_search_size), class: 'btn btn-default ' + ((@offset + PackageRepository.default_search_size) > @packages.total ? 'disabled' : '') %> - </div> - </div> - --> - - </div> - - <!-- TODO in head: alternate_feed_link(search_packages_url(format: :atom, params: request.query_parameters), t(:atom_feed)) --> - {{ else }} - <div class="jumbotron"> - <h2 class="site-welcome stick-top">Nothing found. :( Try again?</h2> - - <form action="/packages/search" method="get"> - <div class="typeahead__container"> - <div class="typeahead__field"> - <span class="typeahead__query"> - <input id="q" name="q" type="search" autocomplete="off" placeholder="Find Packages" aria-label="Find Packages" autofocus> - </span> - - <span class="typeahead__button"> - <button type="submit" title="Find" aria-label="Find"> - <span class="typeahead__search-icon"></span><span class="sr-only">Find</span> - </button> - </span> - </div> - </div> - </form> - </div> - {{end}} - - - </div> - </div> -</div> - - -{{template "footer" .Application }} - -<script src="/assets/index.js"></script> - -</body> -</html> |