<div class="col-lg-12"> <?php $form = $this->beginWidget('ActiveForm', array('htmlOptions' => array('role' => 'form', 'class' => 'form-inline'), 'method' => 'get', 'action' => array('/competition/index'))); ?> <?php echo Html::formGroup($model, 'year', array(), $form->labelEx($model, 'year'), CHtml::dropDownList('year', $model->year, Competition::getYears(), array('class' => 'form-control', 'prompt' => Yii::t('common', 'All')))); ?> <?php echo Html::formGroup($model, 'type', array(), $form->labelEx($model, 'type'), CHtml::dropDownList('type', $model->type, Competition::getTypes(), array('class' => 'form-control', 'prompt' => Yii::t('common', 'All')))); ?> <?php echo Html::formGroup($model, 'province', array(), $form->labelEx($model, 'province'), CHtml::dropDownList('province', $model->province, Region::getProvinces(false), array('class' => 'form-control', 'prompt' => Yii::t('common', 'All')))); ?> <?php echo Html::formGroup($model, 'event', array(), $form->labelEx($model, 'event'), CHtml::dropDownList('event', $model->event, Events::getNormalTranslatedEvents(), array('class' => 'form-control', 'prompt' => Yii::t('common', 'All')))); ?> <button type="submit" class="btn btn-theme"><?php echo Yii::t('common', 'Submit'); ?> </button> <?php $this->endWidget(); ?> <?php $this->widget('GridView', array('dataProvider' => $model->search(), 'template' => '{summary}{items}{pager}', 'enableSorting' => false, 'front' => true, 'emptyText' => Yii::t('Competition', 'No competitions now.'), 'rowCssClassExpression' => '$data->isInProgress() ? "success" : ($data->isEnded() ? "active" : "info")', 'columns' => array(array('name' => 'date', 'type' => 'raw', 'value' => '$data->getDisplayDate()'), array('name' => 'name', 'type' => 'raw', 'value' => '$data->getCompetitionLink()'), array('name' => 'province_id', 'type' => 'raw', 'value' => '$data->getLocationInfo("province")'), array('name' => 'city_id', 'type' => 'raw', 'value' => '$data->getLocationInfo("city")'), array('name' => 'venue', 'type' => 'raw', 'value' => '$data->getLocationInfo("venue")')))); ?> </div>
<div class="col-lg-12 competition-wca"> <p class="text-muted"><small><?php echo Yii::t('statistics', 'Generated on {time}.', array('{time}' => date('Y-m-d H:i:s', $time))); ?> </small></p> <?php $form = $this->beginWidget('ActiveForm', array('htmlOptions' => array('role' => 'form', 'class' => 'form'), 'method' => 'get', 'action' => array('/results/statistics', 'name' => 'best-podiums'))); ?> <div class="form-group row"> <?php foreach (array_chunk(Events::getNormalTranslatedEvents(), 3, true) as $events) { ?> <div class="col-md-4 col-xs-6"> <div class="row"> <?php foreach ($events as $eventId => $name) { ?> <div class="col-xs-4"> <div class="checkbox"> <label> <?php echo CHtml::radioButton('event', $eventId == $event, array('value' => $eventId)); ?> <?php echo CHtml::tag('span', array('class' => 'event-icon event-icon-' . $eventId), ' '); ?> </label> </div> </div> <?php }
<div class="col-lg-12 competition-wca"> <p class="text-muted"><small><?php echo Yii::t('statistics', 'Generated on {time}.', array('{time}' => date('Y-m-d H:i:s', $time))); ?> </small></p> <?php $form = $this->beginWidget('ActiveForm', array('htmlOptions' => array('role' => 'form', 'class' => 'form-inline'), 'method' => 'get', 'action' => array('/results/statistics', 'name' => 'top-100'))); ?> <div class="form-group"> <label for="event"><?php echo Yii::t('common', 'Event'); ?> </label> <?php echo CHtml::dropDownList('event', $event, Events::getNormalTranslatedEvents(), array('class' => 'form-control')); ?> </div> <div class="form-group"> <label for="gender"><?php echo Yii::t('common', 'Gender'); ?> </label> <?php echo CHtml::dropDownList('gender', $gender, Persons::getGenders(), array('class' => 'form-control')); ?> </div> <?php foreach (Results::getRankingTypes() as $_type) { ?> <?php echo CHtml::tag('button', array('type' => 'submit', 'name' => 'type', 'value' => $_type, 'class' => 'btn btn-' . ($type == $_type ? 'warning' : 'theme')), Yii::t('common', ucfirst($_type)));
foreach ($persons as $person) { ?> <td<?php echo $this->getWinnerCSSClass($winners, $person, 'averageSumOfWR'); ?> > <?php echo $person['results']['sumOfRanks'][1]->ranks["WR"]; ?> </td> <?php } ?> </tr> <?php foreach (Events::getNormalTranslatedEvents() as $eventId => $eventName) { ?> <?php if (isset($eventIds[$eventId])) { ?> <?php $nonAverage = in_array("{$eventId}", array('333mbf', '444bf', '555bf')) || !$eventIds[$eventId]; ?> <tr class="event-row"> <td colspan="<?php echo 2 + count($persons); ?> "> </td> </tr> <tr class="event-row"> <td colspan="<?php
<div class="col-lg-12 competition-<?php echo strtolower($competition->type); ?> "> <?php $form = $this->beginWidget('ActiveForm', array('htmlOptions' => array('role' => 'form', 'class' => 'form-inline'), 'method' => 'get', 'action' => $competition->getUrl('competitors'))); ?> <div class="form-group"> <label for="event"><?php echo Yii::t('common', 'Psych Sheet'); ?> </label> <?php echo CHtml::dropDownList('sort', $this->sGet('sort'), array_intersect_key(Events::getNormalTranslatedEvents(), $competition->getRegistrationEvents()), array('class' => 'form-control', 'prompt' => '')); ?> </div> <button type="submit" class="btn btn-theme"><?php echo Yii::t('common', 'Submit'); ?> </button> <?php $this->endWidget(); ?> <?php $columns = $competition->getEventsColumns(); ?> <?php $this->widget('RepeatHeaderGridView', array('dataProvider' => $model->search($columns), 'front' => true, 'footerOnTop' => true, 'columns' => $columns)); ?> </div>
<div class="form-group"> <label for="region"><?php echo Yii::t('common', 'Region'); ?> </label> <?php echo CHtml::dropDownList('region', $model->region, Region::getWCARegions(), array('class' => 'form-control')); ?> </div> <div class="form-group"> <label for="event"><?php echo Yii::t('common', 'Event'); ?> </label> <?php echo CHtml::dropDownList('event', $model->event, Events::getNormalTranslatedEvents(), array('class' => 'form-control', 'prompt' => Yii::t('common', 'All'))); ?> </div> <div class="form-group"> <label for="name"><?php echo Yii::t('Results', 'Name, City or Venue'); ?> </label> <?php echo CHtml::textField('name', $model->name, array('class' => 'form-control')); ?> </div> <button type="submit" class="btn btn-theme"><?php echo Yii::t('common', 'Submit'); ?> </button>
<div class="row clearfix"> <div class="col-lg-3 col-md-4 col-sm-6"> <?php echo CHtml::dropdownList('event', '', array_intersect_key(Events::getNormalTranslatedEvents(), array_flip(array_map(function ($result) { return $result->eventId; }, $results))), array('class' => 'form-control')); ?> </div> </div> <?php Yii::app()->clientScript->registerScript('dropdownEvents', <<<EOT \$('select[name="event"]').on('change', function() { location.href = '#' + \$(this).val(); }); EOT );