mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
core, matmat: fix search form
This commit is contained in:
@ -6,33 +6,20 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<style type="text/css">
|
||||
.matmat_user {
|
||||
/*position: absolute;*/
|
||||
display: inline-block;
|
||||
width: 240px;
|
||||
height: 191px;
|
||||
top: 6px;
|
||||
left: 6px;
|
||||
overflow: hidden;
|
||||
border-width: 3px;
|
||||
border-style: solid;
|
||||
border-color: black;
|
||||
}
|
||||
</style>
|
||||
{% if result_exists %}
|
||||
<h2>{% trans %}User found{% endtrans %}</h2>
|
||||
<h2>{% trans %}Results{% endtrans %}</h2>
|
||||
<div class="matmat_results">
|
||||
{% for user in object_list %}
|
||||
|
||||
<div class="matmat_user">
|
||||
<a href="{{ url("core:user_profile", user_id=user.id) }}">
|
||||
{{ user_mini_profile(user) }}
|
||||
</a>
|
||||
</div>
|
||||
<a href="{{ url("core:user_profile", user_id=user.id) }}">
|
||||
{{ user_mini_profile(user) }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
<br><br>
|
||||
</div>
|
||||
{{ paginate(page_obj, paginator) }}
|
||||
<hr>
|
||||
{% endif %}
|
||||
<h2>{% trans %}Search user{% endtrans %}</h2>
|
||||
<h3>{% trans %}Search by profile{% endtrans %}</h3>
|
||||
@ -41,9 +28,9 @@
|
||||
{% for field in form %}
|
||||
{% if field.name not in ('phone', 'quick') %}
|
||||
<p>
|
||||
{{ field.errors }}
|
||||
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
|
||||
{{ field }}
|
||||
{{ field.errors }}
|
||||
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
|
||||
{{ field }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
@ -52,13 +39,13 @@
|
||||
<h3>{% trans %}Inverted search{% endtrans %}</h3>
|
||||
<form action="{{ url('matmat:search_reverse') }}" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
{{ form.phone.errors }}
|
||||
<label for="{{ form.phone.id_for_label }}">{{ form.phone.label }}</label>
|
||||
{{ form.phone }}
|
||||
{{ form.sex.as_hidden() }}
|
||||
<p><input type="submit" value="{% trans %}Search{% endtrans %}" /></p>
|
||||
</p>
|
||||
<p>
|
||||
{{ form.phone.errors }}
|
||||
<label for="{{ form.phone.id_for_label }}">{{ form.phone.label }}</label>
|
||||
{{ form.phone }}
|
||||
{{ form.sex.as_hidden() }}
|
||||
<p><input type="submit" value="{% trans %}Search{% endtrans %}" /></p>
|
||||
</p>
|
||||
</form>
|
||||
<h3>{% trans %}Quick search{% endtrans %}</h3>
|
||||
<form action="{{ url('matmat:search_quick') }}" method="post">
|
||||
|
Reference in New Issue
Block a user