Add documentation on search operators.

(imported from commit 9ed5692685b52d6e4d4f1a59c1b4cc0fde252ff2)
This commit is contained in:
Tim Abbott 2013-12-02 16:51:03 -05:00
parent 2423c9bc15
commit d57404683f
4 changed files with 81 additions and 0 deletions

View File

@ -2040,6 +2040,14 @@ table.floating_recipient {
white-space: nowrap;
}
.operator_value {
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
color: red;
}
.operator {
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
}
#loading_more_messages_indicator {
margin: 10px;
}

View File

@ -74,6 +74,7 @@ var page_params = {{ page_params }};
</div><!--/right sidebar-->
</div><!--/row-->
{% include "zerver/keyboard_shortcuts.html" %}
{% include "zerver/search_operators.html" %}
{% include "zerver/markdown_help.html" %}
{% include "zerver/invite_user.html" %}
{% include "zerver/bankruptcy.html" %}

View File

@ -60,6 +60,11 @@
<i class="icon-vector-pencil"></i> Message formatting
</a>
</li>
<li title="Search operators">
<a href="#search-operators" role="button" data-toggle="modal">
<i class="icon-vector-search"></i> Search operators
</a>
</li>
<li class="divider"></li>
<li title="Desktop & mobile apps">
<a href="/apps" target="_blank" role="button">

View File

@ -0,0 +1,67 @@
<div class="modal hide" id="search-operators" tabindex="-1" role="dialog"
aria-labelledby="search-operators-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="search-operators-label">Search operators</h3>
</div>
<div class="modal-body">
<table class="table table-striped table-condensed table-rounded table-bordered" id="fmt_help_table">
<thead>
<tr>
<th>Operator</th>
<th>Effect</th>
</tr>
</thead>
<tr>
<td class="operator">stream:<span class="operator_value">stream</span></td>
<td class="definition">Narrow to messages on stream <span class="operator_value">stream</span></td>
</tr>
<tr>
<td class="operator">topic:<span class="operator_value">topic</span></td>
<td class="definition">Narrow to messages with topic <span class="operator_value">topic</span></td>
</tr>
<tr>
<td class="operator">pm-with:<span class="operator_value">email</span></td>
<td class="definition">Narrow to private messages with <span class="operator_value">email</span></td>
</tr>
<tr>
<td class="operator">near:<span class="operator_value">id</span></td>
<td class="definition">Center the view around message ID <span class="operator_value">id</span></td>
</tr>
<tr>
<td class="operator">id:<span class="operator_value">id</span></td>
<td class="definition">Narrow to just message ID <span class="operator_value">id</span></td>
</tr>
<tr>
<td class="operator">is:<span class="operator_value">property</span></td>
<td class="definition">Narrow to messages that
have property <span class="operator_value">property</span>. Possible
values
include <span class="operator">private</span>, <span class="operator">starred</span>,
and <span class="operator">mentioned</span></td>
</tr>
<tr>
<td class="operator">sender:<span class="operator_value">email</span></td>
<td class="definition">Narrow to messages sent by <span class="operator_value">email</span></td>
</tr>
<tr>
<td class="operator"><span class="operator_value">keyword</span></td>
<td class="definition">Search for <span class="operator_value">keyword</span> in the topic or message content</td>
</tr>
</table>
<p>You can use any combination of these search operators in a
single query. For example:</p>
<p>&nbsp; <span class="operator">stream:<span class="operator_value">streamname</span>
sender:<span class="operator_value">user@example.com</span>
<span class="operator_value">keyword</span></span></p>
<p>would search for messages sent
by <span class="operator_value">user@example.com</span> to stream
<span class="operator_value">streamname</span>
containing the keyword <span class="operator_value">keyword</span>.</p>
</div>
<div class="modal-footer">
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</div>