Example #1
0
 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a Error object.
  */
 public function display($tpl = null)
 {
     RHelperAsset::load('tracks.css');
     $mainframe = JFactory::getApplication();
     $project_id = $mainframe->input->getInt('p', 0);
     $model = $this->getModel();
     $rankings = $model->getRankings($project_id);
     $project = $model->getProject($project_id);
     $params = $model->getParams($project_id);
     $viewparams = $mainframe->getParams('com_tracks');
     $params->merge($viewparams);
     $breadcrumbs = $mainframe->getPathWay();
     $breadcrumbs->addItem($project->name . ' ' . JText::_('COM_TRACKS_Rankings'), TrackslibHelperRoute::getRankingRoute($project_id));
     $document = JFactory::getDocument();
     $document->setTitle($project->name . ' ' . JText::_('COM_TRACKS_Rankings'));
     $this->assignRef('params', $params);
     $this->assignRef('project', $project);
     $this->assignRef('rankings', $rankings);
     parent::display($tpl);
 }
Example #2
0
</th>
			<th><?php 
echo JText::_('');
?>
</th>
			<th><?php 
echo JText::_('');
?>
</th>
		</tr>
		</thead>
		<?php 
if (count($this->projects)) {
    foreach ($this->projects as $project) {
        $link_project = JRoute::_(TrackslibHelperRoute::getProjectRoute($project->slug));
        $link_ranking = JRoute::_(TrackslibHelperRoute::getRankingRoute($project->slug));
        $link_teams_ranking = JRoute::_(TrackslibHelperRoute::getTeamRankingRoute($project->slug));
        ?>
				<tr>
					<td>
						<a href="<?php 
        echo $link_project;
        ?>
" title="<?php 
        echo JText::_('COM_TRACKS_Display');
        ?>
">
							<?php 
        echo $project->name;
        ?>
						</a>