Skip to content

Commit

Permalink
-aggiunta evento su inserimento formazione
Browse files Browse the repository at this point in the history
-aggiunti abbr
  • Loading branch information
fiste788 committed Sep 28, 2012
1 parent bf609dc commit 6cffca0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 17 deletions.
15 changes: 13 additions & 2 deletions inc/db/formazione.db.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,19 @@ public function save($parameters = NULL) {
} else
$success = ($success and $schieramento->delete());
}
if ($success)
self::commit();
if ($success) {
$evento = new Evento();
$evento->setIdExternal($idFormazione);
$evento->setIdUtente($this->getIdUtente());
$evento->setLega($this->getUtente()->getIdLega());
$evento->setTipo(Evento::FORMAZIONE);
if($evento->save())
self::commit();
else {
self::rollback ();
return FALSE;
}
}
else {
self::rollback();
return FALSE;
Expand Down
2 changes: 1 addition & 1 deletion tpl/classifica.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<tr>
<th>P.</th>
<th class="nowrap">Nome</th>
<th class="nowrap">P.ti tot</th>
<th class="nowrap"><abbr title="Punti totali">PTot</abbr></th>
</tr>
</thead>
<tbody>
Expand Down
10 changes: 5 additions & 5 deletions tpl/dettaglioSquadra.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
<th>Nome</th>
<th class="center">Ruolo</th>
<th class="center">Club</th>
<th class="center">PG</th>
<th class="center">MVoti</th>
<th class="center">MPunti</th>
<th class="center"><abbr title="Partite giocate">PG</abbr></th>
<th class="center"><abbr title="Media voto">MV</abbr></th>
<th class="center"><abbr title="Media punti">MP</abbr></th>
<th class="hidden-phone center">Gol</th>
<th class="hidden-phone center">Gol subiti</th>
<th class="hidden-phone center">Assist</th>
<th class="hidden-phone center">Amm</th>
<th class="hidden-phone center">Esp</th>
<th class="hidden-phone center"><abbr title="Ammonizioni">Amm</abbr></th>
<th class="hidden-phone center"><abbr title="Espulsioni">Esp</abbr></th>
</tr>
</thead>
<tbody>
Expand Down
18 changes: 9 additions & 9 deletions tpl/giocatoriLiberi.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
<?php if(!PARTITEINCORSO && GIORNATA != 1 && $_SESSION['legaView'] == $_SESSION['idLega']): ?><th>Acq.</th><?php endif; ?>
<th>Nome</th>
<th class="hidden-phone">Club</th>
<th>M. p.ti</th>
<th>M. voti</th>
<th><abbr title="Media punti">MP</abbr></th>
<th><abbr title="Media voti">M. voti</abbr></th>
<th>Partite</th>
</tr>
</thead>
<tbody>
<?php foreach($this->freeplayer as $key => $val): ?>
<?php foreach($this->freeplayer as $giocatore): ?>
<tr>
<?php if(!PARTITEINCORSO && GIORNATA != 1 && $_SESSION['legaView'] == $_SESSION['idLega']): ?><td class="check"><input class="radio" type="radio" name="acquista" value="<?php echo $val->id; ?>" /></td><?php endif; ?>
<td><?php echo $val; ?></td>
<td class="hidden-phone"><?php echo strtoupper(substr($val->nomeClub,0,3)); ?></td>
<td<?php if($val->avgPunti >= $this->defaultSufficenza && GIORNATA != 1) echo ' class="alert-success"';elseif(GIORNATA != 1)echo ' class="alert-error"'; ?>><?php echo (!empty($val->avgPunti)) ? $val->avgPunti : "&nbsp;"; ?></td>
<td<?php if($val->avgVoti >= $this->defaultSufficenza && GIORNATA != 1)echo ' class="alert-success"';elseif(GIORNATA != 1)echo ' class="alert-error"'; ?>><?php echo (!empty($val->avgVoti)) ? $val->avgVoti : "&nbsp;"; ?></td>
<td<?php if($val->presenzeVoto >= $this->defaultPartite && GIORNATA != 1)echo ' class="alert-success"';elseif(GIORNATA != 1)echo ' class="alert-error"'; ?>><?php echo $val->presenzeVoto; ?></td>
<?php if(!PARTITEINCORSO && GIORNATA != 1 && $_SESSION['legaView'] == $_SESSION['idLega']): ?><td class="check"><input class="radio" type="radio" name="acquista" value="<?php echo $giocatore->id; ?>" /></td><?php endif; ?>
<td><a href="<?php Links::getLink('dettaglioGiocatore', array('id'=>$giocatore->getId())) ?>"><?php echo $giocatore; ?></a></td>
<td class="hidden-phone"><?php echo strtoupper(substr($giocatore->nomeClub,0,3)); ?></td>
<td<?php if($giocatore->avgPunti >= $this->defaultSufficenza && GIORNATA != 1) echo ' class="alert-success"';elseif(GIORNATA != 1)echo ' class="alert-error"'; ?>><?php echo (!empty($giocatore->avgPunti)) ? $giocatore->avgPunti : "&nbsp;"; ?></td>
<td<?php if($giocatore->avgVoti >= $this->defaultSufficenza && GIORNATA != 1)echo ' class="alert-success"';elseif(GIORNATA != 1)echo ' class="alert-error"'; ?>><?php echo (!empty($giocatore->avgVoti)) ? $giocatore->avgVoti : "&nbsp;"; ?></td>
<td<?php if($giocatore->presenzeVoto >= $this->defaultPartite && GIORNATA != 1)echo ' class="alert-success"';elseif(GIORNATA != 1)echo ' class="alert-error"'; ?>><?php echo $giocatore->presenzeVoto; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
Expand Down

0 comments on commit 6cffca0

Please sign in to comment.