mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-12 23:05:12 +00:00
Updated "Search" pages with modern design.
This commit is contained in:
@ -4,55 +4,71 @@
|
|||||||
|
|
||||||
<form method="get" action="/search/">
|
<form method="get" action="/search/">
|
||||||
<input type="hidden" name="m" value="1">
|
<input type="hidden" name="m" value="1">
|
||||||
<div class="tblBasic">
|
<div class="row">
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="tblBasicGrey" width="590">
|
<div class="col-lg-6">
|
||||||
<tr>
|
<div class="input-group">
|
||||||
<td class="colFirst">Search for</td>
|
<input type="text" name="q" value="{{query}}" class="form-control" placeholder="Search for...">
|
||||||
<th class="colLast"><input type="text" name="q" value="{{query}}" /> <input type="submit" value="Search" /></th>
|
<span class="input-group-btn">
|
||||||
</tr>
|
<button class="btn btn-default" type="submit">
|
||||||
<tr>
|
<i class="fas fa-search"></i>
|
||||||
<td class="colFirstR">List:</td>
|
</button>
|
||||||
<td class="colLast"><select name="l">
|
</span>
|
||||||
<option value="">-- All lists</option>
|
</div><!-- /input-group -->
|
||||||
{%for l in lists %}
|
<div class="form-group">
|
||||||
{%ifchanged l.group%}
|
<label for="allsites">List:</label>
|
||||||
<option value="{{l.group.negid}}"{%if l.group.negid == listid%} SELECTED{%endif%}>-- {{l.group}}</option>
|
<select name="l">
|
||||||
{%endifchanged%}
|
<option value="">-- All lists</option>
|
||||||
<option value="{{l.id}}"{%if l.id == listid%} SELECTED{%endif%}>{{l}}</option>
|
{%for l in lists %}
|
||||||
{%endfor%}
|
{%ifchanged l.group%}
|
||||||
</select></td>
|
<option value="{{l.group.negid}}"{%if l.group.negid == listid%} SELECTED{%endif%}>-- {{l.group}}</option>
|
||||||
</tr>
|
{%endifchanged%}
|
||||||
<tr>
|
<option value="{{l.id}}"{%if l.id == listid%} SELECTED{%endif%}>{{l}}</option>
|
||||||
<td class="colFirstR">Post date:</td>
|
{%endfor%}
|
||||||
<td class="colLast"><select name="d">{%for d in dates%}
|
</select>
|
||||||
<option value="{{d.val}}"{%if d.val == dateval %} SELECTED{%endif%}>{{d.text}}</option>{%endfor%}
|
|
||||||
</select></td>
|
|
||||||
</tr>
|
|
||||||
<tr class="lastrow">
|
|
||||||
<td class="colFirst" align="right">Sort by:</td>
|
|
||||||
<td class="colLast"><select name="s">{%for s in sortoptions%}
|
|
||||||
<option value="{{s.val}}"{%if s.selected%} SELECTED{%endif%}>{{s.text}}</option>{%endfor%}
|
|
||||||
</select></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="search-lists">List:</label>
|
||||||
|
<select id="search-lists" class="custom-select" name="l">
|
||||||
|
<option value="">-- All lists</option>
|
||||||
|
{%for l in lists %}
|
||||||
|
{%ifchanged l.group%}
|
||||||
|
<option value="{{l.group.negid}}"{%if l.group.negid == listid%} SELECTED{%endif%}>-- {{l.group}}</option>
|
||||||
|
{%endifchanged%}
|
||||||
|
<option value="{{l.id}}"{%if l.id == listid%} SELECTED{%endif%}>{{l}}</option>
|
||||||
|
{%endfor%}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="search-postdate">Date:</label>
|
||||||
|
<select id="search-postdate" class="custom-select" name="d">{%for d in dates%}
|
||||||
|
<option value="{{d.val}}"{%if d.val == dateval %} SELECTED{%endif%}>{{d.text}}</option>{%endfor%}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="search-sortby">Sort By:</label>
|
||||||
|
<select id="search-sortby" class="custom-select" name="s">{%for s in sortoptions%}
|
||||||
|
<option value="{{s.val}}"{%if s.selected%} SELECTED{%endif%}>{{s.text}}</option>{%endfor%}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div><!-- /.col-lg-6 -->
|
||||||
|
</div><!-- /.row -->
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div id="pgSearchContent">
|
<div class="row">
|
||||||
{%if search_error %}
|
{%if search_error %}
|
||||||
<div>{{search_error}}</div>
|
<div>{{search_error}}</div>
|
||||||
{%else%}
|
{%else%}
|
||||||
<!-- docbot goes here -->
|
<!-- docbot goes here -->
|
||||||
{%if hitcount == 0 %}
|
{%if hitcount == 0 %}
|
||||||
<p>Your search for <strong>{{query}}</strong> returned no hits.</p>
|
<p>Your search for <b>{{query}}</b> returned no hits.</p>
|
||||||
{%else%}
|
{%else%}
|
||||||
<h2>Results {{firsthit}}-{{lasthit}} of {%if hitcount == 1000%}more than 1000{%else%}{{hitcount}}{%endif%}.</h2>
|
<h2>Results {{firsthit}}-{{lasthit}} of {%if hitcount == 1000%}more than 1000{%else%}{{hitcount}}{%endif%}.</h2>
|
||||||
{%if pagelinks %}Result pages: {{pagelinks|safe}}<br/><br/>{%endif%}
|
{%if pagelinks %}Result pages: {{pagelinks|safe}}<br/><br/>{%endif%}
|
||||||
{%for hit in hits %}
|
{%for hit in hits %}
|
||||||
{{forloop.counter0|add:firsthit}}. <a href="https://www.postgresql.org/message-id/{{hit.messageid}}">{{hit.subject}}</a> [{{hit.rank|floatformat:2}}]<br/>
|
{{forloop.counter0|add:firsthit}}. <a href="https://www.postgresql.org/message-id/{{hit.messageid}}">{{hit.subject}}</a> [{{hit.rank|floatformat:2}}]<br/>
|
||||||
From {{hit.author}} on {{hit.date}}.<br/>
|
From {{hit.author}} on {{hit.date}}.<br/>
|
||||||
{{hit.abstract|safe}}<br/>
|
{{hit.abstract|safe}}<br/>
|
||||||
<a href="https://www.postgresql.org/message-id/{{hit.messageid}}">https://www.postgresql.org/message-id/{{hit.messageid}}</a><br/>
|
<a href="https://www.postgresql.org/message-id/{{hit.messageid}}">https://www.postgresql.org/message-id/{{hit.messageid}}</a><br/>
|
||||||
<br/>
|
<br/>
|
||||||
{%endfor%}
|
{%endfor%}
|
||||||
{%if pagelinks %}Result pages: {{pagelinks|safe}}<br/><br/>{%endif%}
|
{%if pagelinks %}Result pages: {{pagelinks|safe}}<br/><br/>{%endif%}
|
||||||
|
@ -2,32 +2,38 @@
|
|||||||
{%block title%}Search results{%endblock%}
|
{%block title%}Search results{%endblock%}
|
||||||
{%block contents%}
|
{%block contents%}
|
||||||
|
|
||||||
|
<h1>Site Search <i class="fas fa-link"></i></h1>
|
||||||
<form method="get" action="/search/">
|
<form method="get" action="/search/">
|
||||||
{%if suburl%}
|
{%if suburl%}
|
||||||
<input type="hidden" name="u" value="{{suburl}}">
|
<input type="hidden" name="u" value="{{suburl}}">
|
||||||
{%endif%}
|
{%endif%}
|
||||||
<div class="tblBasic">
|
<div class="row">
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="tblBasicGrey" width="590">
|
<div class="col-lg-6">
|
||||||
<tr>
|
<div class="input-group">
|
||||||
<td class="colFirst">Search for</td>
|
<input type="text" name="q" value="{{query}}" class="form-control" placeholder="Search for...">
|
||||||
<th class="colLast"><input type="text" name="q" value="{{query}}" /> <input type="submit" value="Search" /></th>
|
<span class="input-group-btn">
|
||||||
</tr>
|
<button class="btn btn-default" type="submit">
|
||||||
<tr class="lastrow">
|
<i class="fas fa-search"></i>
|
||||||
<td class="colFirst"></td>
|
</button>
|
||||||
<td class="colLast"><input type="checkbox" name="a" value="1" {%if allsites%}checked="checked"{%endif%}/>Include community sites</td>
|
</span>
|
||||||
</tr>
|
</div><!-- /input-group -->
|
||||||
</table>
|
<div class="form-check search">
|
||||||
|
<input class="form-check-input" type="checkbox" value="" name="a" value="1" {%if allsites%}checked="checked"{%endif%} id="allsites">
|
||||||
|
<label class="form-check-label" for="allsites">
|
||||||
|
Include community sites
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
</div><!-- /.col-lg-6 -->
|
||||||
|
</div><!-- /.row -->
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div id="pgSearchContent">
|
{%if search_error %}
|
||||||
{%if search_error %}
|
<div>{{search_error}}</div>
|
||||||
<div>{{search_error}}</div>
|
{%else%}
|
||||||
{%else%}
|
<!-- docbot goes here -->
|
||||||
<!-- docbot goes here -->
|
{%if hitcount == 0 %}
|
||||||
{%if hitcount == 0 %}
|
<p>Your search for <b>{{query}}</b> returned no hits.</p>
|
||||||
<p>Your search for <strong>{{query}}</strong> returned no hits.</p>
|
{%else%}
|
||||||
{%else%}
|
|
||||||
<h2>Results {{firsthit}}-{{lasthit}} of {%if hitcount == 1000%}more than 1000{%else%}{{hitcount}}{%endif%}.</h2>
|
<h2>Results {{firsthit}}-{{lasthit}} of {%if hitcount == 1000%}more than 1000{%else%}{{hitcount}}{%endif%}.</h2>
|
||||||
{%if pagelinks %}Result pages: {{pagelinks|safe}}<br/><br/>{%endif%}
|
{%if pagelinks %}Result pages: {{pagelinks|safe}}<br/><br/>{%endif%}
|
||||||
{%for hit in hits %}
|
{%for hit in hits %}
|
||||||
@ -37,7 +43,6 @@
|
|||||||
<br/>
|
<br/>
|
||||||
{%endfor%}
|
{%endfor%}
|
||||||
{%if pagelinks %}Result pages: {{pagelinks|safe}}<br/><br/>{%endif%}
|
{%if pagelinks %}Result pages: {{pagelinks|safe}}<br/><br/>{%endif%}
|
||||||
{%endif%}
|
{%endif%}
|
||||||
{%endif%}
|
{%endif%}
|
||||||
</div>
|
|
||||||
{%endblock%}
|
{%endblock%}
|
||||||
|
Reference in New Issue
Block a user