示例#1
0
 /**
  * redirects to correct view...
  *
  * @return bool
  *
  * @throws Exception
  */
 public function onBeforeAdd()
 {
     $user = JFactory::getUser();
     if (!$user) {
         throw new Exception('access not allowed', 403);
     }
     // If the user is logged, check if he already has a profile
     $model = FOFModel::getTmpInstance('IndividualEdits', 'TracksModel');
     $ind = $model->getUserIndividual($user->get('id'));
     if (!$ind) {
         $allow_register = JComponentHelper::getParams('com_tracks')->get('user_registration', 0);
         if (!$allow_register) {
             throw new Exception('Create individuals not allowed', 403);
         }
         // Redirect to individual edit
         $link = JRoute::_(TrackslibHelperRoute::getEditIndividualRoute());
     } else {
         // Redirect to individual edit
         $link = JRoute::_(TrackslibHelperRoute::getEditIndividualRoute($ind));
     }
     $this->setRedirect($link);
     $this->redirect();
     // We shouldn't arrive at that point ;)
     return false;
 }
示例#2
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)
 {
     if ($this->getLayout() == 'edit') {
         $this->displayForm($tpl);
         return;
     }
     RHelperAsset::load('tracks.css');
     $mainframe = JFactory::getApplication();
     $id = JRequest::getVar('id', 0, '', 'int');
     $model = $this->getModel();
     $data = $model->getItem($id);
     $individuals = $this->get('Individuals');
     // Parse description with content plugins
     $data->description = JHTML::_('content.prepare', $data->description);
     $breadcrumbs = $mainframe->getPathWay();
     $breadcrumbs->addItem($data->name, TrackslibHelperRoute::getTeamRoute($id));
     $document = JFactory::getDocument();
     $document->setTitle($data->name);
     $user = JFactory::getUser();
     $this->canEdit = $user->get('id') && ($user->authorise('core.manage', 'com_tracks') || $user->get('id') == $data->admin_id);
     if ($data->picture) {
         $attribs['class'] = "pic";
         $data->picture = JHTML::image(JURI::root() . $data->picture, $data->name, $attribs);
     }
     $this->data = $data;
     $this->individuals = $individuals;
     parent::display($tpl);
 }
示例#3
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);
 }
示例#4
0
 public function save()
 {
     $result = parent::save();
     $model = $this->getThisModel();
     if ($result) {
         $id = $model->getId();
         $url = TrackslibHelperRoute::getIndividualRoute($id);
         $this->setRedirect($url, JText::_('COM_TRACKS_INDIVIDUAL_SAVED'));
         return true;
     }
     return $result;
 }
示例#5
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();
     $model = $this->getModel();
     $rows = $model->getData();
     $document = JFactory::getDocument();
     $document->setTitle(JText::_('COM_TRACKS_All_Teams'));
     $breadcrumbs = $mainframe->getPathWay();
     $breadcrumbs->addItem(JText::_('COM_TRACKS_All_Teams'), TrackslibHelperRoute::getTeamsRoute());
     $this->assignRef('rows', $rows);
     parent::display($tpl);
 }
示例#6
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();
     $projectId = JFactory::getApplication()->input->getInt('p', 0);
     $model = $this->getModel();
     $results = $model->getResults($projectId);
     $project = $model->getProject($projectId);
     $params = $model->getParams();
     $document = JFactory::getDocument();
     $document->setTitle($project->name);
     $breadcrumbs = $mainframe->getPathWay();
     $breadcrumbs->addItem($project->name, TrackslibHelperRoute::getProjectRoute($project->id));
     $this->assignRef('results', $results);
     $this->assignRef('project', $project);
     $this->assignRef('params', $params);
     parent::display($tpl);
 }
示例#7
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);
 }
