advpoll-ranking.tpl.php in Advanced Poll 7.3
File
advpoll_ranking/templates/advpoll-ranking.tpl.php
View source
<?php
$tableId = 'advpolltable-' . $node->nid;
drupal_add_tabledrag($tableId, 'match', 'sibling', 'advpoll-weight', NULL, NULL, FALSE);
$choices = $data->choices;
?>
<ul class="selectable-list">
<?php
$row = 0;
?>
<?php
foreach ($choices as $choice) {
?>
<li class="selectable">
<span class="choice"><?php
print $choice['choice'];
?></span>
<a class="vote add" href="" style="display: none"><?php
print t('Add');
?> ></a>
<a class="vote remove" href="" style="display: none">(x)</a>
<select id="edit-choice-<?php
print $row;
?>" class="form-select" name="choice[<?php
print $row;
?>]" >
<option value="0">--</option>
<?php
for ($i = 0; $i < $data->max_choices; $i++) {
?>
<option value="<?php
print $i + 1;
?>"><?php
print $i + 1;
?></option>
<?php
}
?>
</select>
<?php
$row++;
?>
</li>
<?php
}
?>
<?php
if ($data->write_in) {
?>
<li class="selectable">
<span class="choice"><?php
print t('Other (Write-in)');
?></span>
<a class="vote add" href="" style="display: none"><?php
print t('Add');
?> ></a>
<a class="vote remove" href="" style="display: none">(x)</a>
<input id="edit-write-in" class="form-text" type="text" maxlength="128" size="30" value="" name="write_in" />
</li>
<?php
}
?>
</ul>
<table id="<?php
print $tableId;
?>" class="sticky-enabled advpoll-ranking-table-wrapper" data-nid="<?php
print $node->nid;
?>">
<thead>
<tr>
<th><?php
print t('Your Vote');
?></th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $i < $data->max_choices; $i++) {
?>
<tr class="draggable">
<td class="advpoll-weight"></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr class="submit-row"><td></td></tr>
<tr class="message"><td><p><?php
print t('Votes remaining: @votes', array(
'@votes' => $data->max_choices,
));
?></p></td></tr>
</tfoot>
</table>