src/templates/people/groups.html \
src/templates/people/index.html \
src/templates/people/passwd.html \
- src/templates/people/search.html \
src/templates/people/sip.html \
src/templates/people/stats.html \
src/templates/people/subscribed.html \
+++ /dev/null
-{% extends "../base.html" %}
-
-{% block title %}{{ _("Search Results for \"%s\"") % q }}{% end block %}
-
-{% block container %}
- <div class="header">
- <div class="container">
- <h1>{{ _("Search Results") }}</h1>
-
- <p class="text-muted">
- {{ _("For '%s'") % q }}
- </p>
- </div>
- </div>
-
- <div class="container">
- <section>
- {% if accounts %}
- {% module AccountsList(accounts) %}
- {% else %}
- <p class="text-muted text-center my-5">
- {{ _("There are no results for \"%s\"") % q }}
- </p>
- {% end %}
- </section>
- </div>
-{% end block %}
(r"/groups", people.GroupsHandler),
(r"/groups/([a-z_][a-z0-9_-]{0,31})", people.GroupHandler),
(r"/register", auth.RegisterHandler),
- (r"/search", people.SearchHandler),
(r"/users/([a-z_][a-z0-9_-]{0,31})/calls/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", people.CallHandler),
(r"/users/([a-z_][a-z0-9_-]{0,31})/calls(?:/(\d{4}-\d{2}-\d{2}))?", people.CallsHandler),
(r"/users/([a-z_][a-z0-9_-]{0,31})/edit", people.UserEditHandler),
self.render("people/group.html", group=group)
-class SearchHandler(auth.CacheMixin, base.BaseHandler):
- @tornado.web.authenticated
- def get(self):
- q = self.get_argument("q")
-
- # Perform the search
- accounts = self.backend.accounts.search(q)
-
- # Redirect when only one result was found
- if len(accounts) == 1:
- self.redirect("/users/%s" % accounts[0].uid)
- return
-
- self.render("people/search.html", q=q, accounts=accounts)
-
-
class StatsHandler(auth.CacheMixin, base.BaseHandler):
@tornado.web.authenticated
def get(self):