| |
@@ -19,7 +19,8 @@
|
| |
<small>{% if repo.description %}{{ repo.description }}{%else%}<span class="text-muted">no description<span>{% endif %}</small>
|
| |
</div>
|
| |
<div class="project_metadata">
|
| |
- <div style="text-align:right;" class="p-r-1 text-muted"><span title="Forks" data-toggle="tooltip"><span class="oi" data-glyph="fork"></span>{{repo.forks|count}}</span></div>
|
| |
+ <span class="p-l-1"><small>created {{repo.date_created|humanize}}</small></span>
|
| |
+ <div style="text-align:right;" class="p-r-1 text-muted pull-xs-right"><span title="Forks" data-toggle="tooltip"><span class="oi" data-glyph="fork"></span>{{repo.forks|count}}</span></div>
|
| |
</div>
|
| |
</div>
|
| |
</div>
|
| |
@@ -54,10 +55,10 @@
|
| |
|
| |
{% macro render_repos(
|
| |
list, total, pagetitle, page, title, count, id,
|
| |
- username=None, hide=True) %}
|
| |
+ username=None, hide=True, sorting=None) %}
|
| |
|
| |
<section class="project_list container p-t-2" id="{{ id }}">
|
| |
- <h2 class=" m-b-1">{{
|
| |
+ <h2 class="m-b-1">{{
|
| |
title
|
| |
}} <span class="label label-default">{{ count }}</span>
|
| |
{%- if username -%}
|
| |
@@ -68,9 +69,43 @@
|
| |
</a>
|
| |
{%- endif -%}
|
| |
</h2>
|
| |
- {% if total and total > 1 %}
|
| |
- {{ pagination_link(pagetitle, page, total) }}
|
| |
- {% endif %}
|
| |
+ <div class="row">
|
| |
+ <div class="col-sm-6">
|
| |
+ {% if total and total > 1 %}
|
| |
+ {{ pagination_link(pagetitle, page, total) }}
|
| |
+ {% endif %}
|
| |
+ </div>
|
| |
+ <div class="col-sm-6 text-xs-right">
|
| |
+ <span class="btn-group">
|
| |
+ <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
| |
+ Sort
|
| |
+ </button>
|
| |
+ <div class="dropdown-menu">
|
| |
+ <a class="dropdown-item" href="{{
|
| |
+ url_for('browse_projects') }}">
|
| |
+ {% if not sorting or sorting == 'name'%}
|
| |
+ <span class="oi" data-glyph="check"></span>
|
| |
+ {%endif%}
|
| |
+ Name
|
| |
+ </a>
|
| |
+ <a class="dropdown-item" href="{{
|
| |
+ url_for('browse_projects', sorting='latest') }}">
|
| |
+ {% if sorting == 'latest'%}
|
| |
+ <span class="oi" data-glyph="check"></span>
|
| |
+ {%endif%}
|
| |
+ Date Created (most recent first)
|
| |
+ </a>
|
| |
+ <a class="dropdown-item" href="{{
|
| |
+ url_for('browse_projects', sorting='oldest') }}">
|
| |
+ {% if sorting == 'oldest'%}
|
| |
+ <span class="oi" data-glyph="check"></span>
|
| |
+ {%endif%}
|
| |
+ Date Created (oldest first)
|
| |
+ </a>
|
| |
+ </div>
|
| |
+ </span>
|
| |
+ </div>
|
| |
+ </div>
|
| |
<div class="row">
|
| |
{{ render_row(list) }}
|
| |
</div>
|
| |