From: Alexander Ebert Date: Sat, 21 Oct 2017 11:37:55 +0000 (+0200) Subject: Added an option to display polls across the full width X-Git-Tag: 3.1.0_Beta_2~12 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3f03556;p=GitHub%2FWoltLab%2FWCF.git Added an option to display polls across the full width Closes #2449 --- diff --git a/com.woltlab.wcf/option.xml b/com.woltlab.wcf/option.xml index 535a300d9d..12b35f8242 100644 --- a/com.woltlab.wcf/option.xml +++ b/com.woltlab.wcf/option.xml @@ -1521,6 +1521,11 @@ DESC:wcf.global.sortOrder.descending 2 100 + diff --git a/com.woltlab.wcf/templates/poll.tpl b/com.woltlab.wcf/templates/poll.tpl index 95b39ff48b..0ecd3aa7dc 100644 --- a/com.woltlab.wcf/templates/poll.tpl +++ b/com.woltlab.wcf/templates/poll.tpl @@ -7,7 +7,7 @@ {/if} -
+

{$poll->question} {#$poll->votes}

@@ -35,7 +35,7 @@
{hascontent} -
canVote() && $__pollView === 'result' && !$poll->canSeeResult()} style="display: none"{/if}> +
canVote() && $__pollView === 'result'} style="display: none"{/if}> {content} {if $__wcf->getUser()->userID} diff --git a/constants.php b/constants.php index ed9c59ba37..272ac696bb 100644 --- a/constants.php +++ b/constants.php @@ -198,6 +198,7 @@ define('SEARCH_RESULTS_PER_PAGE', 20); define('SEARCH_DEFAULT_SORT_FIELD', 'time'); define('SEARCH_DEFAULT_SORT_ORDER', 'DESC'); define('POLL_MAX_OPTIONS', 20); +define('POLL_FULL_WIDTH', 0); define('MEDIA_SMALL_THUMBNAIL_WIDTH', 280); define('MEDIA_SMALL_THUMBNAIL_HEIGHT', 210); define('MEDIA_SMALL_THUMBNAIL_RETAIN_DIMENSIONS', 1); diff --git a/wcfsetup/install/files/style/ui/poll.scss b/wcfsetup/install/files/style/ui/poll.scss index a82ec43d25..366129c891 100644 --- a/wcfsetup/install/files/style/ui/poll.scss +++ b/wcfsetup/install/files/style/ui/poll.scss @@ -27,9 +27,15 @@ padding: 10px 0; @include screen-sm-up { - float: left; - margin-right: 20px; - max-width: 50%; + &.pollContainerFullWidth { + margin-bottom: 20px; + } + + &:not(.pollContainerFullWidth) { + float: left; + margin-right: 20px; + max-width: 50%; + } } h2 { diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 901d5e78ab..6cf99459c5 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -1264,6 +1264,7 @@ + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 624f658c31..1f538eb6c7 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -1249,6 +1249,7 @@ +