Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-50333

New mustache-powered paging_bar

    XMLWordPrintable

Details

    Description

      Split out into an improvement from MDL-48664 so 2.8 can get some love over there.

      This improvement involves:

      • moving paging_bar into its own file in lib/classes/output/paging_bar.php
        • adjusting every use of paging_bar to \core\output\paging_bar in order to account for the namespace change
      • adding a new Mustache template as lib/paging_bar.mustache
      • adding the ability to hint the paging bar with regards to its display size (a new \core\output\paging_bar::displaysize option, which can be 'mini', 'small', or 'large'

      The structure that the mustache template expects is:

      {
          "type": "Page",
          "links": [
          	  {
                  "href": "http://moodle.com",
                  "text": "<3 Moodle",
                  "attrs": []
              }
          ],
          "first": {
              "href": "http://moodle.com",
              "text": "0",
              "attrs": []
          },
          "last": {
              "href": "http://moodle.com",
              "text": "120",
              "attrs": []
          }
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jethac Jetha Chan
              Amy Groshek, David Scotson, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: