/**
  * prepare html filters to allow user to select the way she likes
  * to view reports
  */
 protected function _prepareFilters()
 {
     // array to hold various filters
     $filters = array();
     // find if we must display all filters. On dashboard, only a reduced set
     $allFilters = $this->_options['showFilters'] == 'yes';
     // select account to retrieve data for (or rather, profile
     $customSubmit = ' onchange="shSetupAnalytics({' . ($allFilters ? '' : 'showFilters:\'no\'') . '});"';
     $select = Sh404sefHelperHtml::buildSelectList($this->_accounts, $this->_options['accountId'], 'accountId', $autoSubmit = false, $addSelectAll = false, $selectAllTitle = '', $customSubmit);
     $filters[] = JText::_('COM_SH404SEF_ANALYTICS_ACCOUNT') . ': ' . $select;
     // dashboard only has account selection, no room for anything else
     // only shows main selection drop downs on analytics view
     if ($allFilters) {
         // select start date
         $select = JHTML::_('calendar', $this->_options['startDate'], 'startDate', 'startDate', '%Y-%m-%d', 'class="textinput"');
         $filters[] = ' ' . JText::_('COM_SH404SEF_ANALYTICS_START_DATE') . ': ' . $select;
         // select end date
         $select = JHTML::_('calendar', $this->_options['endDate'], 'endDate', 'endDate', '%Y-%m-%d', 'class="textinput"');
         $filters[] = ' ' . JText::_('COM_SH404SEF_ANALYTICS_END_DATE') . ': ' . $select;
         // select groupBy (day, week, month)
         $select = Sh404sefHelperAnalytics::buildAnalyticsGroupBySelectList($this->_options['groupBy'], 'groupBy', $autoSubmit = false, $addSelectAll = false, $selectAllTitle = '', $customSubmit);
         $filters[] = ' ' . JText::_('COM_SH404SEF_ANALYTICS_GROUP_BY') . ': ' . $select;
         // add a click to update link
         $filters[] = '&nbsp;<a href="javascript: void(0);" onclick="javascript: shSetupAnalytics({forced:1' . ($allFilters ? '' : ',showFilters:\'no\'') . '});" > [' . JText::_('COM_SH404SEF_CHECK_ANALYTICS') . ']</a>';
     } else {
         // on dashboard, there is no date select, so we must display the date range
         $filters[] = '&nbsp;' . JText::_('COM_SH404SEF_ANALYTICS_DATE_RANGE') . '&nbsp;<div class="largertext">' . $this->_options['startDate'] . '&nbsp;&nbsp;>>&nbsp;&nbsp;' . $this->_options['endDate'] . '</div>';
     }
     return $filters;
 }