From 8ee5b1f30ed058e2229485f42a226d3981e13c31 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 25 Nov 2020 22:57:17 +0000 Subject: [PATCH] people: Update design of calls page Signed-off-by: Michael Tremer --- src/templates/people/calls.html | 26 ++-- src/templates/people/modules/cdr.html | 84 ++++++------- src/templates/people/modules/channels.html | 131 ++++++++++----------- 3 files changed, 116 insertions(+), 125 deletions(-) diff --git a/src/templates/people/calls.html b/src/templates/people/calls.html index f4059ca5..d26a6655 100644 --- a/src/templates/people/calls.html +++ b/src/templates/people/calls.html @@ -2,13 +2,21 @@ {% block title %}{{ account }} - {{ _("Calls") }}{% end block %} -{% block content %} -

{{ _("Calls") }}

+{% block container %} +
+
+

{{ _("Calls") }}

+ +

+ {{ locale.format_day(date) }} +

+
+
- {% module Channels(current_user) %} +
+
+ {% module Channels(current_user) %} -
{% end block %} diff --git a/src/templates/people/modules/cdr.html b/src/templates/people/modules/cdr.html index 456f8f2f..a810b15b 100644 --- a/src/templates/people/modules/cdr.html +++ b/src/templates/people/modules/cdr.html @@ -1,56 +1,48 @@ {% if cdr %} - - - - - - - + - {% for c in cdr %} - - - - - - {% end %} - -
{{ _("Duration") }}
- {% if c.direction == "inbound" %} - + {% if c.callee %} + {{ c.callee }} + {% else %} + {{ format_phone_number(c.callee_number) }} + {% end %} + {% elif c.direction == "outbound" %} + - - {% if c.callee %} - {{ c.callee }} - {% else %} - {{ format_phone_number(c.callee_number) }} - {% end %} - - {% elif c.direction == "outbound" %} - + {% if c.caller %} + {{ c.caller }} + {% else %} + {{ format_phone_number(c.caller_number) }} + {% end %} + {% end %} - - {% if c.caller %} - {{ c.caller }} - {% else %} - {{ format_phone_number(c.caller_number) }} - {% end %} - - {% end %} - -
+
    +
  • + {{ locale.format_date(c.time_start, relative=False) }} +
  • +
  • {% module MOS(c) %} -
- {{ locale.format_date(c.time_start, relative=False) }}
+ - {% if c.time_answered %} - {{ format_time(c.duration) }} - {% else %} - {{ _("Not Answered") }} - {% end %} -
+ {% if c.time_answered %} +
  • + {{ format_time(c.duration) }} +
  • + {% else %} +
  • + {{ _("Not Answered") }} +
  • + {% end %} + +
    + {% end %} + {% else %}

    {{ _("There are no calls") }} diff --git a/src/templates/people/modules/channels.html b/src/templates/people/modules/channels.html index 3a234434..0fb2f9d3 100644 --- a/src/templates/people/modules/channels.html +++ b/src/templates/people/modules/channels.html @@ -1,79 +1,76 @@ {% if channels %} -

    -
    -
    {{ _("Ongoing Calls") }}
    +
      + {% for chan in channels %} +
    • + {% if chan.direction == "inbound" %} + - - - {% for chan in channels %} - - + ({{ format_phone_number(chan.caller_number) }}) + {% end %} - - +
    • + {{ format_time(chan.duration) }} +
    • + + {% if chan.is_secure() %} +
    • + +
    • {% end %} - -
      - {% if chan.direction == "inbound" %} - + {% if chan.conference %} + + {{ _("Conference Room %s") % chan.conference.number }} + + {% elif chan.application == "echo" %} + {{ _("Echo Test") }} - {% if chan.conference %} - {{ _("Conference Room %s") % chan.conference.number }} + {% elif chan.application == "voicemail" %} + {{ _("Voicemail") }} - - ({{ _("One Participant", "%(num)s Participants", len(chan.conference)) % { "num" : len(chan.conference) } }}) - - {% elif chan.application == "echo" %} - {{ _("Echo Test") }} + {% elif chan.callee %} + {% if chan.callee %} + {{ chan.callee }} + {% else %} + {{ chan.callee_name }} + {% end %} - {% elif chan.application == "voicemail" %} - {{ _("Voicemail") }} + ({{ format_phone_number(chan.callee_number) }}) - {% elif chan.callee %} - {% if chan.callee %} - {{ chan.callee }} - {% else %} - {{ chan.callee_name }} - {% end %} - - ({{ format_phone_number(chan.callee_number) }}) - {% else %} - {{ format_phone_number(chan.called_number) }} - {% end %} - {% elif chan.direction == "outbound" %} - + {% else %} + {{ format_phone_number(chan.called_number) }} + {% end %} + {% elif chan.direction == "outbound" %} + - {% if chan.caller %} - {{ chan.caller }} - {% else %} - {{ chan.caller_name }} - {% end %} - - ({{ format_phone_number(chan.caller_number) }}) - {% end %} - -
      - - - {% if chan.is_secure() %} - - {% end %} + {% if chan.caller %} + {{ chan.caller }} + {% else %} + {{ chan.caller_name }} + {% end %} - {{ chan.codec }} - -
      - {% if chan.state == "ACTIVE" %} - {# Don't show anything #} - {% elif chan.state == "HELD" %} - {{ _("On Hold") }} - {% elif chan.state == "RINGING" %} - {{ _("Ringing") }} - {% else %} - {{ _("Unknown State: %s") % chan.state }} - {% end %} +
        + {% if chan.state == "ACTIVE" %} + {# Don't show anything #} + {% elif chan.state == "HELD" %} +
      • + {{ _("On Hold") }} +
      • + {% elif chan.state == "RINGING" %} +
      • + {{ _("Ringing") }} +
      • + {% else %} +
      • + {{ _("Unknown State: %s") % chan.state }} +
      • + {% end %} - {{ format_time(chan.duration) }} -
      -
    -
    + +
  • + {{ chan.codec }} +
  • + + + {% end %} + {% end %} -- 2.47.3