forum: better display of search results

This commit is contained in:
Antoine Bartuccio 2018-12-07 13:28:30 +01:00 committed by Skia
parent 107c6c196f
commit 65a0b7b2d4
2 changed files with 9 additions and 29 deletions

View File

@ -1476,24 +1476,6 @@ textarea {
}
}
}
.search-results {
width: 100%;
.result-box {
width: 100%;
}
.result-topic {
display: inline-block;
background: #9f9f9f;
width: 19%;
}
.result-message {
display: inline-block;
background: #dbdbdb;
width: 80%;
}
}
}
/*------------------------------SAS------------------------------------*/

View File

@ -1,22 +1,20 @@
{% extends "core/base.jinja" %}
{% from 'forum/macros.jinja' import display_message %}
{% from 'forum/macros.jinja' import display_message, display_search_bar %}
{% block content %}
<div id="forum">
{% if object_list|length != 0 %}
<br>
{{ display_search_bar() }}
<div class="search-results">
{% for m in object_list %}
{% if user.can_view(m) %}
<div class="result-box">
<div class="result-topic">
{{ m }}
</div>
<div class="result-message">
{{ m.message }}
</div>
</div>
{% endif %}
{{ display_message(m, user) }}
{% endfor %}
</div>
{% else %}
{% trans %}No result found{% endtrans %}
{% endif %}
</div>
{% endblock %}