<?php

/*
 * @component UserPoints
 * @copyright Copyright (C) 2015-2022 Bernard Gilly - Adrien Roussel - Martin Brampton
 * @license : GNU/GPL
 * @Website : https://remository.com
 */

namespace BlackSheepResearch\Component\UserPoints\Site\Viewers;

// no direct access
defined('_JEXEC') or die('Restricted access');

use Joomla\CMS\Factory;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Component\ComponentHelper;
use BlackSheepResearch\Component\UserPoints\Administrator\Viewers\UPJPane;

class MedalsHTML extends UserView {

    function _displaylist($tpl = null) {

        $document = Factory::getDocument();

        $this->pagination = new Pagination($this->total, $this->limitstart, $this->limit);

        // insert the page counter in the title of the window page
        $titlesuite = ( $this->limitstart ) ? ' - ' . $this->pagination->getPagesCounter() : '';
        $document->setTitle($document->getTitle() . $titlesuite);

        parent::display($tpl);
    }

    function _displaydetailrank($tpl = null) {

        $document = Factory::getDocument();

        $this->pagination = new Pagination($this->total, $this->limitstart, $this->limit);

        // insert the page counter in the title of the window page
        $document->setTitle($document->getTitle() . ' - ' . $this->pagination->getPagesCounter());

        parent::display("listing");
    }

}
