Unverified Commit 52bd1e9e authored by GuilhermeGz's avatar GuilhermeGz Committed by GitHub
Browse files

Merge pull request #200 from GuilhermeGz/master

Atualizações
parents b782393e 1cdf15f3
......@@ -72,16 +72,11 @@ class AdministradorController extends Controller
public function analisar(Request $request){
$evento = Evento::find($request->evento_id);
$status = ['submetido', 'avaliado', 'aprovado', 'reprovado', 'corrigido'];
$withPath = '/usuarios/analisarProjetos?evento_id='.$evento->id;
if($request->column != null ) {
$status = [$request->column];
$withPath = '/usuarios/analisarProjetos/'.$request->column.'?evento_id='.$evento->id;
}
$trabalhos = Trabalho::where('evento_id', $evento->id)
->whereIn('status', $status)
->orderBy('titulo')
->paginate(10)
->withPath($withPath);
->paginate(10);
$funcaoParticipantes = FuncaoParticipantes::all();
// $participantes = Participante::where('trabalho_id', $id)->get();
......@@ -92,13 +87,7 @@ class AdministradorController extends Controller
}
// Utilizado para paginação de Collection
public function paginate($items, $perPage = 5, $page = null, $options = [])
{
$page = $page ?: (Paginator::currentPage() ?: 1);
$items = $items instanceof Collection ? $items : Collection::make($items);
return new LengthAwarePaginator($items->forPage($page, $perPage), $items->count(), $perPage, $page, $options);
}
public function analisarProposta(Request $request){
......
......@@ -95,10 +95,11 @@
{{$participante->user->name}};
@endforeach
</div>
<div class="col-md-12">
<h6 style="color: #234B8B; font-weight: bold;font-size: 13px;">{{$trabalho->grandeArea->nome}} > {{$trabalho->area->nome}} > {{$trabalho->subArea->nome}}</h6>
</div>
@if($trabalho->grande_area_id != null && $trabalho->area_id != null && $trabalho->sub_area_id != null)
<div class="col-md-12">
<h6 style="color: #234B8B; font-weight: bold;font-size: 13px;">{{$trabalho->grandeArea->nome}} > {{$trabalho->area->nome}} > {{$trabalho->subArea->nome}}</h6>
</div>
@endif
</div>
......@@ -113,7 +114,7 @@
<div class="row justify-content-center" >
<div class="col-md-11">
<br>
{{ $trabalhos->links() }}
{{ $trabalhos->appends(['evento_id' => $evento->id])->links() }}
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment