Update templates for poll
This commit is contained in:
parent
b2578f1718
commit
0253767ed9
4 changed files with 49 additions and 1 deletions
|
@ -103,7 +103,7 @@
|
|||
@if ($topic->closed)
|
||||
<span class="f-tclosed" title="{!! __('Closed') !!}"><span class="f-closedtxt">{!! __('Closed') !!}</span></span>
|
||||
@endif
|
||||
@if ($topic->poll_type)
|
||||
@if ($topic->poll_type > 0)
|
||||
<span class="f-tpoll" title="{!! __('Poll') !!}"><span class="f-polltxt">{!! __('Poll') !!}</span></span>
|
||||
@endif
|
||||
<a class="f-ftname" href="{!! $topic->link !!}">{{ $topic->censorSubject }}</a>
|
||||
|
|
42
app/templates/layouts/poll.forkbb.php
Normal file
42
app/templates/layouts/poll.forkbb.php
Normal file
|
@ -0,0 +1,42 @@
|
|||
<div class="f-post-poll">
|
||||
@if ($poll->canVote)
|
||||
<form>
|
||||
@endif
|
||||
@foreach ($poll->question as $q => $question)
|
||||
<fieldset id="id-question-{!! $q !!}" class="f-poll-q">
|
||||
<legend class="f-poll-ql">{!! __('Question %s legend', $q) !!}</legend>
|
||||
<h3 class="f-poll-qt">{{ $question }}</h3>
|
||||
@if ($poll->type[$q] > 1)
|
||||
<p class="f-poll-mult">{!! __('You can choose up to %s answers', $poll->type[$q]) !!}</p>
|
||||
@endif
|
||||
<ol class="f-poll-as">
|
||||
@foreach ($poll->answer[$q] as $a => $answer)
|
||||
<li id="id-answer-{!! $q . '-' . $a !!}" class="f-poll-a">
|
||||
@if ($poll->canVote || ! $poll->tid)
|
||||
<label class="f-poll-al">
|
||||
@if ($poll->type[$q] > 1)
|
||||
<input class="f-poll-ai" type="checkbox" name="poll_vote[{!! $q !!}][{!! $a !!}]" value="1" />
|
||||
@else
|
||||
<input class="f-poll-ai" type="radio" name="poll_vote[{!! $q !!}][0]" value="{!! $a !!}" />
|
||||
@endif
|
||||
<span class="f-poll-at">{{ $answer }}</span>
|
||||
</label>
|
||||
@elseif ($poll->canSeeResult)
|
||||
<span class="f-poll-at">{{ $answer }}</span>
|
||||
<span class="f-poll-ap">(votes 1 [100%])</span>
|
||||
<p class="f-poll-ab"><span style="width: 100%;"><span>100%</span></span></p>
|
||||
@else
|
||||
<label class="f-poll-al">
|
||||
<span class="f-poll-at">{{ $answer }}</span>
|
||||
</label>
|
||||
@endif
|
||||
</li>
|
||||
@endforeach
|
||||
</ol>
|
||||
<p class="f-poll-total">{!! __('In total voted: %s', 0) !!}</p>
|
||||
</fieldset>
|
||||
@endforeach
|
||||
@if ($poll->canVote)
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
|
@ -10,6 +10,9 @@
|
|||
<div class="f-post-main">
|
||||
{!! $p->previewHtml !!}
|
||||
</div>
|
||||
@if ($poll = $p->poll)
|
||||
@include ('layouts/poll')
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
||||
@endif
|
||||
|
|
|
@ -104,6 +104,9 @@
|
|||
<div class="f-post-main">
|
||||
{!! $post->html() !!}
|
||||
</div>
|
||||
@if (1 === $post->postNumber && ($poll = $p->poll))
|
||||
@include ('layouts/poll')
|
||||
@endif
|
||||
@if ($p->user->showSignature && $post->user->isSignature)
|
||||
<div class="f-post-signature">
|
||||
<hr>
|
||||
|
|
Loading…
Add table
Reference in a new issue