|
@@ -0,0 +1,99 @@
|
|
|
+{% set page_title = "Search Results" %}
|
|
|
+{% set active_forum_nav=True %}
|
|
|
+
|
|
|
+{% extends theme("layout.html") %}
|
|
|
+{% block content %}
|
|
|
+ {% from theme('macros.html') import render_pagination %}
|
|
|
+
|
|
|
+ {% if results['user'] %}
|
|
|
+ <table class="table table-bordered" style="vertical-align: middle">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th colspan="7">
|
|
|
+ Users
|
|
|
+ </th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td colspan="2">Username</td>
|
|
|
+ <td>E-mail</td>
|
|
|
+ <td>Joined</td>
|
|
|
+ <td>Last seen</td>
|
|
|
+ <td>Post count</td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ {% for user in results['user'] %}
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ {% if user|is_online %}
|
|
|
+ <span class="label label-success">Online</span>
|
|
|
+ {% else %}
|
|
|
+ <span class="label label-default">Offline</span>
|
|
|
+ {% endif %}
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <a href="{{ user.url }}">{{ user.username }}</a>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <a href="mailto:{{ user.email }}">{{ user.email }}</a>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ {{ user.date_joined|format_date('%b %d %Y') }}
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ {%- if user.lastseen -%} {{ user.lastseen|time_since }} {%- else -%} Never seen {%- endif -%}
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ {{ user.post_count }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ {% endfor %}
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ {% if results['post'] %}
|
|
|
+ <table class="table table-bordered" style="vertical-align: middle">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th colspan="7">
|
|
|
+ Posts
|
|
|
+ </th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+
|
|
|
+ <tbody>
|
|
|
+
|
|
|
+ {% for post in results['post'] %}
|
|
|
+ <tr>
|
|
|
+ <td >
|
|
|
+ <span class="pull-right">
|
|
|
+ <strong>#{%- if posts.page == 1 -%} {{ loop.index }} {%- else -%} {{ loop.index + (posts.page - 1) * config["POSTS_PER_PAGE"] }} {%- endif -%}</strong>
|
|
|
+ </span>
|
|
|
+ <span class="pull-left">
|
|
|
+ <a href="
|
|
|
+ {%- if posts.page > 1 -%}
|
|
|
+ {{ topic.url }}?page={{ posts.page }}#pid{{ post.id }}
|
|
|
+ {%- else -%}
|
|
|
+ {{ topic.url }}#pid{{ post.id }}
|
|
|
+ {%- endif -%}
|
|
|
+ ">{{ post.date_created|format_date('%d %B %Y') }}</a>
|
|
|
+ {% if post.user_id and post.date_modified %}
|
|
|
+ <small>
|
|
|
+ (Last modified: {{ post.date_modified|format_date }} by
|
|
|
+ <a href="{{ url_for('user.profile', username=post.modified_by) }}">
|
|
|
+ {{ post.modified_by }}
|
|
|
+ </a>.)
|
|
|
+ </small>
|
|
|
+ {% endif %}
|
|
|
+ </span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ {% endfor %}
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+{% endblock %}
|