Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions dokuwiki/lib/plugins/doodle/doodle_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
global $ID;

$template = $this->template;
$is_closed = $this->params['closed'];
$c = count($template['choices']);
?>

Expand Down Expand Up @@ -42,18 +43,30 @@
<?php $fullname = '<a href="//people.php.net/user.php?username=' . $fullname.'">' .$fullname. '</a>';?>
<?php echo $userData['editLinks'].$fullname.$userData['username'] ?>
</td>
<?php for ($col = 0; $col < $c; $col++) {
echo $userData['choice'][$col];
} ?>
<?php
if ($is_closed || $INFO['userinfo']['name'] == $fullname) {
for ($col = 0; $col < $c; $col++) {
echo $userData['choice'][$col];
}
} else {
?><td class="votehidden" colspan="<?php echo $c ?>">&nbsp;</td><?php
}
?>
</tr>
<?php } ?>

<!-- Results / sum per column -->
<tr>
<th class="rightalign"><b><?php echo $template['result'] ?></b></th>
<?php for ($col = 0; $col < $c; $col++) { ?>
<th class="centeralign"><b><?php echo $template['count'][$col] ?></b></th>
<?php } ?>
<?php
if ($is_closed) {
for ($col = 0; $col < $c; $col++) {
?><th class="centeralign"><b><?php echo $template['count'][$col] ?></b></th><?php
}
} else {
?><th class="centeralign" colspan="<?php echo $c ?>"><?php echo count($template['doodleData']) ?></th><?php
}
?>
</tr>

<?php
Expand Down
5 changes: 5 additions & 0 deletions dokuwiki/lib/plugins/doodle/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ div.dokuwiki table.inline td.notokay {
border: 0;
color: rgba(0, 0, 0, 0);
}

div.dokuwiki table.inline td.votehidden {
background-color: #f3f3f3;
text-align: center;
}
62 changes: 62 additions & 0 deletions systems/doodle-hide-votes-in-progress.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
diff --git a/dokuwiki/lib/plugins/doodle/doodle_template.php b/dokuwiki/lib/plugins/doodle/doodle_template.php
index 0dafba4..843a7cd 100755
--- a/dokuwiki/lib/plugins/doodle/doodle_template.php
+++ b/dokuwiki/lib/plugins/doodle/doodle_template.php
@@ -9,6 +9,7 @@
global $ID;

$template = $this->template;
+ $is_closed = $this->params['closed'];
$c = count($template['choices']);
?>

@@ -42,18 +43,30 @@
<?php $fullname = '<a href="//people.php.net/user.php?username=' . $fullname.'">' .$fullname. '</a>';?>
<?php echo $userData['editLinks'].$fullname.$userData['username'] ?>
</td>
- <?php for ($col = 0; $col < $c; $col++) {
- echo $userData['choice'][$col];
- } ?>
+ <?php
+ if ($is_closed || $INFO['userinfo']['name'] == $fullname) {
+ for ($col = 0; $col < $c; $col++) {
+ echo $userData['choice'][$col];
+ }
+ } else {
+ ?><td class="votehidden" colspan="<?php echo $c ?>">&nbsp;</td><?php
+ }
+ ?>
</tr>
<?php } ?>

<!-- Results / sum per column -->
<tr>
<th class="rightalign"><b><?php echo $template['result'] ?></b></th>
-<?php for ($col = 0; $col < $c; $col++) { ?>
- <th class="centeralign"><b><?php echo $template['count'][$col] ?></b></th>
-<?php } ?>
+ <?php
+ if ($is_closed) {
+ for ($col = 0; $col < $c; $col++) {
+ ?><th class="centeralign"><b><?php echo $template['count'][$col] ?></b></th><?php
+ }
+ } else {
+ ?><th class="centeralign" colspan="<?php echo $c ?>"><?php echo count($template['doodleData']) ?></th><?php
+ }
+ ?>
</tr>

<?php
diff --git a/dokuwiki/lib/plugins/doodle/style.css b/dokuwiki/lib/plugins/doodle/style.css
index 0db25ee..661dfbc 100644
--- a/dokuwiki/lib/plugins/doodle/style.css
+++ b/dokuwiki/lib/plugins/doodle/style.css
@@ -27,3 +27,8 @@ div.dokuwiki table.inline td.notokay {
border: 0;
color: rgba(0, 0, 0, 0);
}
+
+div.dokuwiki table.inline td.votehidden {
+ background-color: #f3f3f3;
+ text-align: center;
+}