wownero-funding-system/funding/templates/user.html

70 lines
2.8 KiB
HTML
Raw Normal View History

2018-06-26 21:48:25 +00:00
{% extends "base.html" %}
{% block content %}
{% if user %}
<div class="container">
<div class="row">
<div class="col-lg-12">
2018-06-26 21:48:25 +00:00
<span class="form-text text-muted" style="margin-top: -2px;">
Proposals made by '{{user.username}}'
2018-06-26 21:48:25 +00:00
</span>
</div>
</div>
<div class="row">
<div class="col-lg-12">
2018-06-26 21:48:25 +00:00
{% if user.proposals %}
<table class="table table-proposal table-hover" style="margin-bottom:6px;">
<tbody>
<th>Proposal</th>
<th>Category</th>
<th>Target Amount</th>
<th>Amount Raised</th>
<th>Date</th>
{% for p in user.proposals | sort(attribute='date_added', reverse=True) %}
2018-06-26 21:48:25 +00:00
<tr>
<td><b><a href="/proposal/{{ p.id }}">{{ p.headline | truncate(42)}}</a></b></td>
<td><a href="/proposals?cat={{ p.category }}">{{ p.category |capitalize}}</a></td>
<td>{{p.funds_target}}</td>
<td>{{p.funds_progress | round(3, 'floor')}}%</td>
2018-06-26 21:48:25 +00:00
<td>{{ p.date_added.strftime('%Y-%m-%d') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
This user has not submitted any proposals yet.
{% endif %}
<hr>
</div>
</div>
<div class="row">
<div class="col-lg-12">
Comments made by {{user.username}}
{% if user.comments %}
<table class="table table-proposal table-hover" style="margin-bottom:6px;">
<tbody>
<th>Comment</th>
<th>Proposal</th>
<th>Date</th>
{% for y in user.comments | sort(attribute='date_added', reverse=True) %}
<tr>
<td><b><a href="/proposal/{{y.proposal.id}}#comment-{{ y.id }}">{{ y.message | truncate(32)}}</a></b></td>
<td><a href="/proposal/{{y.proposal.id}}">#{{y.proposal.id }} {{ y.proposal.headline | truncate(32) }}</a></td>
<td>{{ y.date_added.strftime('%Y-%m-%d') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
This user has not submitted any proposals yet.
2018-06-26 21:48:25 +00:00
{% endif %}
</div>
</div>
<br>
</div>
{% else %}
No user found by that name.
{% endif %}
<!-- /.container -->
{% endblock %}