<tbody> @foreach(Character::activeCharacters()->orderBy('name')->get() as $c) <?php //Find the relevant thread $topic = ForumPost::where('body', "[[questionnaire/{$c->id}]]")->first(); ?> <tr> <td> @if($topic) <a href="/forums/topic/{{$topic->topic->id}}">{{$c->name}}</a> @else {{$c->name}} @endif </td> <?php $biographies = CharacterQuestionnaire::where('character_id', $c->id)->where('response', '!=', '')->get(); $experience = CharacterBiographyExperience::where('character_id', $c->id)->first(); ?> <td> {{$biographies->count()}} </td> <td> @if($c->backstory_file) <a href="/content/backstories/{{$c->backstory_file}}"> <i class="icon-book"></i> </a> @endif </td> <td> @if($experience && $experience->questionnaire_xp) <i class='icon-check'></i>
@stop @section('dashboard-content') <div class="row left"> <h2 class="character-title">Character Biography</h2> <p> Please answer the following questions with as much information as you're comfortable giving. This questionnaire is worth an experience point when all ten questions are filled out. You can come back and edit your entries, but you only receive experience for the first time. </p> <form action="/dashboard/character/{{$character->id}}/biography/submit" method="post" enctype="multipart/form-data"> @foreach(RulebookQuestionnaire::all() as $index => $q) <div class="panel"> <b>{{$index + 1}}. {{$q->question}}</b> <input type="hidden" name="ids[]" value="{{$q->id}}" /> <?php $response = CharacterQuestionnaire::where(['character_id' => $character->id, 'questionnaire_id' => $q->id])->first(); ?> <textarea name="replies[]" class="questionnaire-reply"> {{$response ? $response->response : ""}} </textarea> </div> @endforeach <div class="panel"> <b>If you have a backstory for your character, upload it here.</b> {{ Form::file('backstory'); }} </div> <input type="submit" class="button small success" value="Submit" /> </form> </div> @stop