Admins can change proposal statuses, auto-add comment to the WFS when they do and changed some templates
parent
b34d06d49e
commit
4f92894f79
@ -0,0 +1,32 @@
|
||||
<div class="col-lg-8" style="padding-bottom: 0px;">
|
||||
<div class="row">
|
||||
<div class="form-group" style="text-align: center;">
|
||||
<div>
|
||||
<div data-toggle="buttons" class="btn-group btn-group-toggle">
|
||||
<label onclick="proposalNavbarclickDataHref(this);" data-href="{{ url_for('proposals', status=1) }}" class="btn btn-success {% if status == 1 %}active{% endif %}">
|
||||
Proposed <small>({{summary_data['statuses'][1]}})</small>
|
||||
</label>
|
||||
<label onclick="proposalNavbarclickDataHref(this);" data-href="{{ url_for('proposals', status=2) }}" class="btn btn-success {% if status == 2 %}active{% endif %}">
|
||||
Funding required <small>({{summary_data['statuses'][2]}})</small>
|
||||
</label>
|
||||
<label onclick="proposalNavbarclickDataHref(this);" data-href="{{ url_for('proposals', status=3) }}" class="btn btn-success {% if status == 3 %}active{% endif %}">
|
||||
Work in progress <small>({{summary_data['statuses'][3]}})</small>
|
||||
</label>
|
||||
<label onclick="proposalNavbarclickDataHref(this);" data-href="{{ url_for('proposals', status=4) }}" class="btn btn-success {% if status == 4 %}active{% endif %}">
|
||||
Completed <small>({{summary_data['statuses'][4]}})</small>
|
||||
</label>
|
||||
</div>
|
||||
<div id="point-wow-left">
|
||||
<img src="/static/point-left.png" style="margin-left: 10px;width: 60px;">
|
||||
<span style="color: #fc4dff;font-size: 16px;font-style: italic;font-weight: bold;margin-left: 6px;">wow</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if cat %}
|
||||
<small class="form-text text-muted" style="margin-top: -2px;">
|
||||
Results limited by category '{{cat}}'. <a href="{{ url_for('proposals', status=status) }}">Undo filter</a>.
|
||||
</small>
|
||||
<br>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,44 @@
|
||||
{% macro proposal_table(title, _proposals) %}
|
||||
<table class="table table-proposal table-hover" style="margin-bottom:6px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="font-size: x-large;">{{title}}</th>
|
||||
<th>Username</th>
|
||||
<th id="date">Date</th>
|
||||
{% if status >= 2 %}
|
||||
<th style="text-align: right;">Funding</th>
|
||||
{% else %}
|
||||
<th></th>
|
||||
{% endif %}
|
||||
<th style="display: table-cell;text-align: center;">
|
||||
<img width="24" src="/static/msg.png">
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for p in _proposals %}
|
||||
<tr>
|
||||
<td><b><a href="/proposal/{{ p.id }}">{{ p.headline }}</a></b></td>
|
||||
<td><a href="/user/{{ p.user.username }}">{{ p.user.username }}</a></td>
|
||||
<td id="date"><small>{{ p.date_added.strftime('%Y-%m-%d %H:%M') }}</small></td>
|
||||
<td>
|
||||
<span style="float:right;">
|
||||
{% if p.funds_progress >= 0.1 and status == 0 %}
|
||||
{{p.funds_progress|int}}%
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</span>
|
||||
</td>
|
||||
<td style="text-align:center;">
|
||||
{% if p.comment_count %}
|
||||
{{p.comment_count}}
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endmacro %}
|
@ -0,0 +1,37 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
{% from 'proposal/macros/table.html' import proposal_table %}
|
||||
|
||||
<div class="container">
|
||||
{% include 'proposal/macros/navbar.html' %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
{% if proposals['proposed'] %}
|
||||
{{ proposal_table(title='Proposals', _proposals=proposals['proposed']) }}
|
||||
<hr>
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
{% if proposals['funding'] %}
|
||||
{{ proposal_table(title='Funding required', _proposals=proposals['funding']) }}
|
||||
{% else %}
|
||||
No proposals here yet.
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include 'sidebar.html' %}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.container -->
|
||||
{% endblock %}
|
Loading…
Reference in new issue