From: Michael Tremer Date: Wed, 17 Oct 2018 14:07:01 +0000 (+0100) Subject: people: Complete redesign of base template X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d09d554ba93183656137b0b62640d25aa2395434;p=ipfire.org.git people: Complete redesign of base template A clear and useful sidebar is now telling the user with who we are dealing Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index a341c3d4..178798ec 100644 --- a/Makefile.am +++ b/Makefile.am @@ -160,6 +160,7 @@ templates_people_DATA = \ src/templates/people/search.html \ src/templates/people/sip.html \ src/templates/people/user.html \ + src/templates/people/user-base.html \ src/templates/people/user-edit.html \ src/templates/people/users.html diff --git a/src/templates/people/base.html b/src/templates/people/base.html index 8617dd33..44b3e913 100644 --- a/src/templates/people/base.html +++ b/src/templates/people/base.html @@ -12,14 +12,20 @@ {% end %} {% end block %} - -{% block content %} -
-
- {% block main %}{% end block %} -
- - {% block right %} -
- {{ current_user }} - -

- {{ current_user.name }} -

- -

- {% module SIPStatus(current_user) %} -

-
- {% end block %} -
-{% end block %} diff --git a/src/templates/people/call.html b/src/templates/people/call.html index cd87e746..ced44645 100644 --- a/src/templates/people/call.html +++ b/src/templates/people/call.html @@ -1,6 +1,6 @@ -{% extends "base.html" %} +{% extends "user-base.html" %} -{% block title %}{{ _("Call") }}{% end block %} +{% block title %}{{ account }} - {{ _("Call") }}{% end block %} {% block main %}
diff --git a/src/templates/people/calls.html b/src/templates/people/calls.html index 0045adf8..6fc51cf5 100644 --- a/src/templates/people/calls.html +++ b/src/templates/people/calls.html @@ -1,12 +1,12 @@ -{% extends "base.html" %} +{% extends "user-base.html" %} -{% block title %}{{ _("Calls") }}{% end block %} +{% block title %}{{ account }} - {{ _("Calls") }}{% end block %} {% block main %} +

{{ _("Calls") }}

+
-

{{ _("Calls on %s") % locale.format_day(date) }}

-
- - {% if account.can_be_managed_by(current_user) %} - - {% end %} -
+ {% end %}
{% end block %} - -{% block right %}{% end block %} diff --git a/src/templates/people/users.html b/src/templates/people/users.html index af6d92b0..914645e5 100644 --- a/src/templates/people/users.html +++ b/src/templates/people/users.html @@ -2,8 +2,12 @@ {% block title %}{{ _("Users") }}{% end block %} -{% block main %} -

{{ _("Users") }}

+{% block content %} +
+
+

{{ _("Users") }}

- {% module AccountsList() %} + {% module AccountsList() %} +
+
{% end block %} diff --git a/src/web/people.py b/src/web/people.py index ad15abf4..4f973884 100644 --- a/src/web/people.py +++ b/src/web/people.py @@ -74,13 +74,17 @@ class CallsHandler(base.BaseHandler): class CallHandler(base.BaseHandler): @tornado.web.authenticated def get(self, uid, uuid): + account = self.backend.accounts.get_by_uid(uid) + if not account: + raise tornado.web.HTTPError(404, "Could not find account %s" % uid) + call = self.backend.talk.freeswitch.get_call_by_uuid(uuid) if not call: raise tornado.web.HTTPError(404, "Could not find call %s" % uuid) # XXX limit - self.render("people/call.html", call=call) + self.render("people/call.html", account=account, call=call) class SearchHandler(base.BaseHandler):