src/Front/Templates/_includes/_search.html.twig line 1
{% from '@front_templates/_includes/_icons.html.twig' import search, chevronDown, close %}
{# TODO #}
{% set searchPage = front_service.PageByIdName('search_results', app.request.locale) %}
{% set isJournalSearch = journalTemplate|default(false) %}
{% if searchPage %}
<div class="header-area__full-screen header-area__full-screen--search js-search-area {% if isJournalSearch %}header-area__full-screen--search-journal{% endif %}">
<form class="search-form search-form--center" method="post" action="{{ isJournalSearch ? path('journal_search_results', {journalSlug: current_journal.Journal.slug}) : site_url_generator.Url('page', { slug: searchPage }) }}">
<h2 class="search-form__title">{{ 'T_GENERAL_SEARCH_TITLE'|trans }}</h2>
<p class="search-form__subtitle">{{ 'T_GENERAL_SEARCH_TEXT_SIMPLE'|trans }}{# wyszukiwanie proste #}</p>
<div class="search-form__input-wrapper">
<input class="search-form__input" type="text" id="search" name="text" value="{{ app.request.query.get('text') }}">
<label class="search-form__label" for="search">{{ 'T_GENERAL_SEARCH_TEXT_INPUT_PLACEHOLDER'|trans }}</label>
{{ search('T_SEARCH'|trans, 'black') }}
<span class="search-form__subinput">np. “cognitive architectures” AND 1993-200 NOT Urban</span>
</div>
<div class="search-form__advanced js-search-form__advanced">
{{ 'T_GENERAL_SEARCH_ADVANCED_SEARCH'|trans }}
<button type="button" class="search-form__toggle js-search-form__toggle">
<span>{{ 'T_EXPAND'|trans }}</span>
<span>{{ 'T_RETRACT'|trans }}</span>
{{ chevronDown('T_TOOGLE_SEARCH'|trans) }}
</button>
</div>
<div class="grid-form">
{% if not isJournalSearch %}
<div class="form__item">
<label for="title" class="form__label">{{ 'T_GENERAL_SEARCH_JOURNAL_TITLE'|trans }}</label>
<input type="text" id="title" name="journalTitle" class="form__input" value="{{ app.request.get('journalTitle') }}">
</div>
{% endif %}
<div class="form__item">
<label for="article-type" class="form__label">{{ 'T_GENERAL_SEARCH_ARTICLE_TYPE'|trans }}</label>
<select id="article-type" class="form__select" name="articleType">
<option value="" selected="">{{ 'T_GENERAL_SEARCH_ARTICLE_TYPE_ALL'|trans }}</option>
{% for articleType in search_util.articleTypes %}
<option value="{{ articleType.value }}" {% if app.request.get('articleType') == articleType.value %}selected{% endif %}>{{ articleType|trans_journal_enum }}</option>
{% endfor %}
</select>
</div>
<div class="form__item">
<label for="volume" class="form__label">{{ 'T_GENERAL_SEARCH_ISSUE_VOLUME_TITLE'|trans }}</label>
<input type="text" id="volume" name="issueTitle" class="form__input" value="{{ app.request.get('issueTitle') }}">
</div>
<div class="form__item">
<label for="ISSN" class="form__label">{{ 'T_GENERAL_SEARCH_ISSN'|trans }}</label>
<input type="text" id="ISSN" name="issn" class="form__input" value="{{ app.request.get('issn') }}">
<span class="form__subinput">{{ 'T_GENERAL_SEARCH_ISSN_HINT'|trans }}</span>
</div>
<div class="form__item">
<label for="article-title" class="form__label">{{ 'T_GENERAL_SEARCH_ARTICLE_TITLE'|trans }}</label>
<input type="text" id="article-title" name="articleTitle" class="form__input" value="{{ app.request.get('articleType') }}">
</div>
<div class="form__item">
<label for="DOI" class="form__label">{{ 'T_GENERAL_SEARCH_DOI'|trans }}</label>
<input type="text" id="DOI" name="doi" class="form__input" value="{{ app.request.get('doi') }}">
<span class="form__subinput">{{ 'T_GENERAL_SEARCH_DOI_HINT'|trans }}</span>
</div>
<div class="form__item">
<label for="author" class="form__label">{{ 'T_GENERAL_SEARCH_AUTHOR'|trans }}</label>
<input type="text" id="author" name="author" class="form__input" value="{{ app.request.get('author') }}">
</div>
<div class="form__item">
<label for="affiliation" class="form__label">{{ 'T_GENERAL_SEARCH_AUTHOR_AFFILIATION'|trans }}</label>
<input type="text" id="affiliation" name="authorAffiliation" class="form__input" value="{{ app.request.get('authorAffiliation') }}">
<span class="form__subinput">{{ 'T_GENERAL_SEARCH_AUTHOR_AFFILIATION_HINT'|trans }}</span>
</div>
<div class="form__item">
<label for="keywords" class="form__label">{{ 'T_GENERAL_SEARCH_KEYWORDS'|trans }}</label>
<input type="text" id="keywords" name="keywords" class="form__input" value="{{ app.request.get('keywords') }}">
</div>
<div class="form__item form__item--columns">
<label for="dateFrom" class="form__label">{{ 'T_GENERAL_SEARCH_PUBLISH_DATE'|trans }}</label>
<input type="date" id="dateFrom" name="releaseDateFrom" class="form__input" placeholder="{{ 'T_GENERAL_SEARCH_DATE_FROM_PLACEHOLDER'|trans }}">
<input type="date" name="releaseDateTo" class="form__input" placeholder="{{ 'T_GENERAL_SEARCH_DATE_TO_PLACEHOLDER'|trans }}">
</div>
</div>
<button type="submit" class="btn btn--purple"><span>{{ 'T_SEARCH'|trans }}</span></button>
</form>
</div>
<div class="close close--search"></div>
<button class="close close--search ico-light justify-c js-search-close">
{{ close('T_CLOSE_SEARCH'|trans, 'black') }}
</button>
{% endif %}