Active
Project:
Advanced Poll
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Mar 2013 at 12:59 UTC
Updated:
15 May 2015 at 05:46 UTC
Jump to comment: Most recent
In the theming department this module seems to be missing the key ability to theme the actual polling forms. We can theme the bar, the results, etc., but where is the template file for the actual polls themselves? Something akin to poll-vote.tpl.php that is included in the core Poll module.
I realize that advpoll has a couple of different types of forms (choice, ranking, drag-and-drop ranking), but shouldn't we provide template files for all of them?
For reference, here's poll-vote.tpl.php from the core Poll module:
<?php
/**
* @file
* Default theme implementation to display voting form for a poll.
*
* - $choice: The radio buttons for the choices in the poll.
* - $title: The title of the poll.
* - $block: True if this is being displayed as a block.
* - $vote: The vote button
* - $rest: Anything else in the form that may have been added via
* form_alter hooks.
*
* @see template_preprocess_poll_vote()
*
* @ingroup themeable
*/
?>
<div class="poll">
<div class="vote-form">
<div class="choices">
<?php if ($block): ?>
<div class="title"><?php print $title; ?></div>
<?php endif; ?>
<?php print $choice; ?>
</div>
<?php print $vote; ?>
</div>
<?php // This is the 'rest' of the form, in case items have been added. ?>
<?php print $rest ?>
</div>
Comments
Comment #0.0
jordanmagnuson commentedUpdated issue summary.
Comment #1
jordanmagnuson commentedComment #1.0
jordanmagnuson commentedUpdated issue summary.
Comment #2
jordanmagnuson commentedHere's what I've come up with as a starting point for
advpoll-choice-form.tpl.php. These variables (specifically the $choices variable) would just need to be supplied via a preprocess function.If someone can give me the go-ahead on this, I'd be happy to do the necessary preprocess and hook_theme work, and supply a patch.
Comment #2.0
jordanmagnuson commentedUpdated issue summary.
Comment #3
tripper54 commentedBy all means, please submit a patch!