示例#8
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);
     $params = $mainframe->getParams();
     $model = $this->getModel();
     $individuals = $model->getIndividuals($project_id);
     $project = $model->getProject($project_id);
     $projectparams = $model->getParams($project_id);
     $breadcrumbs = $mainframe->getPathWay();
     $breadcrumbs->addItem($project->name . ' ' . JText::_('COM_TRACKS_Participants'), TrackslibHelperRoute::getParticipantsRoute($project_id));
     $document = JFactory::getDocument();
     $document->setTitle($project->name . ' ' . JText::_('COM_TRACKS_Participants'));
     $this->assignRef('params', $params);
     $this->assignRef('project', $project);
     $this->assignRef('projectparams', $projectparams);
     $this->assignRef('individuals', $individuals);
     parent::display($tpl);
 }
示例#9
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();
     if ($this->getLayout() == 'edit') {
         $this->displayForm($tpl);
         return;
     }
     $user = JFactory::getUser();
     $params = $mainframe->getParams('com_tracks');
     $document = JFactory::getDocument();
     $dispatcher = JDispatcher::getInstance();
     JPluginHelper::importPlugin('tracks');
     JPluginHelper::importPlugin('content');
     $data = $this->get('Item');
     $attribs['class'] = "pic";
     if ($data->picture != '') {
         $data->picture = JHTML::image(JURI::root() . $data->picture, $data->first_name . ' ' . $data->last_name, $attribs);
     } else {
         $data->picture = JHTML::image(JURI::root() . 'media/com_tracks/images/misc/tnnophoto.jpg', $data->first_name . ' ' . $data->last_name, $attribs);
     }
     if ($data->picture_small != '') {
         $data->picture_small = JHTML::image(JURI::root() . $data->picture_small, $data->first_name . ' ' . $data->last_name, $attribs);
     } else {
         $data->picture_small = JHTML::image(JURI::root() . 'media/com_tracks/images/misc/tnnophoto.jpg', $data->first_name . ' ' . $data->last_name, $attribs);
     }
     $raceResults = $this->sortResultsByProject($this->get('RaceResults'));
     $show_edit_link = $user->id && $user->id == $data->user_id || $user->authorise('core.manage', 'com_tracks');
     $breadcrumbs = $mainframe->getPathWay();
     $breadcrumbs->addItem($data->first_name . ' ' . $data->last_name, TrackslibHelperRoute::getEditIndividualRoute($data->id));
     $document->setTitle($data->first_name . ' ' . $data->last_name);
     // Allow content plugins
     $data->description = JHTML::_('content.prepare', $data->description);
     $this->assignRef('data', $data);
     $this->assignRef('show_edit_link', $show_edit_link);
     $this->assignRef('results', $raceResults);
     $this->assignRef('params', $params);
     $this->assignRef('dispatcher', $dispatcher);
     parent::display($tpl);
 }
示例#10
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);
     $data = $this->get('data');
     $rounds = $this->get('rounds');
     $project = $this->get('project');
     $params = $this->get('Params');
     $params->merge(JComponentHelper::getParams('com_tracks'));
     $title = JText::sprintf('COM_TRACKS_view_project_results', $project->name);
     $breadcrumbs = $mainframe->getPathWay();
     $breadcrumbs->addItem($title, TrackslibHelperRoute::getProjectResultRoute($project_id));
     $document = JFactory::getDocument();
     $document->setTitle($title);
     $this->assignRef('params', $params);
     $this->assignRef('project', $project);
     $this->assignRef('rows', $data);
     $this->assignRef('rounds', $rounds);
     $this->assign('title', $title);
     parent::display($tpl);
 }
示例#11
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)
 {
     $mainframe = JFactory::getApplication();
     $user = JFactory::getUser();
     if (!$user->id) {
         print JText::_('COM_TRACKS_You_must_register_to_access_this_page');
         return;
     }
     $model = $this->getModel();
     $data = $model->getData($user->id);
     if (!$data->id) {
         // No tracks individual associated to profile
         $params = $mainframe->getParams('com_tracks');
         if ($params->get('user_registration')) {
             $mainframe->redirect(TrackslibHelperRoute::getEditIndividualRoute());
         } else {
             $msg = JText::_('COM_TRACKS_No_tracks_individual_associated_to_your_account');
             $mainframe->redirect('index.php?option=com_tracks', $msg);
         }
     }
     $mainframe->redirect(TrackslibHelperRoute::getIndividualRoute($data->id));
 }
