aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/need-list/need-list.component.html
diff options
context:
space:
mode:
authorbenal01 <bja4245@rit.edu>2025-03-31 23:54:04 -0400
committerGitHub <noreply@github.com>2025-03-31 23:54:04 -0400
commit982e00e128add3e8dc1f0b27f393fc8e63797059 (patch)
tree829843f70736781c18536040b14c72c1bd48a019 /ufund-ui/src/app/components/need-list/need-list.component.html
parent896e1219526a19400c7143b274193f8b818d6156 (diff)
parentbb2e7b50e1ca96120fc42eed1f090cf0e1c98258 (diff)
downloadJellySolutions-982e00e128add3e8dc1f0b27f393fc8e63797059.tar.gz
JellySolutions-982e00e128add3e8dc1f0b27f393fc8e63797059.tar.bz2
JellySolutions-982e00e128add3e8dc1f0b27f393fc8e63797059.zip
Merge pull request #24 from RIT-SWEN-261-02/need-pages
needs per page
Diffstat (limited to 'ufund-ui/src/app/components/need-list/need-list.component.html')
-rw-r--r--ufund-ui/src/app/components/need-list/need-list.component.html9
1 files changed, 8 insertions, 1 deletions
diff --git a/ufund-ui/src/app/components/need-list/need-list.component.html b/ufund-ui/src/app/components/need-list/need-list.component.html
index e00ba47..8ea7b88 100644
--- a/ufund-ui/src/app/components/need-list/need-list.component.html
+++ b/ufund-ui/src/app/components/need-list/need-list.component.html
@@ -24,8 +24,15 @@
<h2 *ngIf="searchResults.length == needs.length"> All Needs </h2>
<h2 *ngIf="searchResults.length == 0"> No Results Found </h2>
+<div id="page-selector">
+ <span>Page {{currentPage + 1}} of {{totalPages}} </span> <br>
+ <label>Needs per page: </label>
+ <input type ="number" [(ngModel)]="itemsPerPage" (change)="resetVisibleNeeds()" min="1" max="{{searchResults.length}}">
+ <button *ngIf="currentPage > 0" (click)="decrementPage()">Previous</button>
+ <button *ngIf="currentPage < totalPages - 1" (click)="incrementPage()">Next</button>
+</div>
<div id="needList">
- <div *ngFor="let need of searchResults" class="needEntry">
+ <div *ngFor="let need of visibleNeeds" class="needEntry">
<div [routerLink]="'/need/' + need.id" class="clickable">
<div class="split">
<div class="left">