소스 검색

Adds accept/decline buttons for assigned tests.

Alan Lam 8 년 전
부모
커밋
0d3beb4eab
1개의 변경된 파일과 12개의 추가작업 그리고 0개의 파일을 삭제
  1. 12 0
      views/test_list_assigned.php

+ 12 - 0
views/test_list_assigned.php

@@ -27,7 +27,19 @@
 						<?=htmlspecialchars($location->getDisplayAddress())?>
 					</div>
 					<div class="col-auto align-self-center">
+					<?php
+					if($test->status == Test::STATUS_ASSIGNED) {
+						?>
+						<a class="btn btn-outline-success" href="/account/tests/<?=$test->id?>/accept">Accept</a>
+						<a class="btn btn-outline-danger" href="/account/tests/<?=$test->id?>/decline">Decline</a>
+						<?php
+					}
+					else {
+						?>
 						<a class="btn btn-outline-primary" href="/account/tests/<?=$test->id?>" title="Begin" data-toggle="tooltip">Begin</a>
+						<?php
+					}
+					?>
 					</div>
 				</div>
 			</div>