Skip to content

Commit

Permalink
Merge pull request #931 from maisie-fisher/730-projectsoverview
Browse files Browse the repository at this point in the history
Adding ProjectList
  • Loading branch information
erinz2020 authored Dec 12, 2024
2 parents b3ed808 + 12c3d65 commit ba23036
Show file tree
Hide file tree
Showing 13 changed files with 394 additions and 9 deletions.
2 changes: 2 additions & 0 deletions frontend/src/AuthenticatedSwitch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Citation from "./pages/Citation";
import AdminLogs from "./pages/AdminLogs";
import ReportEncounter from "./pages/ReportsAndManagamentPages/ReportEncounter";
import ReportConfirm from "./pages/ReportsAndManagamentPages/ReportConfirm";
import ProjectList from "./pages/ProjectList";

export default function AuthenticatedSwitch({
showAlert,
Expand Down Expand Up @@ -58,6 +59,7 @@ export default function AuthenticatedSwitch({
<Routes>
<Route path="/profile" element={<Profile />} />
<Route path="/citation" element={<Citation />} />
<Route path="/projects/overview" element={<ProjectList />} />
<Route path="/home" element={<Home />} />
<Route path="/report" element={<ReportEncounter />} />
<Route path="/reportConfirm" element={<ReportConfirm />} />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/constants/navMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const authenticatedMenu = (username, showclassicsubmit) => [
defaultMessage="My Projects"
/>
),
href: "/projects/projectList.jsp",
href: "/react/projects/overview",
},
],
},
Expand Down
130 changes: 130 additions & 0 deletions frontend/src/css/projectList.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
.projectListDiv {
margin-top: 20px;
margin-bottom: 40px;
}

.headerContainer {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}

.newProject {
box-shadow: 3px 3px black;
background-color: #007DA3;
color: white;
padding: 8px 16px; /* Add padding for a nicer look */
border: none;
border-radius: 4px;
cursor: pointer;
}

table {
cursor: pointer;
border-spacing: 0;
width: 100%;
margin-bottom: 20px;
}

table thead th {
background-color: white;
padding: 8px;
text-align: left;
}

table tbody tr:nth-child(odd) {
background-color: #f2f2f3;
}

table tbody tr:nth-child(even) {
background-color: white;
}

table tbody td {
max-width: 350px;
word-wrap: break-word;
padding: 8px;
}

table thead tr th {
background-image: url('../../../src/main/webapp/javascript/tablesorter/themes/blue/bg.gif');
background-repeat: no-repeat;
background-position: center right;
padding-right: 30px;
}

table thead tr .headerSortUp {
background-image: url('../../../src/main/webapp/javascript/tablesorter/themes/blue/asc.gif');
}
table thead tr .headerSortDown {
background-image: url('../../../src/main/webapp/javascript/tablesorter/themes/blue/desc.gif');
}

.pagination {
display: flex;
justify-content: center;
}

.pagination .itemCounter {
margin-right: 10px;
display: flex;
align-items: center;
}

.pagination button {
cursor: pointer;
background-color: white;
background-repeat: no-repeat;
background-position: center;
background-size: 16px 16px;
outline: none;
border: 1px solid #DEE2E6;
color: #007DA3;
padding: 6px 8px;
}

.pagination .previous-button {
background-image: url('../../../src/main/webapp/javascript/tablesorter/themes/pagination/previous.jpg');
}

.pagination .next-button {
background-image: url('../../../src/main/webapp/javascript/tablesorter/themes/pagination/next.jpg');
margin-right: 10px;
}

.pagination-options {
align-items: center;
margin-right: 10px;
}

.pagination-options select {
background-color: white;
border: 1px solid #ddd;
outline: none;
cursor: pointer;
padding: 8px 8px;
-webkit-appearance: none;
appearance: none;
}

.goto-box {
display: flex;
align-items: center;
}

.goto-box input {
margin-left: 10px;
width: 30px;
border: 1px solid #ddd;
text-align: center;
outline: none;
padding: 6px;
}

.pagination button.active {
background-color: #007DA3;
color: white;
font-weight: bold;
border: 1px solid #007DA3;
}
13 changes: 11 additions & 2 deletions frontend/src/locale/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,5 +317,14 @@
"BEERROR_REQUIRED" : "Konnte nicht übermittelt werden; erforderliches Feld fehlt: ",
"BEERROR_INVALID" : "Konnte nicht übermittelt werden; Feldformat war ungültig: ",
"BEERROR_UNKNOWN" : "Konnte aufgrund eines unbekannten Fehlers nicht abgeschickt werden.",
"ANON_UPLOAD_IMAGE_WARNING": "Bilder können erst hochgeladen werden, wenn das Captcha abgeschlossen ist."
}
"ANON_UPLOAD_IMAGE_WARNING": "Bilder können erst hochgeladen werden, wenn das Captcha abgeschlossen ist.",
"PROJECTS_FOR" : "Projekte für",
"NEW_PROJECT" : "Neues Projekt",
"PROJECTS_ID" : "Projekte ID",
"PERCENTAGE_IDENTIFIED" : "Prozentsatz identifiziert",
"TOTAL" : "Gesamt",
"ITEMS" : "Artikel",
"INPUT_PAGE_ALERT" : "Bitte geben Sie eine gültige Seitenzahl zwischen 1 und {totalPages}.",
"NO_PROJECTS" : "Keine Projekte",
"PROJECT_LIST_TITLE": "Wildbook – Meine Projekte"
}
11 changes: 10 additions & 1 deletion frontend/src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,5 +317,14 @@
"BEERROR_REQUIRED" : "Could not submit; missing required field: ",
"BEERROR_INVALID" : "Could not submit; field format was invalid: ",
"BEERROR_UNKNOWN" : "Could not submit due to unknown error.",
"ANON_UPLOAD_IMAGE_WARNING": "Images cannot be uploaded until captcha is complete."
"ANON_UPLOAD_IMAGE_WARNING": "Images cannot be uploaded until captcha is complete.",
"PROJECTS_FOR" : "Projects for",
"NEW_PROJECT" : "New Project",
"PROJECTS_ID" : "Projects ID",
"PERCENTAGE_IDENTIFIED" : "Percentage Identified",
"TOTAL" : "Total",
"ITEMS" : "items",
"INPUT_PAGE_ALERT" : "Please enter a valid page number between 1 and {totalPages}.",
"NO_PROJECTS" : "No Projects",
"PROJECT_LIST_TITLE": "Wildbook - My Projects"
}
11 changes: 10 additions & 1 deletion frontend/src/locale/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,5 +316,14 @@
"BEERROR_REQUIRED" : "No se ha podido enviar; falta el campo obligatorio: ",
"BEERROR_INVALID" : "No se pudo enviar; el formato del campo no era válido: ",
"BEERROR_UNKNOWN" : "No se pudo enviar debido a un error desconocido.",
"ANON_UPLOAD_IMAGE_WARNING": "No se pueden subir imágenes hasta que se complete el captcha."
"ANON_UPLOAD_IMAGE_WARNING": "No se pueden subir imágenes hasta que se complete el captcha.",
"PROJECTS_FOR" : "Proyectos para",
"NEW_PROJECT" : "Nuevo Proyecto",
"PROJECTS_ID" : "Identificación de proyectos",
"PERCENTAGE_IDENTIFIED" : "Porcentaje identificado",
"TOTAL" : "Total",
"ITEMS" : "elementos",
"INPUT_PAGE_ALERT" : "Por favor, introduzca un número de página válido entre 1 y {totalPages}.",
"NO_PROJECTS" : "Sin proyectos",
"PROJECT_LIST_TITLE": "Wildbook - Mis Proyectos"
}
11 changes: 10 additions & 1 deletion frontend/src/locale/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,5 +316,14 @@
"BEERROR_REQUIRED" : "Impossible de soumettre ; champ requis manquant : ",
"BEERROR_INVALID" : "Impossible de soumettre ; le format du champ n'est pas valide : ",
"BEERROR_UNKNOWN" : "Impossible de soumettre en raison d'une erreur inconnue.",
"ANON_UPLOAD_IMAGE_WARNING": "Les images ne peuvent pas être téléchargées tant que le captcha n'est pas complété."
"ANON_UPLOAD_IMAGE_WARNING": "Les images ne peuvent pas être téléchargées tant que le captcha n'est pas complété.",
"PROJECTS_FOR" : "Projets pour",
"NEW_PROJECT" : "Nouveau projet",
"PROJECTS_ID" : "ID de projets",
"PERCENTAGE_IDENTIFIED" : "Pourcentage identifié",
"TOTAL" : "Total",
"ITEMS" : "articles",
"INPUT_PAGE_ALERT" : "Veuillez saisir un numéro de page valide entre 1 et {totalPages}.",
"NO_PROJECTS" : "Aucun projet",
"PROJECT_LIST_TITLE": "Wildbook - Mes projets"
}
11 changes: 10 additions & 1 deletion frontend/src/locale/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,5 +316,14 @@
"BEERROR_REQUIRED" : "Impossibile inviare; manca un campo obbligatorio: ",
"BEERROR_INVALID" : "Impossibile inviare; il formato del campo non era valido: ",
"BEERROR_UNKNOWN" : "Impossibile inviare a causa di un errore sconosciuto.",
"ANON_UPLOAD_IMAGE_WARNING": "Non è possibile caricare immagini finché il captcha non è completato."
"ANON_UPLOAD_IMAGE_WARNING": "Non è possibile caricare immagini finché il captcha non è completato.",
"PROJECTS_FOR" : "Progetti per",
"NEW_PROJECT" : "Nuovo progetto",
"PROJECTS_ID" : "ID progetti",
"PERCENTAGE_IDENTIFIED" : "Percentuale identificata",
"TOTAL" : "Totale",
"ITEMS" : "elementi",
"INPUT_PAGE_ALERT" : "Inserisci un numero di pagina valido compreso tra 1 e {totalPages}.",
"NO_PROJECTS" : "Nessun progetto",
"PROJECT_LIST_TITLE": "Wildbook - I miei progetti"
}
Loading

0 comments on commit ba23036

Please sign in to comment.