Skip to content
Snippets Groups Projects

Refactor to have only one pagination.html template

  1. Mar 03, 2020
    • Chris Lemaire's avatar
      Add padding to course view pages · dd61089c
      Chris Lemaire authored
      
      - Within /course/view.html the layout:fragment="subcontent" referencing
        div is wrapped in a div with class="pb-3" to add some missing bottom
        padding for all /course pages.
      
      Signed-off-by: default avatarChris Lemaire <c.lemaire@student.tudelft.nl>
      dd61089c
    • Chris Lemaire's avatar
      Refactor to have only one pagination.html template · 16ec0a88
      Chris Lemaire authored and Chris Lemaire's avatar Chris Lemaire committed
      
      Before this commit three different instances of pagination could be
      found throughout the project. This only needs to be a single instance
      as all pagination elements do exactly the same thing: provide buttons
      to change the query parameter of `page` and fetch the current page with
      the changed query parameters.
      
      The location of /templates/pagination.html was chosen because it is the
      most generic place for such a generic template.
      Most, if not all, of the implementation of pagination was copied from
      /templates/request/list/pagination.html because the existing implementation
      there was most complete and most recently worked on.
      The 'new' pagination.html template/fragment was given explicit parameters
      for a Page object to figure out the current page and total page count etc.
      Additionally, the size (width) of the pagination element is passed explicitle.
      The value used by default before was 3.
      
      The CourseController based function to fetch a list of students was
      adjusted to output a Page object into the model, as required for the
      pagination to work similarly to that of all other paginated pages.
      
      Signed-off-by: default avatarclemaire <c.lemaire@student.tudelft.nl>
      16ec0a88
Loading