search pass two
This commit is contained in:
parent
312c61ef61
commit
13d4be8937
7 changed files with 63 additions and 11 deletions
|
@ -49,7 +49,15 @@
|
|||
<li><a href="{{ url_for('wiki.history', name=name) }}"><i class="fa fa-clock-o"></i> History</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<form class="navbar-form" role="search" action="{{ url_for('search.search') }}">
|
||||
<div class="form-group">
|
||||
<input name="q" type="text" class="form-control" placeholder="Search">
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
{% if current_user.is_authenticated() %}
|
||||
<li class="dropdown user-avatar">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
|
|
|
@ -1,4 +1,17 @@
|
|||
{% extends 'layout.html' %}
|
||||
{% block body %}
|
||||
|
||||
{% if results %}
|
||||
<div class="list-group">
|
||||
{% for r in results %}
|
||||
<a href="{{ url_for('wiki.page', name=r['name']) }}" class="list-group-item">
|
||||
<h4 class="list-group-item-heading">{{ r['name'] }}</h4>
|
||||
<p class="list-group-item-text">
|
||||
{{ r['content'][:100] }}
|
||||
</p>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
No Results Found
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue