Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2019-02-03 22:24:21 +0300
committerdartcafe <github@dartcafe.de>2019-02-03 22:24:21 +0300
commit4eb755cd36f7d06609373420590f2dd80d2554bd (patch)
treeec612413db58262c3092149433f5c86130f78bbf /templates
parent3208335dd9fa9691864ad3736bcbac578043c6d8 (diff)
Added function to popovermenu
Diffstat (limited to 'templates')
-rw-r--r--templates/vote.tmpl.php89
1 files changed, 41 insertions, 48 deletions
diff --git a/templates/vote.tmpl.php b/templates/vote.tmpl.php
index f86b189d..795b823b 100644
--- a/templates/vote.tmpl.php
+++ b/templates/vote.tmpl.php
@@ -180,11 +180,6 @@
<ul class="flex-column table-body">
<?php
-
-
-
-
-
if ($votes !== null) {
//group by user
$others = array();
@@ -269,78 +264,76 @@
}
print_unescaped(' </div>');
print_unescaped(' </div>');
- ?>
+ ?>
+
<div class="actions">
<div class="icon-more popupmenu" value="1" id="expand_1"></div>
<div class="popovermenu bubble menu hidden" id="expanddiv_1">
<ul>
<li>
- <a class="menuitem alt-tooltip copy-link action permanent" href="#">
+ <a id="toggle-yes" class="toggle toggle-yes menuitem alt-tooltip copy-link action permanent" href="#">
<span class="icon-yes"></span>
<span><?php p($l->t('Say yes to all')); ?></span>
</a>
</li>
<li>
- <a class="menuitem alt-tooltip copy-link action permanent" href="#">
+ <a id="toggle-no" class="toggle toggle-no menuitem alt-tooltip copy-link action permanent" href="#">
<span class="icon-no"></span>
<span><?php p($l->t('Reset all (say no)')); ?></span>
</a>
</li>
-<?php if ($maybe === 'maybeallowed') :?>
+ <?php if ($maybe === 'maybeallowed') :?>
<li>
- <a class="menuitem alt-tooltip copy-link action permanent" href="#">
+ <a id="toggle-maybe" class="toggle toggle-maybe menuitem alt-tooltip copy-link action permanent" href="#">
<span class="icon-maybe"></span>
<span><?php p($l->t('Say maybe to all')); ?></span>
</a>
</li>
-<?php endif; ?>
+ <?php endif; ?>
</ul>
</div>
</div>
+ <?php
+ if ($maybe === 'maybeallowed') {
+ print_unescaped(' <div id="toggle-cell" class="toggle-cell has-tooltip maybe" title="' . $toggleTooltip . '">');
+ } else {
+ print_unescaped(' <div id="toggle-cell" class="toggle-cell has-tooltip yes" title="' . $toggleTooltip . '">');
+ }
+ print_unescaped(' <div class="toggle"></div>');
+ print_unescaped(' </div>');
+ print_unescaped('</div>');
+ print_unescaped('<div class="flex-row">');
-
-
- <?php
- if ($maybe === 'maybeallowed') {
- print_unescaped(' <div id="toggle-cell" class="toggle-cell has-tooltip maybe" title="' . $toggleTooltip . '">');
- } else {
- print_unescaped(' <div id="toggle-cell" class="toggle-cell has-tooltip yes" title="' . $toggleTooltip . '">');
- }
- print_unescaped(' <div class="toggle"></div>');
- print_unescaped(' </div>');
- print_unescaped('</div>');
- print_unescaped('<div class="flex-row">');
-
- $i_tot = 0;
- foreach ($options as $optionElement) {
- // see if user already has data for this event
- $class = 'no icon-no';
- $dataUnvoted = '';
- if (isset($userVoted)) {
- foreach ($userVoted as $vote) {
- if ($optionElement->getPollOptionText() === $vote->getVoteOptionText()) {
- $class = $vote->getVoteAnswer() . ' icon-' . $vote->getVoteAnswer();
- break;
- } else {
- $class = 'unvoted';
+ $i_tot = 0;
+ foreach ($options as $optionElement) {
+ // see if user already has data for this event
+ $class = 'no icon-no';
+ $dataUnvoted = '';
+ if (isset($userVoted)) {
+ foreach ($userVoted as $vote) {
+ if ($optionElement->getPollOptionText() === $vote->getVoteOptionText()) {
+ $class = $vote->getVoteAnswer() . ' icon-' . $vote->getVoteAnswer();
+ break;
+ } else {
+ $class = 'unvoted';
+ }
}
}
- }
- if ($class === 'unvoted') {
- $dataUnvoted = $l->t('New');
- $updatedPoll = true;
- }
+ if ($class === 'unvoted') {
+ $dataUnvoted = $l->t('New');
+ $updatedPoll = true;
+ }
- print_unescaped('<div class="poll-cell">');
- print_unescaped(' <div id="voteid_' . $optionElement->getId() . '" class="flex-column poll-cell active ' . $class . '" data-value="' . $optionElement->getPollOptionText() . '" data-unvoted="' . $dataUnvoted . '"></div>');
- print_unescaped('</div>');
- $i_tot++;
+ print_unescaped('<div class="poll-cell">');
+ print_unescaped(' <div id="voteid_' . $optionElement->getId() . '" class="flex-column poll-cell active ' . $class . '" data-value="' . $optionElement->getPollOptionText() . '" data-unvoted="' . $dataUnvoted . '"></div>');
+ print_unescaped('</div>');
+ $i_tot++;
+ }
+ print_unescaped('</div>');
+ print_unescaped('</li>');
}
- print_unescaped('</div>');
- print_unescaped('</li>');
- }
?>
</ul>
</div>