Index: Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PetController.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PetController.java	(revision 4103eaa6cd6e6a73eec104a9fc23845ff4d110b9)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PetController.java	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
@@ -1,6 +1,16 @@
 package finki.paw5.web.controllers;
 
+import finki.paw5.model.entities.Adoption;
+import finki.paw5.model.entities.Pet;
+import finki.paw5.model.entities.User;
+import finki.paw5.model.exceptions.InvalidPetIdException;
+import finki.paw5.service.AdoptionService;
 import finki.paw5.service.PetService;
+import jakarta.servlet.http.HttpServletRequest;
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+
+import java.time.LocalDate;
 
 @Controller
@@ -8,8 +18,25 @@
 
     private final PetService petService;
+    private final AdoptionService adoptionService;
 
-    public PetController(PetService petService) {
+    public PetController(PetService petService, AdoptionService adoptionService) {
         this.petService = petService;
+        this.adoptionService = adoptionService;
     }
 
+    @PostMapping("/submit-adopton-{id}")
+    public String saveAdoption(@PathVariable Integer id, HttpServletRequest request) {
+
+        Pet pet = this.petService.findById(id);
+        
+        User user = (User) request.getSession().getAttribute("user");
+
+        Adoption adoption = new Adoption(LocalDate.now(), null, false, user.getId());
+        this.adoptionService.save(adoption);
+
+        pet.setAdoptionId(adoption.getId());
+        this.petService.save(pet);
+
+        return "redirect:/home";
+    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PostController.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PostController.java	(revision 4103eaa6cd6e6a73eec104a9fc23845ff4d110b9)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PostController.java	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
@@ -1,22 +1,24 @@
 package finki.paw5.web.controllers;
-
-import finki.paw5.model.entities.Employee;
 import finki.paw5.model.entities.Pet;
 import finki.paw5.model.entities.Post;
-import finki.paw5.model.entities.User;
+import finki.paw5.model.entities.Employee;
 import finki.paw5.model.enumerations.AgeGroup;
 import finki.paw5.model.enumerations.Gender;
 import finki.paw5.model.enumerations.Size;
 import finki.paw5.model.enumerations.Species;
+import finki.paw5.service.PersonalProfileService;
 import finki.paw5.service.PetService;
 import finki.paw5.service.PostService;
+import finki.paw5.service.ShelterService;
 import jakarta.servlet.http.HttpServletRequest;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 
 import java.time.LocalDate;
+import java.util.List;
 
 @Controller
@@ -25,8 +27,10 @@
     private final PostService postService;
     private final PetService petService;
+    private final PersonalProfileService personalProfileService;
 
-    public PostController(PostService postService, PetService petService) {
+    public PostController(PostService postService, PetService petService, PersonalProfileService personalProfileService, ShelterService shelterService) {
         this.postService = postService;
         this.petService = petService;
+        this.personalProfileService = personalProfileService;
     }
 
@@ -71,3 +75,36 @@
         return "redirect:/home";
     }
+
+    @GetMapping("/adoption-posts")
+    public String getAdoptionPosts(Model model, HttpServletRequest request){
+
+        List<Post> posts = this.postService.findAll();
+        List<Pet> pets = this.petService.listpets();
+        //model.addAttribute("posts", posts);
+        //model.addAttribute("pets",pets);
+        request.getSession().setAttribute("posts",posts);//temp
+        request.getSession().setAttribute("pets",pets);//temp
+
+        return "list-posts-adoption";
+    }
+
+    @GetMapping("/pet-details-{id}")
+    public String getPostDetails(@PathVariable Integer id, Model model, HttpServletRequest request){
+
+        Post post = this.postService.findById(id).get();
+        Pet pet = this.petService.findById(post.getPetId());
+
+        //model.addAttribute("pet", pet);
+        //model.addAttribute("post", post);
+        request.getSession().setAttribute("post", post);//temp
+        request.getSession().setAttribute("pet", pet);//temp
+
+        if(pet.getAdoptionId() != null){
+            request.getSession().setAttribute("disableAdoption", true);
+        } else{
+            request.getSession().setAttribute("disableAdoption", false);
+        }
+
+        return "pet-details";
+    }
 }
