Optional cross-approval; add long-lost git diff link
This commit is contained in:
1 parent
98180c0556
commit
a59a797a9f
4 files changed
+19
-3
No files matched your search
+2
-1
@@ -18,6 +18,8 @@
|
||||
# #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
|
||||
USE_CROSS_APPROVAL = False
|
||||
|
||||
OPENBENCH_CONFIG = {
|
||||
|
||||
'error' : {
|
||||
@@ -25,7 +27,6 @@ OPENBENCH_CONFIG = {
|
||||
'fakeuser' : 'This is not a real OpenBench User. Create an OpenBench account',
|
||||
},
|
||||
|
||||
|
||||
# Link to the repo on the sidebar, as well as the core files
|
||||
'framework' : 'http://github.com/AndyGrant/OpenBench/',
|
||||
'corefiles' : 'http://github.com/AndyGrant/OpenBench/raw/master/CoreFiles/',
|
||||
|
||||
@@ -102,7 +102,12 @@ a:link, a:visited, a:hover, a:active {
|
||||
#content #actions {
|
||||
margin-left: 32px;
|
||||
float: right;
|
||||
margin-top: 60px;
|
||||
}
|
||||
|
||||
#content #actions h4 {
|
||||
color: #A2A2A2;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#content #actions .anchorbutton {
|
||||
|
||||
@@ -420,6 +420,7 @@ def newTest(request):
|
||||
return index(request, error='\n'.join(errors))
|
||||
|
||||
username = request.user.username
|
||||
profile = Profile.objects.get(user=request.user)
|
||||
LogEvent.objects.create(data="CREATE", author=username, test=test)
|
||||
|
||||
approved = Test.objects.filter(approved=True)
|
||||
@@ -433,6 +434,11 @@ def newTest(request):
|
||||
action = "AUTOAPP P={0} TP={1}".format(test.priority, test.throughput)
|
||||
LogEvent.objects.create(data=action, author=username, test=test)
|
||||
|
||||
elif not OpenBench.config.USE_CROSS_APPROVAL and profile.approver:
|
||||
test.approved = True; test.save()
|
||||
action = "APPROVE P={0} TP={1}".format(test.priority, test.throughput)
|
||||
LogEvent.objects.create(data=action, author=username, test=test)
|
||||
|
||||
return django.http.HttpResponseRedirect('/index/')
|
||||
|
||||
|
||||
|
||||
@@ -37,6 +37,11 @@
|
||||
|
||||
<div id="actions">
|
||||
|
||||
<!-- Dev vs Base [Git Diff Link] -->
|
||||
<a href="{{test|gitDiffLink}}">
|
||||
<h4>{{test.dev.name|prettyName}} vs {{test.base.name|prettyName}}</h4>
|
||||
</a>
|
||||
|
||||
<!-- Approve Button: For Admins, or Cross-approvers -->
|
||||
{% if not test.approved and profile.approver and profile.user.username != test.author %}
|
||||
<a class="anchorbutton" id="approvebutton" href="/test/{{test.id}}/APPROVE">Approve</a>
|
||||
@@ -74,7 +79,6 @@
|
||||
<!-- ELO, SPRT, LLR, Games -->
|
||||
<pre>{{test|longStatBlock|linebreaksbr}}</pre>
|
||||
|
||||
|
||||
<!-- Forum to modify the Priority or Throughput -->
|
||||
<form method="POST" action="/test/{{test.id}}/MODIFY">
|
||||
|
||||
|
||||
Reference in new issue
Block a user