{% extends "master.html" %}
{% block title %}{{username}}{% endblock %}
{%block tag %}users{% endblock %}
{% block content %}
<h2>{{ username }}</h2>
{% if total_page_repos %}
<table>
<tr>
<td>
{% if repopage > 1%}
<a href="{{ url_for('view_user', username=username) }}?repopage={{repopage - 1}}">
< Previous
</a>
{% else %}
< Previous
{% endif %}
</td>
<td>{{ repopage }} / {{ total_page_repos }}</td>
<td>
{% if repopage < total_page_repos %}
<a href="{{ url_for('view_user', username=username) }}?repopage={{repopage + 1}}">
Next >
</a>
{% else %}
Next >
{% endif %}
</td>
</tr>
</table>
{% endif %}
<section class="project_list">
<h3>Projects</h3>
<ul>
{% for repo in repos %}
<li>
<a href="{{ url_for('view_repo', repo=repo.name)}}">
{{ repo.name }}
</a>
<span class="commit_date">
</span>
</li>
{% endfor %}
</ul>
</section>
{% if total_page_forks %}
<table>
<tr>
<td>
{% if forkpage > 1%}
<a href="{{ url_for('view_user', username=username) }}?forkpage={{forkpage - 1}}">
< Previous
</a>
{% else %}
< Previous
{% endif %}
</td>
<td>{{ forkpage }} / {{ total_page_forks }}</td>
<td>
{% if forkpage < total_page_forks %}
<a href="{{ url_for('view_user', username=username) }}?forkpage={{forkpage + 1}}">
Next >
</a>
{% else %}
Next >
{% endif %}
</td>
</tr>
</table>
{% endif %}
{% if forks %}
<section class="fork_list">
<h3>Forked repos</h3>
<ul>
{% for repo in forks %}
<li>
<a href="{{ url_for('view_repo', username=username, repo=repo.name)}}">
{{ repo.name }}
</a>
<span class="commit_date">
{{ forks_obj[loop.index - 1] | lastcommit_date}}
</span>
</li>
{% endfor %}
</ul>
</section>
{% endif %}
{% endblock %}