{!! Theme::section('community.pannel.cms.pages-menu',['subpage'=>'']) !!}

<script src="{{Theme::asset()->get('theme/js/jquery.js')}}"></script>
<script src="{{Theme::asset()->get('theme/js/chartinator.js')}}" ></script>
<script src="{{Theme::asset()->get('theme/js/charts.js')}}" ></script>

<br />
<span class="community-pannel-heading">
    <a href="{{$community->present()->url('survey/'.$survey->slug)}}" class="brand-colored-texts">{{$survey->title}}</a>  {{trans('formsurveys.report')}}
    
     <a class="btn btn-sm black-color-button pull-right" href="{{$community->present()->url('exportsurveydata')}}/{{$survey->id}}" title="Export as Excel"> {{trans('formsurveys.export-as-excel')}}</a>

</span>
<br />
<br />

<div class="">
     <div class="box survey-response-box">
     
		  <?php $qsid="";?>	
          
     	  @foreach($questions as $question)
          
          	{!! Theme::section('community.pannel.cms.surveys.graphical-view',['question'=>$question,'qsid'=>$qsid,'community'=>$community,'survey'=>$survey,'subQuest'=>'']) !!}
            
             <?php
			 	$subQuestions=$options=app('App\\Repositories\\CommunitySurveyQuestionsRepository')->getSubQuestions($survey->id,$community->id,$question->id);			 
			 	$sqsid=1;			 	
			 ?>
             
             @if($subQuestions)
             		@foreach($subQuestions as $sbq)
                    		{!! Theme::section('community.pannel.cms.surveys.graphical-view',['question'=>$sbq,'qsid'=>$sqsid,'community'=>$community,'survey'=>$survey,'subQuest'=>'yes']) !!}
                            
                            <?php $sqsid++;?>	
                    @endforeach
             @endif
             
             <?php //$qsid++;?>	
         @endforeach
     </div>    
</div>
<br />
