diff --git a/OpenBench/config.py b/OpenBench/config.py index d54bb1b..5ccd160 100644 --- a/OpenBench/config.py +++ b/OpenBench/config.py @@ -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/', diff --git a/OpenBench/static/style.css b/OpenBench/static/style.css index b862d26..833f32a 100644 --- a/OpenBench/static/style.css +++ b/OpenBench/static/style.css @@ -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 { diff --git a/OpenBench/views.py b/OpenBench/views.py index 1f57b20..dd812b8 100644 --- a/OpenBench/views.py +++ b/OpenBench/views.py @@ -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/') diff --git a/Templates/OpenBench/test.html b/Templates/OpenBench/test.html index 6b5c889..6a72f68 100644 --- a/Templates/OpenBench/test.html +++ b/Templates/OpenBench/test.html @@ -37,6 +37,11 @@
{{test|longStatBlock|linebreaksbr}}
-