{% extends "default.html" %} {% block title %} {% trans %}Notifications{% endtrans %} {% endblock %} {% block breadcrumbs %}
  • {% trans %}Notifications{% endtrans %}
  • {% endblock %} {% block content %} {% if notifications %}
    {% for notification in notifications %}
    {% if notification.notification %} {{ notification.notification.timestamp | strftime("%A, %e %B %Y, %H:%M:%S") }} {% if notification.notification.data["type"] == "welcome" %}

    {% trans %}Welcome{% endtrans %}

    {% elif notification.notification.data["type"] == "commit" %} {% set commit = db.session.get(Commit, notification.notification.data["repo"] + "/" + notification.notification.data["commit"]) %}

    {{ commit.message | split("\n\n", 1) | first }}

    {% trans %}Commited by{% endtrans %} {{ commit.owner.username }} {% trans %}in{% endtrans %} {{ commit.repo.owner.username }}/{{ commit.repo.name }}

    {% elif notification.notification.data["type"] == "post" %} {% set post = db.session.get(Post, notification.notification.data["post"]) %}

    {{ post.subject }}

    {% trans %}Posted by{% endtrans %} {{ post.owner.username }} {% trans %}in{% endtrans %} {{ post.repo.owner.username }}/{{ post.repo.name }}

    {% elif notification.notification.data["type"] == "pr" %} {% set pr = db.session.get(PullRequest, notification.notification.data["pr"]|int) %}

    {{ pr.head_route }}:{{ pr.head_branch }} → {{ pr.base_route }}:{{ pr.base_branch }}

    {% trans %}Requested by{% endtrans %} {{ pr.owner.username }} {% trans %}in{% endtrans %} {{ pr.base.username }}/{{ pr.base.name }}

    {% elif notification.notification.data["type"] == "follow" %} {% set author = db.session.get(User, notification.notification.data["author"]) %}

    {{ author.username }}

    {% trans %}is now following you{% endtrans %}

    {% endif %} {% endif %}
    {% if notification.attention_level %} {% else %} {% endif %}
    {% endfor %} {% else %}

    {% trans %}When you get notifications, they'll be shown here.{% endtrans %}

    {% endif %} {% include "pagination.html" %}
    {% endblock %}