Browse Source

Hide closed issues.

Nathaniel van Diepen 10 years ago
parent
commit
4cfdbc5a93
2 changed files with 6 additions and 3 deletions
  1. 1 1
      api.php
  2. 5 2
      data/pages/issues.template

+ 1 - 1
api.php

@@ -180,7 +180,7 @@
 											}
 										break;
 										case 'issues':
-											if($res = query("SELECT i.id,i.title,i.description,u.name as user,s.name as status,p.name as priority,p.color FROM `issues` i JOIN `users` u ON u.id = i.u_id LEFT JOIN `statuses` s ON s.id = i.st_id LEFT JOIN `priorities` p ON p.id = i.pr_id")){
+											if($res = query("SELECT i.id,i.title,i.description,u.name as user,s.name as status,p.name as priority,p.color,s.isopen FROM `issues` i JOIN `users` u ON u.id = i.u_id LEFT JOIN `statuses` s ON s.id = i.st_id LEFT JOIN `priorities` p ON p.id = i.pr_id")){
 												$context['issues'] = fetch_all($res,MYSQLI_ASSOC);
 												foreach($context['issues'] as $key => $issue){
 													$context['issues'][$key]['user'] = userObj($issue['user']);

+ 5 - 2
data/pages/issues.template

@@ -5,7 +5,7 @@
 		</header>
 		<ul>
 			{{#each issues}}
-				<li>
+				<li class="isopen-{{isopen}}">
 					<aside class="pack-end">
 						{{user.name}}
 					</aside>
@@ -21,4 +21,7 @@
 			{{/each}}
 		</ul>
 	</section>
-</div>
+</div>
+<script>
+	$('.isopen-0').hide();
+</script>