aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/base/notifier/notification.html
blob: 603edea230584116ffec1a6db0c68fecc4c97d66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* 
{% extends "layout.html" %}
{% block extrahead %}
<base target="_parent">
{% endblock %}

{% block basecontent %}
<script>
    function send_request(post_data){
        var form = $("#notification_action_form");
        var formData = form.serialize() + '&' + post_data + '=true';
        var req = new XMLHttpRequest();
        req.open("POST", ".", false);
        req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        req.onerror = function() { alert("problem occurred while trying to cancel current workflow"); }
        req.onreadystatechange = function() { if(req.readyState === 4){
            window.top.location.href += '';
        }};
        req.send(formData);
    }
    function delete_notification()
    {
        send_request("delete");
    }
    function mark_unread()
    {
        send_request("unread");
    }
</script>

<div class="d-flex justify-content-between border-bottom">
  <span class="h3">{{notification.title}}</span>
  <div class="btn_group">
      <button class="btn btn-primary inbox-btn" onclick="mark_unread()">Mark Unread</button>
      <button class="btn btn-danger inbox-btn" onclick="delete_notification()">Delete</button>
  </div>
</div>

<p class="content-divider"></p>

{% if not notification.is_html %}
<pre>
{% endif %}
    {{notification.content|safe}}
{% if not notification.is_html %}
</pre>
{% endif %}
<form id="notification_action_form" action="." method="post">
    {% csrf_token %}
</form>
{% endblock %}