public function getAnnotationManager($fetch = false, $date = false, $period = false, $lastN = false)
    {
        $this->checkSitePermission();

        if ($date === false) {
            $date = Common::getRequestVar('date', false);
        }

        if ($period === false) {
            $period = Common::getRequestVar('period', 'day');
        }

        if ($lastN === false) {
            $lastN = Common::getRequestVar('lastN', false);
        }

        // create & render the view
        $view = new View('@Annotations/getAnnotationManager');

        $allAnnotations = Request::processRequest(
            'Annotations.getAll', array('date' => $date, 'period' => $period, 'lastN' => $lastN));
        $view->annotations = empty($allAnnotations[$this->idSite]) ? array() : $allAnnotations[$this->idSite];

        $view->period = $period;
        $view->lastN = $lastN;

        list($startDate, $endDate) = API::getDateRangeForPeriod($date, $period, $lastN);
        $view->startDate = $startDate->toString();
        $view->endDate = $endDate->toString();

        if ($startDate->toString() !== $endDate->toString()) {
            $view->selectedDate = Date::today()->toString();
        } else {
            $view->selectedDate = $endDate->toString();
        }

        $dateFormat = Date::DATE_FORMAT_SHORT;
        $view->startDatePretty = $startDate->getLocalized($dateFormat);
        $view->endDatePretty = $endDate->getLocalized($dateFormat);

        $view->canUserAddNotes = AnnotationList::canUserAddNotesFor($this->idSite);

        return $view->render();
    }