summaryrefslogtreecommitdiffstats
path: root/src/templates/notifier/inbox.html
blob: ee0f27a15792238329c7b62d0886c1addfa8832e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{% extends "base.html" %}


{% load staticfiles %}

{% block content %}

<style media="screen">

  .inbox-panel {
    display: grid;
    grid-template-columns: 30% 70%;
  }

  .section-panel {
    padding: 10px;
  }

  .iframe-panel {
    padding: 0px;
    margin-top: 0px;
  }

  .card-container {
    box-shadow: 0 0 5px 2px #cccccc;
  }
  .card {
    height: 50px;
    position: relative;
    border-bottom: 1px solid #cccccc;
    padding: 10px;
    width: 100%;
    background-color: #ffffff;
    z-index: 5;
  }
  .selected-card {
    background-color: #f3f3f3;
  }

  .card:hover {
    box-shadow: 0px 0 5px 2px #cccccc;
    z-index: 6;
  }

  #inbox-iframe {
    height: calc(100vh - 130px);
  }

  .half_width {
    width: 50%;
  }
  .card-wrapper {
  }
</style>

<div class="inbox-panel">
  <div class="section-panel">
    <div class="card-container">
      {% for notification in notifier_messages  %}
        <div class="inbox-entry card" onclick="showmessage({{notification.id}}); setactive(this);">
          {{ notification }}
        </div>
      {% endfor %}
    </div>
  </div>
  <div class="iframe-panel inbox-expanded-view">
      <div class="inbox-iframe-div">
        <iframe id="inbox-iframe" src="notification/0" frameBorder="0" width="100%" height="100vh" scrolling="yes" onload="sizetoiframe(this);">Please select a notification</iframe>
      </div>
  </div>
</div>

<script type="text/javascript">
  $('#inbox-iframe').load(function() {
    sizetoiframe(this);
  })

  function showmessage(msg_id)
  {
    iframe = document.getElementById("inbox-iframe");
    iframe.src = "notification/" + msg_id;
  }

</script>

{% endblock %}