{% macro render_row(items) -%} {% for repo in items %} {% if repo.is_fork %} {% set url = url_for('view_repo', username=repo.user.username, repo=repo.name) %} {% else %} {% set url = url_for('view_repo', repo=repo.name) %} {% endif %}
{% if repo.avatar_email %} {% else %}
{% endif %}
{{ repo.name }}
{% if repo.description %}{{ repo.description }}{%else%}no description{% endif %}
{% else %}

No projects found

{% endfor %} {%- endmacro %} {% macro pagination_link(pagetitle, page, total, sorting=None) -%} {% set prev_page = "%s?%s=%s" % (request.base_url, pagetitle, page - 1) %} {% set next_page = "%s?%s=%s" % (request.base_url, pagetitle, page + 1) %} {% if sorting %} {% set prev_page = "%s&sorting=%s" % (prev_page, sorting) %} {% set next_page = "%s&sorting=%s" % (next_page, sorting) %} {% endif %} {%- endmacro %} {% macro render_repos( list, total, pagetitle, page, title, count, id, username=None, hide=True, sorting=None) %}

{{ title }} {{ count }} {%- if username -%} {%- endif -%}

{% if total and total > 1 %} {{ pagination_link(pagetitle, page, total, sorting) }} {% endif %}
{{ render_row(list) }}
{% if total and total > 1 %} {{ pagination_link(pagetitle, page, total, sorting) }} {% endif %}
{% endmacro %} {% macro render_user_repos( list, total, pagetitle, page, title, count, id, username=None, hide=True) %}
{{ title }} {{ count }}
{% if total and total > 1 %} {{ pagination_link(pagetitle, page, total) }} {% endif %}
{% for repo in list %}
{{ repo.name }}
{% else %}

No projects found

{% endfor %}
{% if total and total > 1 %} {{ pagination_link(pagetitle, page, total) }} {% endif %}
{% endmacro %} {% macro repos_switch(all=True, hide=True) %} {% endmacro %} {% macro render_repos_as_card(list, total, name, pagetitle, page, total_page) %} {% if total_page and total_page > 1 %} {{ pagination_link(pagetitle, page, total_page) }} {% endif %}
{{name}} {{total}}
{% if list %}
{% for repo in list %}
{% if repo.is_fork %} {% set url = url_for('view_repo', username=repo.user.username, repo=repo.name) %} {% else %} {% set url = url_for('view_repo', repo=repo.name) %} {% endif %} {% if repo.avatar_email %} {% else %}
{% endif %}
{{ repo.name }}
{% if repo.description %}{{ repo.description }}{% else %}no description{% endif %}
{% endfor %}
{% else %}

No projects found

{% endif %}
{% if total_page and total_page > 1 %} {{ pagination_link(pagetitle, page, total_page) }} {% endif %} {% endmacro %} {% macro render_contributions_graph(username) %} {% if config.get('DATAGREPPER_URL') %}
Contributions View List
User activity graph
{% endif %} {% endmacro%}