示例#12
0
						<?php 
        }
        ?>
					<?php 
    }
    ?>
				</td>
			</tr>
		<?php 
}
?>
		</tbody>
	</table>
	<div class="icalbutton">
		<a href="<?php 
echo JRoute::_(TrackslibHelperRoute::getProjectRoute($this->project->slug) . '&format=ical');
?>
"
		   title="<?php 
echo JText::_('COM_TRACKS_ICAL_EXPORT');
?>
">
			<img src="<?php 
echo JURI::root() . '/media/com_tracks/images/ical.gif';
?>
"
			     alt="<?php 
echo JText::_('COM_TRACKS_ICAL_EXPORT');
?>
"/>
		</a>
示例#13
0
    ?>
        <td><?php 
    echo $ranking->points;
    ?>
</td>
      </tr>
      <?php 
    if (++$count >= $limit) {
        break;
    }
}
?>
  </tbody>
</table>
<?php 
$link = JRoute::_(TrackslibHelperRoute::getRankingRoute($project->slug));
?>
<a class="fulltablelink" href="<?php 
echo $link;
?>
"
             title="<?php 
echo JText::_('MOD_TRACKS_RANKING_View_full_table');
?>
">
            <?php 
echo JText::_('MOD_TRACKS_RANKING_View_full_table');
?>
</a>
</div>
示例#14
0
 */
defined('_JEXEC') or die('Restricted access');
?>

<div id="tracks">

	<h2><?php 
echo $this->project->name . ' ' . JText::_('COM_TRACKS_Participants');
?>
</h2>

	<ul class="individualsGallery">
		<?php 
