aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/gn_editor_results_page.html
blob: 4f169a6648a0009dbb4442ebb95a421411790e5b (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
<section classs="row commit-content"  style="padding-top:25px">
    <div class="col-sm-10 col-sm-offset-1">
        {% if error %}
            <h1>
                Error-type: <mark style="font-family: 'Linux Libertine','Georgia','Times','Source Serif Pro',serif"><b><i>{{ error }}</i></b></mark>
            </h1>
            <h3>
                Error-message:
                <mark style="font-family: 'Linux Libertine','Georgia','Times','Source Serif Pro',serif"><b><i>{{ msg }}</i></b></mark>
            </h3>
        {% else %}
            <div>
                <div class="lead">
                    <h3>
                        Save results message:
                        <mark style="font-family: 'Linux Libertine','Georgia','Times','Source Serif Pro',serif"><b>
                            {% if status == '200' %}
                                <i>Everything is up to date; No changes to Save</i>
                            {% elif status == '201' %}
                                <i> Saved your changes Successfully </i>
                            {% else %}
                                {{ message }}
                            {% endif %}
                        </b></mark>
                    </h3>
                </div>
                <br />
                <h3>
                    New Edit Sha: <span class="lead">
                    <mark style="font-family: 'Linux Libertine','Georgia','Times','Source Serif Pro',serif"><b><i>{{ commit_sha }}</i></b></mark>
                </span>
            </h3>
            <br />
        </div>
    {% endif %}
    <br>
</div>
</section>
{% block js %}
    <script>
      var commitSha = "{{ commit_sha }}";
      if (commitSha !="" && commitSha!= undefined){
	  prev_commit = localStorage.getItem("gn_editor_sha")
          localStorage.setItem("gn_editor_sha", commitSha)
	  if (prev_commit !=  commitSha) {
	      //update the contennt
      htmx.find("#output").dispatchEvent(
          new CustomEvent("updateDataEvent", {
              bubbles: true,
              detail: {},
          }),
      );
   }}

    </script>
{% endblock %}