diff options
-rwxr-xr-x | hemiptera | 2 | ||||
-rw-r--r-- | templates/bug.html | 41 | ||||
-rw-r--r-- | templates/buglist.html | 48 | ||||
-rw-r--r-- | templates/main_page.html | 25 |
4 files changed, 115 insertions, 1 deletions
@@ -195,7 +195,7 @@ def create_unconfirmed_bug(msg) : bugpath = os.path.join(basedir, "unconfirmed" , confid) fr = "confirm-bug@" + DOMAIN subject, _ = get_message_data(msg) - gen_message(confid,subject,fromaddr,fr) + gen_message("Your bug has been registered. To prevent spam, you need to confirm it by answering to this message with the following confirmation id: " + confid + ". Just hitting reply should work.",subject,fromaddr,fr) os.makedirs(bugpath) m = create_censored_message(msg) write_message(os.path.join(bugpath, "message"), m) diff --git a/templates/bug.html b/templates/bug.html new file mode 100644 index 0000000..7f58780 --- /dev/null +++ b/templates/bug.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<head> + <title> + Hemiptera Bugtracker at {{DOMAIN}} + </title> + <meta charset="utf-8"> + <link rel="stylesheet" type="text/css" href="/styles.css" > +</head> +<body> + <header> + <h1><a href="/"> Hemiptera Bugtracker at {{DOMAIN}}</a></h1> + <h2><a href="/{{prname}}" >{{prname}}</a></h2> + <h3 class="subject" > + {{ replies[0]["Subject"] }} + </h3> + Send replies to <a href="mailto:{{ bug.id }}@{{ DOMAIN }}" >{{ bug.id }}@{{ DOMAIN }}</a> + </header> + {% for i in replies %} + <div class="container"> + <div class="date {% if i["From"] == replies[0]["From"] %}op{% endif %}{% if i["From"] in devs %}dev{% endif %}"> + <img class="avatar" src="{{ i["Avatar"] }}" alt="avatar" /> From: {% if i["From"] == replies[0]["From"] %} OP {% elif i["From"] in devs %} Developer {% else %} Someone else {% endif %}<br> {{ i["Date"] }} + </div> + <div class="reply"> +<p>{{ i.get_body("plain").get_content().replace("\n", "</p><p>") }}</p> + </div> + </div> + {% endfor %} + {% if bug.closed %} + <div class="container"> + <div class="status-header date"> + <img class="avatar" src="/static/excl.png" alt="avatar" /> + <b>Status Update</b> <br> + {{ bug.closeddate }} + </div> + <div class="status-message reply"> + <i>This bug was closed.</i> + </div> + </div> + {% endif %} +</body> + diff --git a/templates/buglist.html b/templates/buglist.html new file mode 100644 index 0000000..3e69108 --- /dev/null +++ b/templates/buglist.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<head> + <title> + Hemiptera Bugtracker at {{DOMAIN}} + </title> + <meta charset="utf-8"> + <link rel="stylesheet" type="text/css" href="/styles.css" > +</head> +<body> + <header> + <h1> + <a href="/" >Hemiptera Bugtracker at {{DOMAIN}}</a> + </h1> + <h3> + Bugs in {{prname}} + </h3> + </header> + <table> + <thead> + <td>Id + <td>Name + <td>Number of replies + <td>Created + <td>Last Reply + <td>Status + </thead> + {% for i in bugs %} + <tr class="{% if i.closed %} closed {% endif %}" > + <td> + {{ i.id }} + <td> + <a href="/{{ prname }}/{{ i.id }}.html"> {{ i.subject }}</a> + <td> + {{ i.replies }} + <td title="{{ i.created }}"> + {{ i.nicecreated }} + <td title="{{ i.last_reply }}"> + {{ i.nicereply }} + <td> + {% if i.closed %} + closed + {% else %} + open + {% endif %} + </tr> + {% endfor %} + </table> +</body> diff --git a/templates/main_page.html b/templates/main_page.html new file mode 100644 index 0000000..e32cfd4 --- /dev/null +++ b/templates/main_page.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<head> + <title> + Hemiptera Bugtracker at {{DOMAIN}} + </title> + <meta charset="utf-8"> + <link rel="stylesheet" type="text/css" href="/styles.css" > +</head> +<body> + List of projects + <table> + <thead> + <td>Name + <td>Number of bugs + </thead> + {% for i in projects %} + <tr> + <td> + <a href="{{ i.name }}"> {{ i.name }}</a> + <td> + {{ i.count }} + </tr> + {% endfor %} + </table> +</body> |