foreach ($this->individuals as $obj) {
    $link_ind = JRoute::_(TrackslibHelperRoute::getIndividualRoute($obj->slug, $this->project->slug));
    $link_team = JRoute::_(TrackslibHelperRoute::getTeamRoute($obj->teamslug, $this->project->slug));
    ?>
			<li>
				<div>
					<a href="<?php 
    echo $link_ind;
    ?>
"
					   title="<?php 
    echo $obj->first_name . ' ' . $obj->last_name;
    ?>
">
						<?php 
    echo $obj->picture;
    ?>
					</a>
示例#15
0
    foreach ($column as $k => $c) {
        ?>
					<td>
						<?php 
        if ($k == 0) {
            ?>
							<div class="letter"><?php 
            echo $letter;
            ?>
</div>
						<?php 
        }
        ?>
						<?php 
        foreach ($c as $r) {
            $link_round = JRoute::_(TrackslibHelperRoute::getIndividualRoute($r->slug));
            $l = $this->firstLetter($r->{$first});
            if ($l != $letter) {
                $letter = $l;
                ?>
								<div class="letter"><?php 
                echo $letter;
                ?>
</div>
							<?php 
            }
            ?>
							<a href="<?php 
            echo $link_round;
            ?>
"
示例#16
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)) {
                ?>
示例#17
0
 /**
  * Tracks Search method
  *
  * The sql must return the following fields that are used in a common display
  * routine: href, title, section, created, text, browsernav
  *
  * @param   string  $text      Target search string
  * @param   string  $phrase    matching option, exact|any|all
  * @param   string  $ordering  ordering option, newest|oldest|popular|alpha|category
  * @param   mixed   $areas     An array if the search it to be restricted to areas, null if search all
  *
  * @return array
  */
 public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null)
 {
     $db = JFactory::getDbo();
     $app = JFactory::getApplication();
     $user = JFactory::getUser();
     $groups = implode(',', $user->getAuthorisedViewLevels());
     if (is_array($areas)) {
         if (!array_intersect($areas, array_keys($this->onContentSearchAreas()))) {
             return array();
         }
     }
     $limit = $this->params->def('search_limit', 50);
     $text = trim($text);
     if (!$text) {
         return array();
     }
     $section = JText::_('PLG_SEARCH_TRACKS_TRACKS');
     $rows = array();
     if (!$areas || in_array('tracksindividuals', $areas)) {
         $query = $db->getQuery(true);
         switch ($phrase) {
             // Search exact
             case 'exact':
                 $string = $db->Quote('%' . $db->escape($text, true) . '%', false);
                 $wheres2 = array();
                 $wheres2[] = 'LOWER(i.first_name) LIKE ' . $string;
                 $wheres2[] = 'LOWER(i.last_name) LIKE ' . $string;
                 $wheres2[] = 'LOWER(i.nickname) LIKE ' . $string;
                 $query->where('(' . implode(' OR ', $wheres2) . ')');
                 break;
                 // Search all or any
             // Search all or any
             case 'all':
             case 'any':
             default:
                 $words = explode(' ', $text);
                 $wheres = array();
                 foreach ($words as $word) {
                     $word = $db->Quote('%' . $db->escape($word, true) . '%', false);
                     $wheres2 = array();
                     $wheres2[] = 'LOWER(i.first_name) LIKE ' . $word;
                     $wheres2[] = 'LOWER(i.last_name) LIKE ' . $word;
                     $wheres2[] = 'LOWER(i.nickname) LIKE ' . $word;
                     $wheres[] = implode(' OR ', $wheres2);
                 }
                 $query->where('(' . implode($phrase == 'all' ? ') AND (' : ') OR (', $wheres) . ')');
                 break;
         }
         $query->order('i.last_name ASC, i.first_name ASC');
         $query->select('CONCAT_WS(", ", i.last_name, i.first_name) AS title')->select('CONCAT_WS( " / ", ' . $db->Quote($section) . ', ' . $db->Quote(JText::_('PLG_SEARCH_TRACKS_INDIVIDUALS')) . ' ) AS section')->select('CASE WHEN CHAR_LENGTH( i.alias ) THEN CONCAT_WS( \':\', i.id, i.alias ) ELSE i.id END AS slug')->select('NULL AS created')->select('2 AS browsernav')->from('#__tracks_individuals AS i');
         $db->setQuery($query, 0, $limit);
         $results = $db->loadObjectList();
         // The 'output' of the displayed link
         foreach ($results as $key => $row) {
             $results[$key]->href = TrackslibHelperRoute::getIndividualRoute($row->slug);
         }
         $rows = array_merge($rows, $results);
     }
     if (!$areas || in_array('tracksteams', $areas)) {
         $query = $db->getQuery(true);
         switch ($phrase) {
             case 'exact':
                 $string = $db->Quote('%' . $db->escape($text, true) . '%', false);
                 $query->where('LOWER(t.name) LIKE ' . $string);
                 break;
             case 'all':
             case 'any':
             default:
                 $words = explode(' ', $text);
                 $wheres = array();
                 foreach ($words as $word) {
                     $word = $db->Quote('%' . $db->escape($word, true) . '%', false);
                     $wheres[] = 'LOWER(t.name) LIKE ' . $word;
                 }
                 $query->where('(' . implode($phrase == 'all' ? ') AND (' : ') OR (', $wheres) . ')');
                 break;
         }
         switch ($ordering) {
             case 'alpha':
                 $query->order('t.name ASC');
                 break;
             case 'oldest':
             case 'popular':
             case 'newest':
             default:
                 $query->order('t.name ASC');
         }
         $query->select('t.name AS title')->select('CONCAT_WS( " / ", ' . $db->Quote($section) . ', ' . $db->Quote(JText::_('PLG_SEARCH_TRACKS_TEAMS')) . ' ) AS section')->select('CASE WHEN CHAR_LENGTH( t.alias ) THEN CONCAT_WS( \':\', t.id, t.alias ) ELSE t.id END AS slug')->select('NULL AS created')->select('"2" AS browsernav')->from('#__tracks_teams AS t');
         $db->setQuery($query, 0, $limit);
         $results = $db->loadObjectList();
         foreach ($results as $key => $row) {
             $results[$key]->href = TrackslibHelperRoute::getTeamRoute($row->slug);
         }
         $rows = array_merge($rows, $results);
     }
     if (!$areas || in_array('tracksprojects', $areas)) {
         $query = $db->getQuery(true);
         switch ($phrase) {
             case 'exact':
                 $string = $db->Quote('%' . $db->escape($text, true) . '%', false);
                 $query->where('LOWER(p.name) LIKE ' . $string);
                 break;
             case 'all':
             case 'any':
             default:
                 $words = explode(' ', $text);
                 $wheres = array();
                 foreach ($words as $word) {
                     $word = $db->Quote('%' . $db->escape($word, true) . '%', false);
                     $wheres[] = 'LOWER(p.name) LIKE ' . $word;
                 }
                 $query->where('(' . implode($phrase == 'all' ? ') AND (' : ') OR (', $wheres) . ')');
                 break;
         }
         switch ($ordering) {
             case 'alpha':
                 $query->order('p.name ASC');
                 break;
             case 'oldest':
             case 'popular':
             case 'newest':
             default:
                 $query->order('p.name ASC');
         }
         $query->select('p.name AS title')->select('CONCAT_WS( " / ", ' . $db->Quote($section) . ', ' . $db->Quote(JText::_('PLG_SEARCH_TRACKS_PROJECTS')) . ' ) AS section')->select('CASE WHEN CHAR_LENGTH( p.alias ) THEN CONCAT_WS( \':\', p.id, p.alias ) ELSE p.id END AS slug')->select('NULL AS created')->select(' "2" AS browsernav')->from('#__tracks_projects AS p');
         $db->setQuery($query, 0, $limit);
         $results = $db->loadObjectList();
         foreach ($results as $key => $row) {
             $results[$key]->href = TrackslibHelperRoute::getProjectRoute($row->slug);
         }
         $rows = array_merge($rows, $results);
     }
     if (!$areas || in_array('tracksrounds', $areas)) {
         $query = $db->getQuery(true);
         switch ($phrase) {
             case 'exact':
                 $string = $db->Quote('%' . $db->escape($text, true) . '%', false);
                 $query->where('LOWER(r.name) LIKE ' . $string);
                 break;
             case 'all':
             case 'any':
             default:
                 $words = explode(' ', $text);
                 $wheres = array();
                 foreach ($words as $word) {
                     $word = $db->Quote('%' . $db->escape($word, true) . '%', false);
                     $wheres[] = 'LOWER(r.name) LIKE ' . $word;
                 }
                 $query->where('(' . implode($phrase == 'all' ? ') AND (' : ') OR (', $wheres) . ')');
                 break;
         }
         switch ($ordering) {
             case 'alpha':
                 $query->order('r.name ASC');
                 break;
             case 'oldest':
             case 'popular':
             case 'newest':
             default:
                 $query->order('r.name ASC');
         }
         $query->select('r.name AS title')->select('CONCAT_WS( " / ", ' . $db->Quote($section) . ', ' . $db->Quote(JText::_('PLG_SEARCH_TRACKS_ROUNDS')) . ' ) AS section')->select('CASE WHEN CHAR_LENGTH( r.alias ) THEN CONCAT_WS( \':\', r.id, r.alias ) ELSE r.id END AS slug')->select('NULL AS created')->select('"2" AS browsernav')->from('#__tracks_rounds AS r');
         $db->setQuery($query, 0, $limit);
         $results = $db->loadObjectList();
         foreach ($results as $key => $row) {
             $results[$key]->href = TrackslibHelperRoute::getRoundRoute($row->slug);
         }
         $rows = array_merge($rows, $results);
     }
     return $rows;
 }
示例#18
0
</h3>
	<?php 
    foreach ($this->individuals as $proj) {
        ?>
	<div class="project-inds"><span class="project-title"><?php 
        echo current($proj)->project_name;
        ?>
</span>
	<?php 
        foreach ($proj as $i) {
            ?>
	<?php 
            $text = ($i->number ? $i->number . ' ' : '') . $i->first_name . ' ' . $i->last_name;
            ?>
	<div class="team-ind"><?php 
            echo JHTML::link(TrackslibHelperRoute::getIndividualRoute($i->slug, $i->projectslug), $text);
            ?>
</div>
	<?php 
        }
        ?>
	</div>
	<?php 
    }
}
?>
<div class="clear"></div>
<p class="copyright">
  <?php 
