@extends('admin.layout') @section('admin-title') Event Settings @endsection @section('admin-content') {!! breadcrumbs(['Admin Panel' => 'admin', 'Event Settings' => 'admin/grants/event-settings']) !!}

Event Settings @if ($currency->id) Clear Event Currency @endif

This page displays information about the current event currency and any global tracking. You may also clear all users' event score here.

@if ($currency->id)

The current event currency is {{ $currency->name }}.

Global Event Score

@if (Settings::get('event_global_score'))

There is currently global tracking of event score. The current total is {!! $currency->display($total ? $total->quantity : 0) !!}.

Users can view information about the current global score here: {!! Form::text('url', url('event-tracking'), ['class' => 'form-control mb-4', 'disabled']) !!} This page includes information from a text page. @if (Auth::user()->hasPower('edit_pages')) You can edit this page here. @endif

@if (Settings::get('event_global_goal') != 0)

Goal

The current goal is set to {!! $currency->display(Settings::get('event_global_goal')) !!}. Note that no action is taken automatically as a result of user progress, so any rewards, etc. will need to be distributed through other means.

@if ($total && $total->quantity > 0)
{{ $total ? $total->quantity : 0 }}/{{ Settings::get('event_global_goal') }}
@endif
@else

There is no goal set.

@endif @else

There is not currently global tracking of event score.

@endif @else

The set currency does not exist.

@endif

Team Settings

Teams are currently {{ Settings::get('event_teams') ? 'enabled' : 'disabled' }}.

Here you can set teams that users may join as part of an event. Note that teams must be enabled for this to have any effect, but you may still adjust these settings, e.g. to perform setup, with the setting disabled. Teams can optionally have a logo image.
Much like with event score, a team's score will increase when one of its members gains event currency (by the amount of currency gained). Additionally, once a team is created, its raw score can be adjusted. If weighting is enabled, the weighted score will also be displayed.

Note that teams may not be removed while teams are enabled, as a safety precaution while an event is running.

{!! Form::open(['url' => 'admin/event-settings/teams', 'files' => true]) !!}
Add Team
@foreach ($teams as $team)
@if ($team->has_image)
{!! Form::checkbox('remove_image[' . $team->id . ']', 1, 0, ['data-toggle' => 'tooltip', 'title' => 'Remove Image', 'aria-label' => 'Remove Image']) !!}
@endif {!! Form::text('name[' . $team->id . ']', $team->name, ['class' => 'form-control', 'placeholder' => 'Team Name', 'aria-label' => 'Team Name']) !!} {!! Form::number('score[' . $team->id . ']', $team->score, ['class' => 'form-control', 'placeholder' => 'Team Score (Raw)', 'aria-label' => 'Team Score (Raw)']) !!} @if (Settings::get('event_weighting')) {!! Form::number('weighted[' . $team->id . ']', $team->weightedScore, ['class' => 'form-control', 'placeholder' => 'Team Score (Weighted)', 'aria-label' => 'Team Score (Weighted)', 'disabled']) !!} @endif
{!! Form::file('image[' . $team->id . ']', ['class' => 'custom-file-input', 'id' => 'team-' . $team->id]) !!} {!! Form::label('image[' . $team->id . ']', 'Team Logo (Optional)', ['class' => 'custom-file-label']) !!}
×
@endforeach
{!! Form::submit('Submit', ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!}
{!! Form::text('name[]', null, ['class' => 'form-control', 'placeholder' => 'Team Name', 'aria-label' => 'Team Name']) !!}
{!! Form::file('image[]', ['class' => 'custom-file-input']) !!} {!! Form::label('image[]', 'Team Logo (Optional)', ['class' => 'custom-file-label']) !!}
×
@endsection