Esempio n. 1
0
 /**
  * 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[] = JText16::_('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[] = ' ' . JText16::_('COM_SH404SEF_ANALYTICS_START_DATE') . ': ' . $select;
         // select end date
         $select = JHTML::_('calendar', $this->_options['endDate'], 'endDate', 'endDate', '%Y-%m-%d', 'class="textinput"');
         $filters[] = ' ' . JText16::_('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[] = ' ' . JText16::_('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\'') . '});" > [' . Jtext16::_('COM_SH404SEF_CHECK_ANALYTICS') . ']</a>';
     } else {
         // on dashboard, there is no date select, so we must display the date range
         $filters[] = '&nbsp;' . JText16::_('COM_SH404SEF_ANALYTICS_DATE_RANGE') . '&nbsp;<div class="largertext">' . $this->_options['startDate'] . '&nbsp;&nbsp;>>&nbsp;&nbsp;' . $this->_options['endDate'] . '</div>';
     }
     return $filters;
 }
Esempio n. 2
0
 /**
  * Method to create a select list of possible data types of the analytics dashboard
  *
  * @access  public
  * @param int ID of current item
  * @param string name of select list
  * @param boolean if true, changing selected item will submit the form (assume is an "adminForm")
  * @param boolean, if true, a line 'Select all' is inserted at the start of the list
  * @param string the "Select all" to be displayed, if $addSelectAll is true
  * @return  string HTML output
  */
 function buildDashboardDataTypeList($current, $name, $autoSubmit = false, $addSelectAll = false, $selectAllTitle = '', $customSubmit = '')
 {
     // build up list from scratch
     $data = array();
     $data[] = array('id' => 'ga:pageviews', 'title' => Jtext16::_('COM_SH404SEF_ANALYTICS_DATA_PAGEVIEWS'));
     $data[] = array('id' => 'ga:visits', 'title' => Jtext16::_('COM_SH404SEF_ANALYTICS_DATA_VISITS'));
     $data[] = array('id' => 'ga:visitors', 'title' => Jtext16::_('COM_SH404SEF_ANALYTICS_DATA_VISITORS'));
     // use helper to build html
     $list = self::buildSelectList($data, $current, $name, $autoSubmit, $addSelectAll, $selectAllTitle, $customSubmit);
     // return list
     return $list;
 }
Esempio n. 3
0
 * @version     $Id: default_headers.php 1557 2010-08-22 19:50:41Z silianacom-svn $
 */
// Security check to ensure this file is being included by a parent file.
if (!defined('_JEXEC')) {
    die('Direct Access to this location is not allowed.');
}
?>

    <table class="adminlist">

      <thead>
        <tr>
          <td width="18%">
            <?php 
$allFilters = $this->options['showFilters'] == 'yes';
echo '<a href="javascript: void(0);" onclick="javascript: shSetupAnalytics({forced:1' . ($allFilters ? '' : ',showFilters:\'no\'') . '});" > [' . Jtext16::_('COM_SH404SEF_CHECK_ANALYTICS') . ']</a>';
echo '&nbsp;';
echo empty($this->analytics->status) ? JText16::_('COM_SH404SEF_ERROR_CHECKING_ANALYTICS') : $this->escape($this->analytics->statusMessage);
?>
          </td>
        </tr>
      </thead>
      <?php 
if (!empty($this->analytics->status)) {
    echo $this->loadTemplate('filters');
}
?>
    
    </table>
 	
	
Esempio n. 4
0
echo Jtext16::_('COM_SH404SEF_YES');
?>
</label>
      </td>
      <td><?php 
echo JHTML::_('tooltip', JText16::_('COM_SH404SEF_TT_ACTIVATE_SECURITY'), JText16::_('COM_SH404SEF_ACTIVATE_SECURITY'));
?>
</td>
    </tr>
  <tr>
    <td class="qbutton" colspan="2">
       <a href="javascript: void(0);" onclick="shSubmitQuickControl(event)" ><span class="icon-48-save" title="<?php 
echo Jtext16::_('COM_SH404SEF_SAVE');
?>
"></span><?php 
echo Jtext16::_('COM_SH404SEF_SAVE');
?>
</a>
    </td>
  </tr>
</table>
</td>
<td style="padding: 5px;text-align: justify;">
    <?php 
echo JText16::_('COM_SH404SEF_QCONTROL');
?>
</td>
</tr>
</table>

<!-- start quick control panel markup -->
Esempio n. 5
0
      </td>
		</tr>
	</thead>
	<?php 
    if ($this->updates->shouldUpdate) {
        ?>
	<tr>
	   <td >
	     <?php 
        echo JText16::_('COM_SH404SEF_AVAILABLE_VERSION');
        ?>
	   </td>
	   <td>
	   <?php 
        if (!empty($this->updates->current)) {
            echo $this->updates->current . ' [' . '<a target="_blank" href="' . $this->escape($this->updates->changelogLink) . '" >' . Jtext16::_('COM_SH404SEF_VIEW_CHANGELOG') . '</a>]' . '&nbsp[' . '<a target="_blank" href="' . $this->escape($this->updates->downloadLink) . '" >' . Jtext16::_('COM_SH404SEF_GET_IT') . '</a>]';
        }
        ?>
     </td>
	</tr>
	<tr>
     <td>
       <?php 
        echo JText16::_('COM_SH404SEF_NOTES');
        ?>
     </td>
     <td>
     <?php 
        echo $this->escape($this->updates->note);
        ?>
     </td>