mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 03:43:42 -08:00
1aa023c736
(will look messy though, if all software names in DB aren't lower-cased.)
90 lines
6.6 KiB
HTML
90 lines
6.6 KiB
HTML
{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
|
|
{% extends 'themes/' + theme() + '/base.html' %}
|
|
{% else %}
|
|
{% extends "base.html" %}
|
|
{% endif %} %}
|
|
{% from 'bootstrap/form.html' import render_form %}
|
|
|
|
{% block app_content %}
|
|
<div class="row">
|
|
<div class="col mx-auto">
|
|
<div class="card mt-5" style="width: 500px; max-width: 100%;">
|
|
<div class="card-body p-6">
|
|
<div class="card-title">{{ _('Search for posts') }}</div>
|
|
<form action="" method="get" class="form" role="form">
|
|
<div class="form-group"><label class="form-control-label" for="search_term" aria-label="Search here">{{ _('Keyword') }} ({{ _('optional') }})</label>
|
|
<input autofocus="" class="form-control" id="search_term" name="q" type="search" value="">
|
|
</div>
|
|
<div class="form-group"><label class="form-control-label" for="community" aria-label="Restrict results by community">{{ _('Community') }}</label>
|
|
<select class="form-control form-select" id="community" name="community">
|
|
<option value="0">{{ _('All') }}</option>
|
|
{% for community in communities %}
|
|
<option value="{{ community.id }}">{{ community.display_name() }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="form-group"><label class="form-control-label" for="type" aria-label="Restrict results by type">{{ _('Type') }}</label>
|
|
<select class="form-control form-select" id="type" name="type">
|
|
<option value="0">{{ _('All') }}</option>
|
|
<option value="{{ POST_TYPE_ARTICLE }}">{{ _('Discussion') }}</option>
|
|
<option value="{{ POST_TYPE_LINK }}">{{ _('Link') }}</option>
|
|
<option value="{{ POST_TYPE_IMAGE }}">{{ _('Image') }}</option>
|
|
<option value="{{ POST_TYPE_VIDEO }}">{{ _('Video') }}</option>
|
|
<option value="{{ POST_TYPE_POLL }}">{{ _('Poll') }}</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group"><label class="form-control-label" for="language" aria-label="Restrict results by language">{{ _('Language') }}</label>
|
|
<select class="form-control form-select" id="language" name="language">
|
|
<option value="0">{{ _('All') }}</option>
|
|
{% for language in languages %}
|
|
<option value="{{ language.id }}">{{ language.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="form-group"><label class="form-control-label" for="software" aria-label="Restrict results by instance software">{{ _('Instance Software') }}</label>
|
|
<select class="form-control form-select" id="software" name="software">
|
|
<option value="">{{ _('All') }}</option>
|
|
{% for software in instance_software %}
|
|
{% if not software =='guppe groups' %}
|
|
<option value="{{ software }}">{{ software }}</option>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="form-group"><label class="form-control-label" for="type" aria-label="Sort results">{{ _('Sort by') }}</label>
|
|
<select class="form-control form-select" id="sort_by" name="sort_by">
|
|
<option value="">{{ _('Relevance') }}</option>
|
|
<option value="date">{{ _('Recent first') }}</option>
|
|
<option value="top">{{ _('Top') }}</option>
|
|
</select>
|
|
</div>
|
|
<input class="btn btn-primary btn-md" id="submit" name="submit" type="submit" value="Search">
|
|
</form>
|
|
<h6 class="mt-5">{{ _('Example searches:') }} </h6>
|
|
<table class="table">
|
|
<tr>
|
|
<td nowrap="nowrap"><p>{{ _('star wars') }}</p></td>
|
|
<td><p>{{ _('There is an implied "and" here. Results will have both words somewhere in them.') }}</p></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap="nowrap"><p>{{ _('star or wars') }}</p></td>
|
|
<td><p>{{ _('This will broaden the search to include results that contain any of the words.') }}</p></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap="nowrap"><p>{{ _('star -wars') }}</p></td>
|
|
<td><p>{{ _('To search for things containing "star" but not "wars" you can put a - before the word you want to exclude.') }}</p></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap="nowrap"><p>{{ _('"star wars"') }}</p></td>
|
|
<td><p>{{ _('Results will have exactly that phrase in them.') }}</p></td>
|
|
</tr>
|
|
</table>
|
|
<h6 class="mt-5">{{ _('Trying to add a communitiy or post from another instance?') }} </h6>
|
|
<p>{{ _('In many types of federated platforms you can put a URL of a post or community into the search in order to add it to your local instance. In PieFed the search is just for searching.') }}</p>
|
|
<p><a href="{{ url_for('community.add_remote') }}" class="btn btn-primary">{{ _('Add remote community') }}</a></p>
|
|
<p><a href="{{ url_for('search.retrieve_remote_post') }}" class="btn btn-primary">{{ _('Retrieve remote post') }}</a></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|