File: D:/HostingSpaces/SBogers10/vebon.komma.pro/resources/views/audit/member/documentGroup.blade.php
<li ng-model="documentGroup"
ng-controller="documentGroupController"
ng-init="initialize({{$documentGroup->toJson()}}, {{$documentGroup->documents->keyBy('id')->toJson()}})"
class="document-group document-number {!! ($errors->has($documentGroup->id)?'group-error':'') !!}"
ng-class="faults[documentGroupId]?'group-error':'' "
>
<div class="document-content-wrapper">
<div class="document-content-header">
<h3>{{$documentGroup->name}}</h3>
<div class="nvt">
@if(!$documentGroup->required)
{!! Form::label('applicable_'.$documentGroup->id, Lang::get('audit.not_applicable')) !!}
{!! Form::checkbox('nvt['.$documentGroup->id.']','not_applicable',!$documentGroup->applicable,
[
'id'=> 'applicable_'.$documentGroup->id,
'ng-click' =>'updateApplicable(not_applicable)',
'ng-model' => 'not_applicable',
'disabled'=> ($audit->status == $audit::$open?null:'disabled')
] ) !!}
@endif
</div>
</div>
<p>{!! $documentGroup->description !!}</p>
{{--Files--}}
{{--New file--}}
<div class="new-file" ng-hide="not_applicable">
@if($audit->status == $audit::$open)
<button ngf-select="uploadFiles($files, $invalidFiles)" multiple
ngf-pattern="{{Config::get('vebon.ngfPattern')}}"
class="btn btn-add">
@lang('audit.add_files')
{{--<img class="add-icon" src="/images/icons/add.svg"/>--}}
</button>
@endif
</div>
{{--File list--}}
<ul class="files" ng-hide="not_applicable">
<li ng-repeat="f in files track by $index">
{{--File name--}}
<span class="file_name"><a href="/download/document/@{{f.id}}" target="_blank"><span class="icon-download"><img src="/images/icons/download.svg"/></span>@{{ f.file_name }}</a></span>
{{--Status switch--}}
<span class="status notJudged" ng-show="f.status == 0">@lang('audit.status.notJudged')</span>
<span class="status rejected" ng-show="f.status == 1">@lang('audit.status.rejected')</span>
<span class="status approved" ng-show="f.status == 2">@lang('audit.status.approved')</span>
<span class="status upload" ng-show="f.status == -1">@lang('audit.status.upload')</span>
<span class="status reviewed-in-practice" ng-show="f.status == 3">@lang('audit.status.reviewedInPractice')</span>
{{--Delete button--}}
@if($audit->status == $audit::$open)
<span class="deleteBtn"
ng-show="canIDelete(f)"
ng-click="deleteFilePopup(f.id)"
style="cursor:pointer">
<img src="/images/icons/delete.svg" />
</span>
@endif
</li>
<li ng-show="files.length == 0">
<span class="no-files">@lang('audit.no_files')</span>
</li>
</ul>
{{--End of files--}}
@if($errors->has($documentGroup->id))
<div class="error">
<span class="icon-reject-all"><img src="/images/icons/reject.svg"></span>{{$errors->first($documentGroup->id)}}
</div>
@endif
{{--Angular errors--}}
<div class="error" ng-show="faults[documentGroupId]" >
<span class="icon-reject-all"><img src="/images/icons/reject.svg"></span>
<span ng-show="faults[documentGroupId] == 'no_files'">@lang('audit.min_files_required',['min'=> 1])</span>
<span ng-show="faults[documentGroupId] == 'no_files_or_not_applicable'">@lang('audit.min_files_required_or_applicable',['min'=> 1])</span>
<span ng-show="faults[documentGroupId] == 'rejected_files'">@lang('audit.still_rejected_files')</span>
</div>
{{--Download all--}}
{{--<div class="document-download-all">--}}
{{--{!! HTML::linkRoute('download', Lang::get('audit.download-all'), ['type'=> 'documentGroup', 'id'=> $documentGroup->id], array('class'=>'btn btn-download-all')) !!}--}}
{{--</div>--}}
</div>
</li>