{% block subnav %}{% endblock %}
{% if title %}
{{ title }}
{% endif %} {% block content %}{% endblock %} diff --git a/www/assets/gratipay.css.spt b/www/assets/gratipay.css.spt index 26b96b2531..30ea3a2ebe 100644 --- a/www/assets/gratipay.css.spt +++ b/www/assets/gratipay.css.spt @@ -53,7 +53,6 @@ @import "scss/fragments/accounts"; @import "scss/fragments/members"; -@import "scss/fragments/mini-user"; @import "scss/fragments/notifications"; @import "scss/fragments/pagination"; diff --git a/www/index.html.spt b/www/index.html.spt index 3400824913..6033f7df2b 100644 --- a/www/index.html.spt +++ b/www/index.html.spt @@ -104,7 +104,7 @@ page_id = "homepage" {{ team.name }} -
+
{{ i }}
·
-
-
-
-{% endblock %}
-
+{% from 'templates/list-participants.html' import list_participants with context %}
{% block content %}
- {% set usernames = results.get('usernames') %}
+
+
+ {% set usernames = zip(results.get('usernames', []), empty_excerpts()) %}
{% set statements = results.get('statements') %}
- {% set emails = results.get('emails') %}
+ {% set emails = zip(results.get('emails', []), empty_excerpts()) %}
{% set projects = results.get('projects') %}
{% if projects %}
-
-
{{ ngettext("Found a matching project name", - "Found matching project names", - len(projects)) }}
-
- {% for result in projects %}
-
-
-
- {{ result.name }}
+
+ {% for i, team in enumerate(projects, start=1) %}
+
{% endif %}
{% if usernames %}
-
{{ ngettext("Found a matching project", + "Found matching projects", + len(projects)) }}
+
+
+ {{ team.name }}
+
+
+ {{ i }}
+ ·
+ {{ status_icons[team.status]|safe }}{{ i18ned_statuses[team.status] }}
+
+ · {{ _("created {ago}",
+ ago=to_age(team.ctime, add_direction=True)) }}
+ ·
+ {{ _( "owned by {a}{owner}{_a}"
+ , owner='~'+team.owner
+ , a=(''|safe).format(team.owner)
+ , _a=''|safe
+ ) }}
+
-
+
+ {% if team.status == 'approved' %}
+
|
+
{{ ngettext("Found a matching username", - "Found matching usernames", - len(usernames)) }}
-
- {% for result in usernames %}
-
-
-
- {{ result.username }}
-
-
- {% endfor %}
-
+ {{ ngettext("Found a matching username", + "Found matching usernames", + len(usernames)) }}
+ {{ list_participants(usernames) }} {% endif %} {% if statements %} -
-
+ {{ ngettext("Found a matching user statement", - "Found matching user statements", - len(statements)) }}
- {% for result in statements %} -
- {{ avatar_img(result) }}
-
- {% endfor %}
-
- {{ result.username }}
- {% if len(result.excerpts) == 1 %}
-
- {{ - markdown.render(result.excerpts[0].excerpt) - }}- {% endif %} -
{{ ngettext("Found a matching user statement", + "Found matching user statements", + len(statements)) }}
+ {{ list_participants(statements, extract_statement) }} {% endif %} {% if emails %} -{{ ngettext("Found a matching email address", - "Found matching email addresses", - len(usernames)) }}
-
- {% for result in emails %}
-
-
-
- {{ result.username }}
-
-
- {% endfor %}
-
+ {{ ngettext("Found a matching email address", + "Found matching email addresses", + len(emails)) }}
+ {{ list_participants(emails, show_emails=True) }} {% endif %} {% if query and not (usernames or statements or emails or projects) %} -{{ _("Sorry, we didn't find anything matching your query.") }}
+{{ _("Sorry, we didn't find anything matching your query.") }}
{% endif %} {% endblock %} - -{% block scripts %} - -{% endblock %} [---] application/json via json_dump results