18e381ea Andy McCall 1 month ago ↶
1
{% extends "base.html" %}
2
{% block title %}Notifications{% endblock %}
3
{% block content %}
4
< div class = " head " > < h1 > Notifications < small > {{ unread }} unread</ small > </ h1 > </ div >
5
{% if let Some(n) = notice %}< p class = " note " > {{ n }}</ p > {% endif %}
6
< div class = " bar " >
7
< form method = " post" action = " /notifications/read" > < input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" > < button type = " submit" class = " small " > MARK ALL READ</ button > </ form >
8
< form method = " post" action = " /settings/notifications" > < input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" > < label class = " small " > < input type = " checkbox" name = " email" value = " 1" {% if email_on %} checked {% endif %}> email me too</ label > < button type = " submit" class = " small " > SAVE</ button > </ form >
9
</ div >
10
{% if rows.is_empty() %}< p class = " empty " > Nothing yet. Watch a repository or take part in a thread and its events land here.</ p > {% else %}
11
< ul class = " rows " >
12
{% for n in rows %}
13
< li {% if !n.read %} class = " unread " {% endif %}> < div > < a class = " name " href = " {{ n.url }}" > {% if !n.read %}< span class = " sig sig-valid " > ●</ span > {% endif %}{{ n.title }}</ a > < p class = " small " > {{ n.kind }} · {{ n.actor }} · < time title = " {{ n.at_ms|when_i }}" > {{ n.at_ms|ago_i }}</ time > </ p > </ div >
14
< div class = " right " > {% if !n.read %}< form class = " tiny " method = " post" action = " /notifications/read" > < input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" > < input type = " hidden" name = " id" value = " {{ n.id }}" > < button > read</ button > </ form > {% endif %}</ div > </ li >
15
{% endfor %}
16
</ ul >
17
{% endif %}
18
{% endblock %}