echo TrackslibHelperTools::footer();
?>
示例#19
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>
示例#20
0
    foreach ($column as $k => $c) {
        ?>
    <td>
      <?php 
        if ($k == 0) {
            ?>
      <div class="letter"><?php 
            echo $letter;
            ?>
</div>
      <?php 
        }
        ?>
      <?php 
        foreach ($c as $r) {
            $link_round = JRoute::_(TrackslibHelperRoute::getRoundRoute($r->slug));
            if ($letter != strtoupper(substr($r->name, 0, 1))) {
                $letter = strtoupper(substr($r->name, 0, 1));
                ?>
          <div class="letter"><?php 
                echo $letter;
                ?>
</div>
          <?php 
            }
            ?>
        <a href="<?php 
            echo $link_round;
            ?>
" title ="<?php 
            echo JText::_('COM_TRACKS_Display_details');
示例#21
0
echo JText::_('COM_TRACKS_Points');
?>
</th>
      <th><?php 
echo JText::_('COM_TRACKS_Wins');
?>
</th>
      <th><?php 
echo JText::_('COM_TRACKS_Best_rank');
?>
</th>
    </tr>
    <?php 
$k = 0;
foreach ($this->rankings as $ranking) {
    $link_team = JRoute::_(TrackslibHelperRoute::getTeamRoute($ranking->slug, $this->project->slug));
    ?>
      <tr class="<?php 
    echo $k++ % 2 ? 'd1' : 'd0';
    ?>
">
        <td><?php 
    echo $ranking->rank;
    ?>
</td>
        <?php 
    if ($this->projectparams->get('showflag') && $this->params->get('showflag')) {
        ?>
        <td>
          <?php 
        if ($ranking->country_code) {
示例#22
0
            ?>
					<th><?php 
            echo JText::_('COM_TRACKS_Points');
            ?>
</th>
				<?php 
        }
        ?>
			</tr>
			<?php 
        $k = 0;
        foreach ($subround->results as $result) {
            $ind_slug = $result->individual_id . ':' . JFilterOutput::stringURLSafe($result->first_name . ' ' . $result->last_name);
            $link_ind = JRoute::_(TrackslibHelperRoute::getIndividualRoute($ind_slug, $this->project->slug));
            $team_slug = $result->team_id . ':' . JFilterOutput::stringURLSafe($result->team_name);
            $link_team = JRoute::_(TrackslibHelperRoute::getTeamRoute($team_slug));
            ?>
				<tr class="<?php 
            echo $k++ % 2 ? 'd1' : 'd0';
            ?>
">
					<td>
						<?php 
            if ($result->rank) {
                echo $result->rank;
            } else {
                echo "-";
            }
            ?>
					</td>
					<?php 
示例#23
0
			<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>
					</td>
示例#24
0
			<?php 
}
?>
			<?php 
if (isset($this->data->projectdata->team_name) && !empty($this->data->projectdata->team_name)) {
    ?>
				<tr>
					<td width="100" align="right" class="key">
						<?php 
    echo JText::_('COM_TRACKS_INDIVIDUAL_TEAM');
    ?>
:
					</td>
					<td>
						<?php 
    echo JHTML::link(TrackslibHelperRoute::getTeamRoute($this->data->projectdata->teamslug, $this->data->projectdata->projectslug), $this->data->projectdata->team_name);
    ?>
					</td>
				</tr>
			<?php 
}
?>
			<?php 
if ($this->data->nickname) {
    ?>
				<tr>
					<td width="100" align="right" class="key">
						<label for="nickname">
							<?php 
    echo JText::_('COM_TRACKS_Nickname');
    ?>