Esempio n. 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();
     $params = $mainframe->getParams();
     $ordering = $params->def('subround_order', 0);
     $ordering = $ordering ? 'DESC' : 'ASC';
     $projectround_id = JRequest::getVar('id', 0, '', 'int');
     $model = $this->getModel();
     $subroundresults = $model->getSubrounds($projectround_id, 0, $ordering);
     $round = $model->getRound($projectround_id);
     $project = $model->getRoundProject($projectround_id);
     $projectparams = $model->getParams($project->id);
     $breadcrumbs = $mainframe->getPathWay();
     $breadcrumbs->addItem($round->name, TrackslibHelperRoute::getRoundResultRoute($projectround_id));
     $document = JFactory::getDocument();
     $document->setTitle($round->name . ' - ' . $project->name);
     //print_r($subroundresults);exit;
     //		$this->assignRef('points_attrib', $points_attrib);
     $this->assignRef('results', $subroundresults);
     $this->assignRef('round', $round);
     $this->assignRef('project', $project);
     $this->assignRef('projectparams', $projectparams);
     $this->assignRef('params', $params);
     parent::display($tpl);
 }
Esempio n. 2
0
    <tr<?php 
            echo $result->rank == 1 ? 'class="winner"' : '';
            ?>
>
      <?php 
            if ($this->params->get('indview_results_showteam', 1)) {
                ?>
      <td><?php 
                echo $result->teamname;
                ?>
</td>
      <?php 
            }
            ?>
      <td><?php 
            echo JHTML::link(JRoute::_(TrackslibHelperRoute::getRoundResultRoute($result->prslug)), $result->roundname);
            ?>
</td>
      <?php 
            if ($this->params->get('indview_results_showrace', 1)) {
                ?>
      <td><?php 
                echo $result->subroundname;
                ?>
</td>
      <?php 
            }
            ?>
      <?php 
            if ($this->params->get('indview_results_showperformance', 1)) {
                ?>
Esempio n. 3
0
            break;
        }
    }
    ?>
  </tbody>
</table>
<?php 
} else {
    ?>
<span class="no_res"><?php 
    echo JText::_('MOD_TRACKS_RESULTS_NO_RESULTS');
    ?>
</span>
<?php 
}
$link = JRoute::_(TrackslibHelperRoute::getRoundResultRoute($round->projectround_id));
?>
<a class="fulltablelink" href="<?php 
echo $link;
?>
"
             title="<?php 
echo JText::_('MOD_TRACKS_RESULTS_View_full_table');
?>
">
            <?php 
echo JText::_('MOD_TRACKS_RESULTS_View_full_table');
?>
</a>
</div>
Esempio n. 4
0
echo JText::_('COM_TRACKS_Round');
?>
</th>
			<th><?php 
echo JText::_('COM_TRACKS_Date');
?>
</th>
			<th><?php 
echo JText::_('COM_TRACKS_Winner');
?>
</th>
		</tr>
		<?php 
$k = 0;
foreach ($this->results as $result) {
    $link_round = JRoute::_(TrackslibHelperRoute::getRoundResultRoute($result->slug));
    ?>
			<tr class="<?php 
    echo $k++ % 2 ? 'd1' : 'd0';
    ?>
">
				<td>
					<a href="<?php 
    echo $link_round;
    ?>
" title="<?php 
    echo JText::_('COM_TRACKS_Display');
    ?>
">
						<?php 
    echo $result->round_name;