# = Pull requests =
# =================
def pull_requests(request):
- objects = PullRequest.objects.order_by('status')
+ objects = PullRequest.objects.order_by('-status', 'timestamp')
if not request.user.has_perm('explorer.book.can_share'):
objects = objects.filter(comitter=request.user)
-
return direct_to_template(request, 'manager/pull_request.html',
extra_context = {'objects': objects} )
margin-right: 10px;
}
-.request-report .status-N {
- background-color: teal;
+.pull-request.status-N {
+ background-color: #FFF;
}
-.request-report .status-R {
+.pull-request.status-R {
background-color: red;
}
-.request-report .status-A {
- background-color: gray;
+.pull-request.status-A {
+ background-color: #DDD;
}
.pull-request .diff {
white-space: pre;
+ height: 360px;
+ width: 960px;
+ overflow: auto;
+ border: 1px solid #CCC;
+ margin-top: 10px;
+ background-color: #F9F9F9;
+ padding: 2px;
}
<li>data: {{ pullreq.timestamp }}</li>
</ul>
<p class="comment">{{ pullreq.comment }}</p>
+ {% ifnotequal pullreq.status 'A' %}
<p class="buttons">
<button type="button" class="awesome button green accept-button" title="{{pullreq.id}}">Akceptuj</button>
<button type="button" class="awesome button show-diff" title="{{pullreq.id}}">Zmiany</button>
<a class="awesome button" href="{% url editor_view pullreq.document %}?user=$prq-{{pullreq.id}}">Zobacz</a>
</p>
+ {% endifnotequal %}
</div>
{% endfor %}
{% else %}