commit
64092660f9
|
|
@ -41,8 +41,11 @@ class QueueHandler
|
|||
exit($pdf_file);
|
||||
|
||||
PDF::setOutputMode('F'); // force to file
|
||||
PDF::html('Public.ViewEvent.Partials.PDFTicket', $data, $pdf_file);
|
||||
|
||||
if(count($this->event->ticket_sponsors)) {
|
||||
PDF::html('Public.ViewEvent.Partials.PDFSponsorTicket', $data, $pdf_file);
|
||||
} else {
|
||||
PDF::html('Public.ViewEvent.Partials.PDFTicket', $data, $pdf_file);
|
||||
}
|
||||
//1
|
||||
$this->orderMailer->sendOrderNotification($order);
|
||||
//2
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ class EventAttendeesController extends MyBaseController
|
|||
*
|
||||
* @param Request $request
|
||||
* @param $event_id
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function showAttendees(Request $request, $event_id)
|
||||
|
|
@ -66,11 +67,11 @@ class EventAttendeesController extends MyBaseController
|
|||
}
|
||||
|
||||
$data = [
|
||||
'attendees' => $attendees,
|
||||
'event' => $event,
|
||||
'sort_by' => $sort_by,
|
||||
'attendees' => $attendees,
|
||||
'event' => $event,
|
||||
'sort_by' => $sort_by,
|
||||
'sort_order' => $sort_order,
|
||||
'q' => $searchQuery ? $searchQuery : '',
|
||||
'q' => $searchQuery ? $searchQuery : '',
|
||||
];
|
||||
|
||||
return view('ManageEvent.Attendees', $data);
|
||||
|
|
@ -81,6 +82,7 @@ class EventAttendeesController extends MyBaseController
|
|||
*
|
||||
* @param Request $request
|
||||
* @param $event_id
|
||||
*
|
||||
* @return string|View
|
||||
*/
|
||||
public function showInviteAttendee(Request $request, $event_id)
|
||||
|
|
@ -96,7 +98,7 @@ class EventAttendeesController extends MyBaseController
|
|||
}
|
||||
|
||||
return view('ManageEvent.Modals.InviteAttendee', [
|
||||
'event' => $event,
|
||||
'event' => $event,
|
||||
'tickets' => $event->tickets()->lists('title', 'id'),
|
||||
]);
|
||||
}
|
||||
|
|
@ -106,18 +108,19 @@ class EventAttendeesController extends MyBaseController
|
|||
*
|
||||
* @param Request $request
|
||||
* @param $event_id
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function postInviteAttendee(Request $request, $event_id)
|
||||
{
|
||||
$rules = [
|
||||
'first_name' => 'required',
|
||||
'ticket_id' => 'required|exists:tickets,id,account_id,' . \Auth::user()->account_id,
|
||||
'email' => 'email|required',
|
||||
'ticket_id' => 'required|exists:tickets,id,account_id,' . \Auth::user()->account_id,
|
||||
'email' => 'email|required',
|
||||
];
|
||||
|
||||
$messages = [
|
||||
'ticket_id.exists' => 'The ticket you have selected does not exist',
|
||||
'ticket_id.exists' => 'The ticket you have selected does not exist',
|
||||
'ticket_id.required' => 'The ticket field is required. ',
|
||||
];
|
||||
|
||||
|
|
@ -125,7 +128,7 @@ class EventAttendeesController extends MyBaseController
|
|||
|
||||
if ($validator->fails()) {
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
'status' => 'error',
|
||||
'messages' => $validator->messages()->toArray(),
|
||||
]);
|
||||
}
|
||||
|
|
@ -203,7 +206,7 @@ class EventAttendeesController extends MyBaseController
|
|||
DB::commit();
|
||||
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'status' => 'success',
|
||||
'redirectUrl' => route('showEventAttendees', [
|
||||
'event_id' => $event_id,
|
||||
]),
|
||||
|
|
@ -216,7 +219,7 @@ class EventAttendeesController extends MyBaseController
|
|||
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
'error' => 'An error occurred while inviting this attendee. Please try again.'
|
||||
'error' => 'An error occurred while inviting this attendee. Please try again.',
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -227,6 +230,7 @@ class EventAttendeesController extends MyBaseController
|
|||
*
|
||||
* @param Request $request
|
||||
* @param $event_id
|
||||
*
|
||||
* @return string|View
|
||||
*/
|
||||
public function showImportAttendee(Request $request, $event_id)
|
||||
|
|
@ -242,7 +246,7 @@ class EventAttendeesController extends MyBaseController
|
|||
}
|
||||
|
||||
return view('ManageEvent.Modals.ImportAttendee', [
|
||||
'event' => $event,
|
||||
'event' => $event,
|
||||
'tickets' => $event->tickets()->lists('title', 'id'),
|
||||
]);
|
||||
}
|
||||
|
|
@ -253,12 +257,13 @@ class EventAttendeesController extends MyBaseController
|
|||
*
|
||||
* @param Request $request
|
||||
* @param $event_id
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function postImportAttendee(Request $request, $event_id)
|
||||
{
|
||||
$rules = [
|
||||
'ticket_id' => 'required|exists:tickets,id,account_id,' . \Auth::user()->account_id,
|
||||
'ticket_id' => 'required|exists:tickets,id,account_id,' . \Auth::user()->account_id,
|
||||
'attendees_list' => 'required|mimes:csv,txt|max:5000|',
|
||||
];
|
||||
|
||||
|
|
@ -269,7 +274,7 @@ class EventAttendeesController extends MyBaseController
|
|||
$validator = Validator::make($request->all(), $rules, $messages);
|
||||
if ($validator->fails()) {
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
'status' => 'error',
|
||||
'messages' => $validator->messages()->toArray(),
|
||||
]);
|
||||
|
||||
|
|
@ -357,8 +362,8 @@ class EventAttendeesController extends MyBaseController
|
|||
session()->flash('message', $num_added . ' Attendees Successfully Invited');
|
||||
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'id' => $attendee->id,
|
||||
'status' => 'success',
|
||||
'id' => $attendee->id,
|
||||
'redirectUrl' => route('showEventAttendees', [
|
||||
'event_id' => $event_id,
|
||||
]),
|
||||
|
|
@ -369,6 +374,7 @@ class EventAttendeesController extends MyBaseController
|
|||
* Show the printable attendee list
|
||||
*
|
||||
* @param $event_id
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function showPrintAttendees($event_id)
|
||||
|
|
@ -384,6 +390,7 @@ class EventAttendeesController extends MyBaseController
|
|||
*
|
||||
* @param Request $request
|
||||
* @param $attendee_id
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function showMessageAttendee(Request $request, $attendee_id)
|
||||
|
|
@ -392,7 +399,7 @@ class EventAttendeesController extends MyBaseController
|
|||
|
||||
$data = [
|
||||
'attendee' => $attendee,
|
||||
'event' => $attendee->event,
|
||||
'event' => $attendee->event,
|
||||
];
|
||||
|
||||
return view('ManageEvent.Modals.MessageAttendee', $data);
|
||||
|
|
@ -403,6 +410,7 @@ class EventAttendeesController extends MyBaseController
|
|||
*
|
||||
* @param Request $request
|
||||
* @param $attendee_id
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function postMessageAttendee(Request $request, $attendee_id)
|
||||
|
|
@ -416,7 +424,7 @@ class EventAttendeesController extends MyBaseController
|
|||
|
||||
if ($validator->fails()) {
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
'status' => 'error',
|
||||
'messages' => $validator->messages()->toArray(),
|
||||
]);
|
||||
}
|
||||
|
|
@ -424,11 +432,11 @@ class EventAttendeesController extends MyBaseController
|
|||
$attendee = Attendee::scope()->findOrFail($attendee_id);
|
||||
|
||||
$data = [
|
||||
'attendee' => $attendee,
|
||||
'attendee' => $attendee,
|
||||
'message_content' => $request->get('message'),
|
||||
'subject' => $request->get('subject'),
|
||||
'event' => $attendee->event,
|
||||
'email_logo' => $attendee->event->organiser->full_logo_path,
|
||||
'subject' => $request->get('subject'),
|
||||
'event' => $attendee->event,
|
||||
'email_logo' => $attendee->event->organiser->full_logo_path,
|
||||
];
|
||||
|
||||
//@todo move this to the SendAttendeeMessage Job
|
||||
|
|
@ -450,7 +458,7 @@ class EventAttendeesController extends MyBaseController
|
|||
}
|
||||
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'status' => 'success',
|
||||
'message' => 'Message Successfully Sent',
|
||||
]);
|
||||
}
|
||||
|
|
@ -459,12 +467,13 @@ class EventAttendeesController extends MyBaseController
|
|||
* Shows the 'Message Attendees' modal
|
||||
*
|
||||
* @param $event_id
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function showMessageAttendees(Request $request, $event_id)
|
||||
{
|
||||
$data = [
|
||||
'event' => Event::scope()->find($event_id),
|
||||
'event' => Event::scope()->find($event_id),
|
||||
'tickets' => Event::scope()->find($event_id)->tickets()->lists('title', 'id')->toArray(),
|
||||
];
|
||||
|
||||
|
|
@ -476,13 +485,14 @@ class EventAttendeesController extends MyBaseController
|
|||
*
|
||||
* @param Request $request
|
||||
* @param $event_id
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function postMessageAttendees(Request $request, $event_id)
|
||||
{
|
||||
$rules = [
|
||||
'subject' => 'required',
|
||||
'message' => 'required',
|
||||
'subject' => 'required',
|
||||
'message' => 'required',
|
||||
'recipients' => 'required',
|
||||
];
|
||||
|
||||
|
|
@ -490,7 +500,7 @@ class EventAttendeesController extends MyBaseController
|
|||
|
||||
if ($validator->fails()) {
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
'status' => 'error',
|
||||
'messages' => $validator->messages()->toArray(),
|
||||
]);
|
||||
}
|
||||
|
|
@ -508,7 +518,7 @@ class EventAttendeesController extends MyBaseController
|
|||
$this->dispatch(new SendMessageToAttendees($message));
|
||||
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'status' => 'success',
|
||||
'message' => 'Message Successfully Sent',
|
||||
]);
|
||||
}
|
||||
|
|
@ -603,6 +613,7 @@ class EventAttendeesController extends MyBaseController
|
|||
* @param Request $request
|
||||
* @param $event_id
|
||||
* @param $attendee_id
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function showEditAttendee(Request $request, $event_id, $attendee_id)
|
||||
|
|
@ -611,8 +622,8 @@ class EventAttendeesController extends MyBaseController
|
|||
|
||||
$data = [
|
||||
'attendee' => $attendee,
|
||||
'event' => $attendee->event,
|
||||
'tickets' => $attendee->event->tickets->lists('title', 'id'),
|
||||
'event' => $attendee->event,
|
||||
'tickets' => $attendee->event->tickets->lists('title', 'id'),
|
||||
];
|
||||
|
||||
return view('ManageEvent.Modals.EditAttendee', $data);
|
||||
|
|
@ -624,18 +635,19 @@ class EventAttendeesController extends MyBaseController
|
|||
* @param Request $request
|
||||
* @param $event_id
|
||||
* @param $attendee_id
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function postEditAttendee(Request $request, $event_id, $attendee_id)
|
||||
{
|
||||
$rules = [
|
||||
'first_name' => 'required',
|
||||
'ticket_id' => 'required|exists:tickets,id,account_id,' . Auth::user()->account_id,
|
||||
'email' => 'required|email',
|
||||
'ticket_id' => 'required|exists:tickets,id,account_id,' . Auth::user()->account_id,
|
||||
'email' => 'required|email',
|
||||
];
|
||||
|
||||
$messages = [
|
||||
'ticket_id.exists' => 'The ticket you have selected does not exist',
|
||||
'ticket_id.exists' => 'The ticket you have selected does not exist',
|
||||
'ticket_id.required' => 'The ticket field is required. ',
|
||||
];
|
||||
|
||||
|
|
@ -643,7 +655,7 @@ class EventAttendeesController extends MyBaseController
|
|||
|
||||
if ($validator->fails()) {
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
'status' => 'error',
|
||||
'messages' => $validator->messages()->toArray(),
|
||||
]);
|
||||
}
|
||||
|
|
@ -654,8 +666,8 @@ class EventAttendeesController extends MyBaseController
|
|||
session()->flash('message', 'Successfully Updated Attendee');
|
||||
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'id' => $attendee->id,
|
||||
'status' => 'success',
|
||||
'id' => $attendee->id,
|
||||
'redirectUrl' => '',
|
||||
]);
|
||||
}
|
||||
|
|
@ -666,6 +678,7 @@ class EventAttendeesController extends MyBaseController
|
|||
* @param Request $request
|
||||
* @param $event_id
|
||||
* @param $attendee_id
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function showCancelAttendee(Request $request, $event_id, $attendee_id)
|
||||
|
|
@ -674,8 +687,8 @@ class EventAttendeesController extends MyBaseController
|
|||
|
||||
$data = [
|
||||
'attendee' => $attendee,
|
||||
'event' => $attendee->event,
|
||||
'tickets' => $attendee->event->tickets->lists('title', 'id'),
|
||||
'event' => $attendee->event,
|
||||
'tickets' => $attendee->event->tickets->lists('title', 'id'),
|
||||
];
|
||||
|
||||
return view('ManageEvent.Modals.CancelAttendee', $data);
|
||||
|
|
@ -687,6 +700,7 @@ class EventAttendeesController extends MyBaseController
|
|||
* @param Request $request
|
||||
* @param $event_id
|
||||
* @param $attendee_id
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function postCancelAttendee(Request $request, $event_id, $attendee_id)
|
||||
|
|
@ -696,7 +710,7 @@ class EventAttendeesController extends MyBaseController
|
|||
|
||||
if ($attendee->is_cancelled) {
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'status' => 'success',
|
||||
'message' => 'Attendee Already Cancelled',
|
||||
]);
|
||||
}
|
||||
|
|
@ -714,7 +728,7 @@ class EventAttendeesController extends MyBaseController
|
|||
}
|
||||
|
||||
$data = [
|
||||
'attendee' => $attendee,
|
||||
'attendee' => $attendee,
|
||||
'email_logo' => $attendee->event->organiser->full_logo_path,
|
||||
];
|
||||
|
||||
|
|
@ -742,7 +756,7 @@ class EventAttendeesController extends MyBaseController
|
|||
|
||||
$request = $gateway->refund([
|
||||
'transactionReference' => $attendee->order->transaction_id,
|
||||
'amount' => $refund_amount,
|
||||
'amount' => $refund_amount,
|
||||
'refundApplicationFee' => false,
|
||||
]);
|
||||
|
||||
|
|
@ -778,7 +792,7 @@ class EventAttendeesController extends MyBaseController
|
|||
|
||||
if ($error_message) {
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
'status' => 'error',
|
||||
'message' => $error_message,
|
||||
]);
|
||||
}
|
||||
|
|
@ -786,8 +800,8 @@ class EventAttendeesController extends MyBaseController
|
|||
session()->flash('message', 'Successfully Cancelled Attenddee');
|
||||
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'id' => $attendee->id,
|
||||
'status' => 'success',
|
||||
'id' => $attendee->id,
|
||||
'redirectUrl' => '',
|
||||
]);
|
||||
}
|
||||
|
|
@ -797,6 +811,7 @@ class EventAttendeesController extends MyBaseController
|
|||
*
|
||||
* @param Request $request
|
||||
* @param $attendee_id
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function showResendTicketToAttendee(Request $request, $attendee_id)
|
||||
|
|
@ -805,7 +820,7 @@ class EventAttendeesController extends MyBaseController
|
|||
|
||||
$data = [
|
||||
'attendee' => $attendee,
|
||||
'event' => $attendee->event,
|
||||
'event' => $attendee->event,
|
||||
];
|
||||
|
||||
return view('ManageEvent.Modals.ResendTicketToAttendee', $data);
|
||||
|
|
@ -816,6 +831,7 @@ class EventAttendeesController extends MyBaseController
|
|||
*
|
||||
* @param Request $request
|
||||
* @param $attendee_id
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function postResendTicketToAttendee(Request $request, $attendee_id)
|
||||
|
|
@ -825,7 +841,7 @@ class EventAttendeesController extends MyBaseController
|
|||
$this->dispatch(new SendAttendeeTicket($attendee));
|
||||
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'status' => 'success',
|
||||
'message' => 'Ticket Successfully Resent',
|
||||
]);
|
||||
}
|
||||
|
|
@ -836,6 +852,7 @@ class EventAttendeesController extends MyBaseController
|
|||
*
|
||||
* @param Request $request
|
||||
* @param $attendee_id
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function showAttendeeTicket(Request $request, $attendee_id)
|
||||
|
|
@ -843,19 +860,28 @@ class EventAttendeesController extends MyBaseController
|
|||
$attendee = Attendee::scope()->findOrFail($attendee_id);
|
||||
|
||||
$data = [
|
||||
'order' => $attendee->order,
|
||||
'event' => $attendee->event,
|
||||
'tickets' => $attendee->ticket,
|
||||
'order' => $attendee->order,
|
||||
'event' => $attendee->event,
|
||||
'tickets' => $attendee->ticket,
|
||||
'attendees' => [$attendee],
|
||||
'css' => file_get_contents(public_path('assets/stylesheet/ticket.css')),
|
||||
'image' => base64_encode(file_get_contents(public_path($attendee->event->organiser->full_logo_path))),
|
||||
'css' => file_get_contents(public_path('assets/stylesheet/ticket.css')),
|
||||
'image' => base64_encode(file_get_contents(public_path($attendee->event->organiser->full_logo_path))),
|
||||
|
||||
];
|
||||
|
||||
if ($request->get('download') == '1') {
|
||||
return PDF::html('Public.ViewEvent.Partials.PDFTicket', $data, 'Tickets');
|
||||
if (count($this->event->ticket_sponsors)) {
|
||||
return PDF::html('Public.ViewEvent.Partials.PDFSponsorTicket', $data, 'Tickets');
|
||||
} else {
|
||||
return PDF::html('Public.ViewEvent.Partials.PDFTicket', $data, 'Tickets');
|
||||
}
|
||||
}
|
||||
|
||||
if (count($this->event->ticket_sponsors)) {
|
||||
return view('Public.ViewEvent.Partials.PDFSponsorTicket', $data);
|
||||
} else {
|
||||
return view('Public.ViewEvent.Partials.PDFTicket', $data);
|
||||
}
|
||||
return view('Public.ViewEvent.Partials.PDFTicket', $data);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -741,9 +741,18 @@ class EventCheckoutController extends Controller
|
|||
];
|
||||
|
||||
if ($request->get('download') == '1') {
|
||||
return PDF::html('Public.ViewEvent.Partials.PDFTicket', $data, 'Tickets');
|
||||
if(count($order->event->ticket_sponsors)) {
|
||||
PDF::html('Public.ViewEvent.Partials.PDFSponsorTicket', $data, 'Tickets');
|
||||
} else {
|
||||
PDF::html('Public.ViewEvent.Partials.PDFTicket', $data, 'Tickets');
|
||||
}
|
||||
}
|
||||
|
||||
if(count($this->event->ticket_sponsors)) {
|
||||
return view('Public.ViewEvent.Partials.PDFSponsorTicket', $data);
|
||||
} else {
|
||||
return view('Public.ViewEvent.Partials.PDFTicket', $data);
|
||||
}
|
||||
return view('Public.ViewEvent.Partials.PDFTicket', $data);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,182 @@
|
|||
<?php
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Event;
|
||||
use App\Models\Sponsor;
|
||||
use File;
|
||||
use Illuminate\Http\Request;
|
||||
use Image;
|
||||
use Validator;
|
||||
|
||||
class EventSponsorController extends MyBaseController
|
||||
{
|
||||
/* TODO: PROTECT THE SPONSORS FROM DELETION BY UNAUTHORIZED USERS */
|
||||
|
||||
/**
|
||||
* Show the Sponsor Overview Page
|
||||
*
|
||||
* @param int $event_id
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function showSponsors($event_id)
|
||||
{
|
||||
$data = $this->getEventViewData($event_id);
|
||||
|
||||
return view('ManageEvent.Sponsors', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Sponsor Create Modal
|
||||
*
|
||||
* @param $event_id
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function showCreateSponsor($event_id)
|
||||
{
|
||||
return view('ManageEvent.Modals.CreateSponsor', [
|
||||
'event' => Event::scope()->find($event_id),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Persist a new Sponsor to the Database
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param $event_id
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function postCreateSponsor(Request $request, $event_id)
|
||||
{
|
||||
$this->persistSponsor($request, null, $event_id);
|
||||
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'message' => 'The sponsor has been created',
|
||||
'redirectUrl' => route('showEventSponsors', [
|
||||
'event_id' => $event_id,
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Shows 'Manage Sponsor' modal
|
||||
*
|
||||
* @param Request $request
|
||||
* @param int $event_id
|
||||
* @param int $sponsor_id
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function showEditSponsor(Request $request, $event_id, $sponsor_id)
|
||||
{
|
||||
$data = [
|
||||
'sponsor' => Sponsor::find($sponsor_id),
|
||||
];
|
||||
|
||||
return view('ManageEvent.Modals.ManageSponsor', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Persist Sponsor Changes to the Database
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*
|
||||
* @param $event_id
|
||||
* @param $sponsor_id
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function postEditSponsor(Request $request, $event_id, $sponsor_id)
|
||||
{
|
||||
$this->persistSponsor($request, $sponsor_id);
|
||||
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'message' => 'The sponsor has been updated',
|
||||
'redirectUrl' => route('showEventSponsors', [
|
||||
'event_id' => $event_id,
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete a Sponsor
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*
|
||||
* @param $event_id
|
||||
* @param $sponsor_id
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function postDeleteSponsor(Request $request, $event_id, $sponsor_id)
|
||||
{
|
||||
Sponsor::where('id', $sponsor_id)->delete();
|
||||
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'message' => 'The sponsor has been deleted',
|
||||
'redirectUrl' => route('showEventSponsors', [
|
||||
'event_id' => $event_id,
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Persist a Sponsor to the Database
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param null|int $sponsor_id
|
||||
* @param null|int $event_id
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
private function persistSponsor(Request $request, $sponsor_id = null, $event_id = null)
|
||||
{
|
||||
$rules = [
|
||||
'name' => 'required|max:250',
|
||||
'sponsor_logo' => 'image',
|
||||
'on_ticket' => 'boolean',
|
||||
'is_active' => 'boolean',
|
||||
];
|
||||
|
||||
$validator = Validator::make($request->all(), $rules);
|
||||
|
||||
if ($validator->fails()) {
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
'messages' => $validator->messages()->toArray(),
|
||||
]);
|
||||
}
|
||||
|
||||
if ($sponsor_id) {
|
||||
$sponsor = Sponsor::findOrFail($sponsor_id);
|
||||
} else {
|
||||
$sponsor = new Sponsor;
|
||||
|
||||
/* TODO: Protect this by checking which events the authenticated users can manage */
|
||||
$sponsor->event_id = $event_id;
|
||||
}
|
||||
|
||||
if ($request->hasFile('sponsor_logo')) {
|
||||
$file = $request->file('sponsor_logo');
|
||||
$name = md5_file($file->path()) . md5(time()) . '.' . $file->guessExtension();
|
||||
$path = 'user_content/sponsors/';
|
||||
|
||||
$file->move(public_path($path), $name);
|
||||
$sponsor->logo_path = $path . $name;
|
||||
}
|
||||
|
||||
$sponsor->on_ticket = $request->has('on_ticket');
|
||||
$sponsor->is_active = $request->has('is_active');
|
||||
$sponsor->name = $request->get('name');
|
||||
|
||||
$sponsor->save();
|
||||
}
|
||||
}
|
||||
|
|
@ -596,6 +596,43 @@ Route::group(['middleware' => ['auth', 'first.run']], function () {
|
|||
'uses' => 'EventWidgetsController@showEventWidgets',
|
||||
]);
|
||||
|
||||
|
||||
/*
|
||||
* ---------
|
||||
* Sponsors
|
||||
* ---------
|
||||
*/
|
||||
Route::get('{event_id}/sponsors', [
|
||||
'as' => 'showEventSponsors',
|
||||
'uses' => 'EventSponsorController@showSponsors',
|
||||
]);
|
||||
|
||||
Route::get('{event_id}/sponsors/create', [
|
||||
'as' => 'showCreateSponsor',
|
||||
'uses' => 'EventSponsorController@showCreateSponsor',
|
||||
]);
|
||||
|
||||
Route::post('{event_id}/sponsors/create', [
|
||||
'as' => 'postCreateSponsor',
|
||||
'uses' => 'EventSponsorController@postCreateSponsor'
|
||||
]);
|
||||
|
||||
Route::get('{event_id}/sponsors/{sponsor_id}/edit', [
|
||||
'as' => 'showEditSponsor',
|
||||
'uses' => 'EventSponsorController@showEditSponsor'
|
||||
]);
|
||||
|
||||
Route::post('{event_id}/sponsors/{sponsor_id}/edit', [
|
||||
'as' => 'postEditSponsor',
|
||||
'uses' => 'EventSponsorController@postEditSponsor'
|
||||
]);
|
||||
|
||||
Route::post('{event_id}/sponsors/{sponsor_id}/delete', [
|
||||
'as' => 'postDeleteSponsor',
|
||||
'uses' => 'EventSponsorController@postDeleteSponsor'
|
||||
]);
|
||||
|
||||
|
||||
/*
|
||||
* -------
|
||||
* Event Survey page
|
||||
|
|
|
|||
|
|
@ -73,7 +73,11 @@ class GenerateTicket extends Job implements ShouldQueue
|
|||
];
|
||||
|
||||
PDF::setOutputMode('F'); // force to file
|
||||
PDF::html('Public.ViewEvent.Partials.PDFTicket', $data, $file_path);
|
||||
if(count($event->ticket_sponsors)) {
|
||||
PDF::html('Public.ViewEvent.Partials.PDFSponsorTicket', $data, $file_path);
|
||||
} else {
|
||||
PDF::html('Public.ViewEvent.Partials.PDFTicket', $data, $file_path);
|
||||
}
|
||||
|
||||
Log::info("Ticket generated!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,26 @@ class Event extends MyBaseModel
|
|||
return $this->belongsToMany(\App\Models\Question::class, 'event_question');
|
||||
}
|
||||
|
||||
/**
|
||||
* The sponsors associated with the event.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function sponsors()
|
||||
{
|
||||
return $this->hasMany(Sponsor::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* The ticket_sponsors associated with the event.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function ticket_sponsors()
|
||||
{
|
||||
return $this->hasMany(Sponsor::class)->where('on_ticket', 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* The questions associated with the event.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -159,7 +159,12 @@ class Order extends MyBaseModel
|
|||
}
|
||||
|
||||
PDF::setOutputMode('F'); // force to file
|
||||
PDF::html('Public.ViewEvent.Partials.PDFTicket', $data, $pdf_file_path);
|
||||
|
||||
if(count($this->event->ticket_sponsors)) {
|
||||
PDF::html('Public.ViewEvent.Partials.PDFSponsorTicket', $data, $pdf_file_path);
|
||||
} else {
|
||||
PDF::html('Public.ViewEvent.Partials.PDFTicket', $data, $pdf_file_path);
|
||||
}
|
||||
|
||||
$this->ticket_pdf_path = config('attendize.event_pdf_tickets_path') . '/' . $this->order_reference . '.pdf';
|
||||
$this->save();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
/*
|
||||
Attendize.com - Event Management & Ticketing
|
||||
*/
|
||||
class Sponsor extends \Illuminate\Database\Eloquent\Model
|
||||
{
|
||||
/**
|
||||
* Get the full logo path of the sponsor.
|
||||
*
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function getFullLogoPathAttribute()
|
||||
{
|
||||
if ($this->logo_path && (file_exists(config('attendize.cdn_url_user_assets') . '/' . $this->logo_path) || file_exists(public_path($this->logo_path)))) {
|
||||
return config('attendize.cdn_url_user_assets') . '/' . $this->logo_path;
|
||||
}
|
||||
|
||||
return config('attendize.fallback_organiser_logo_url');
|
||||
}
|
||||
|
||||
public function scopeActive($query)
|
||||
{
|
||||
return $query->where('is_active', 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -92,7 +92,7 @@ return [
|
|||
*/
|
||||
|
||||
'key' => env('APP_KEY', 'SomeRandomString'),
|
||||
'cipher' => MCRYPT_RIJNDAEL_128,
|
||||
'cipher' => 'AES-256-CBC',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
@ -232,7 +232,6 @@ return [
|
|||
'Purifier' => Mews\Purifier\Facades\Purifier::class,
|
||||
'Markdown' => MaxHoffmann\Parsedown\ParsedownFacade::class,
|
||||
'Omnipay' => Omnipay\Omnipay::class,
|
||||
// 'Omnipay' => Omnipay\Omnipay::class,
|
||||
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateSponsorsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('sponsors', function($table){
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->integer('event_id')->unsigned()->index();
|
||||
$table->string('logo_path')->nullable()->default(null);
|
||||
$table->boolean('on_ticket');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('sponsors');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddActiveToSponsors extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('sponsors', function($table){
|
||||
$table->boolean('is_active')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('sponsors', function($table){
|
||||
$table->dropColumn('is_active');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +1,20 @@
|
|||
.ticket {
|
||||
/*page-break-after: always;*/
|
||||
padding: 10px;
|
||||
border: 1px solid #000;
|
||||
width: 700px;
|
||||
margin: 0 auto;
|
||||
margin-top: 20px;
|
||||
background: #000;
|
||||
position: relative;
|
||||
height: 330px;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
border-left-width: 3px;
|
||||
border-left-color: #000;
|
||||
overflow: hidden;
|
||||
/*
|
||||
* ---------
|
||||
* Variables
|
||||
* ---------
|
||||
*/
|
||||
.color-primary {
|
||||
color: #662483!important;
|
||||
}
|
||||
.color-alt {
|
||||
color: #f39200!important;
|
||||
}
|
||||
|
||||
/*
|
||||
* ---------
|
||||
* Global
|
||||
* ---------
|
||||
*/
|
||||
|
||||
.ticket table {
|
||||
width: 100%;
|
||||
|
|
@ -24,13 +25,46 @@
|
|||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.ticket h4 {
|
||||
font-size: 17px;
|
||||
margin: 6px auto;
|
||||
text-transform: uppercase;
|
||||
color: #999;
|
||||
|
||||
}
|
||||
|
||||
.ticket hr {
|
||||
border: none;
|
||||
border-bottom: 1px solid #ccc;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.ticket .barcode {
|
||||
.ticket .b-l-2{
|
||||
border-left: 2px solid #000;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ---------
|
||||
* No-Sponsors
|
||||
* ---------
|
||||
*/
|
||||
.ticket.no-sponsors {
|
||||
padding: 10px;
|
||||
border: 1px solid #000;
|
||||
width: 700px;
|
||||
margin: 0 auto;
|
||||
margin-top: 20px;
|
||||
position: relative;
|
||||
height: 330px;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
border-left-width: 3px;
|
||||
border-left-color: #000;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ticket.no-sponsors .barcode {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
position: absolute;
|
||||
|
|
@ -43,7 +77,7 @@
|
|||
background-color: #fdfdfd;
|
||||
}
|
||||
|
||||
.ticket .barcode_vertical {
|
||||
.ticket.no-sponsors .barcode_vertical {
|
||||
display: block;
|
||||
-moz-transform: rotate(-90deg);
|
||||
-ms-transform: rotate(-90deg);
|
||||
|
|
@ -57,24 +91,12 @@
|
|||
background: #fff;
|
||||
}
|
||||
|
||||
.ticket .top_barcode {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.ticket h4 {
|
||||
font-size: 17px;
|
||||
margin: 6px auto;
|
||||
text-transform: uppercase;
|
||||
color: #999;
|
||||
|
||||
}
|
||||
|
||||
.ticket .event_details, .ticket .attendee_details {
|
||||
.ticket.no-sponsors .event_details, .ticket.no-sponsors .attendee_details {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
}
|
||||
|
||||
.ticket .event_details {
|
||||
.ticket.no-sponsors .event_details {
|
||||
left: 175px;
|
||||
overflow: hidden;
|
||||
max-width: 210px;
|
||||
|
|
@ -83,7 +105,7 @@
|
|||
top: 50px;
|
||||
}
|
||||
|
||||
.ticket .attendee_details {
|
||||
.ticket.no-sponsors .attendee_details {
|
||||
left: 390px;
|
||||
overflow: hidden;
|
||||
max-width: 195px;
|
||||
|
|
@ -92,7 +114,7 @@
|
|||
top: 50px;
|
||||
}
|
||||
|
||||
.ticket .logo {
|
||||
.ticket.no-sponsors .logo {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
|
|
@ -103,6 +125,104 @@
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
.ticket .logo img {
|
||||
.ticket.no-sponsors .logo img {
|
||||
max-width: 110px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ---------
|
||||
* Sponsors
|
||||
* ---------
|
||||
*/
|
||||
|
||||
.ticket.sponsors h4{
|
||||
margin-top: 4rem;
|
||||
color:#000;
|
||||
font-weight:800;
|
||||
}
|
||||
|
||||
.ticket.sponsors span, .ticket.sponsors p{
|
||||
margin:0;
|
||||
}
|
||||
|
||||
.ticket.sponsors {
|
||||
page-break-after: always;
|
||||
margin: 0 auto;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
height: auto;
|
||||
font-size: 14px;
|
||||
color:#000;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ticket.sponsors .header {
|
||||
height: 150px;
|
||||
position: relative;
|
||||
margin-bottom:20px;
|
||||
font-size: 7rem;
|
||||
line-height: 75px;
|
||||
font-weight:300;
|
||||
}
|
||||
|
||||
.ticket.sponsors .ticket-type{
|
||||
font-size:3rem;
|
||||
margin-bottom:0;
|
||||
}
|
||||
|
||||
.ticket.sponsors .event-title{
|
||||
line-height:30px;
|
||||
font-weight:500;
|
||||
}
|
||||
|
||||
.ticket.sponsors .barcode {
|
||||
margin-top: 30px;
|
||||
text-align: center;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.ticket.sponsors .body {
|
||||
position: relative;
|
||||
padding-bottom: 5rem;
|
||||
}
|
||||
|
||||
.ticket.sponsors .body h4,
|
||||
.ticket.sponsors .body span
|
||||
.ticket.sponsors .body p{
|
||||
line-height:.3rem;
|
||||
}
|
||||
|
||||
.ticket.sponsors .ticket-data{
|
||||
padding-bottom: 2rem;
|
||||
padding-left: 3rem;
|
||||
}
|
||||
|
||||
.ticket.sponsors .logo{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ticket.sponsors .logo img {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.ticket.sponsors .footer {
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ticket.sponsors .sponsor{
|
||||
height: 10rem;
|
||||
}
|
||||
|
||||
.ticket.sponsors .sponsor:nth-child(1),
|
||||
.ticket.sponsors .sponsor:nth-child(2){
|
||||
margin:30px 0;
|
||||
}
|
||||
|
||||
.ticket.sponsors .footer img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
height:auto;
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<div role="dialog" class="modal fade" style="display: none;">
|
||||
{!! Form::open(array('url' => route('postCreateSponsor', array('event_id' => $event->id)), 'class' => 'ajax')) !!}
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header text-center">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h3 class="modal-title">
|
||||
<i class="ico-ticket"></i>
|
||||
Create Sponsor</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
{!! Form::label('name', 'Name', array('class'=>'control-label required')) !!}
|
||||
{!! Form::text('name', Input::old('name'),
|
||||
array(
|
||||
'class'=>'form-control',
|
||||
'placeholder'=>'Company ApS'
|
||||
)) !!}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
{!! Form::label('sponsor_logo', 'Sponsor Logo', array('class'=>'control-label ')) !!}
|
||||
{!! Form::styledFile('sponsor_logo') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<div class="well well-sm well-small">
|
||||
{!! Form::label('on_ticket', 'On Ticket?', array('class'=>'control-label ')) !!}
|
||||
{!! Form::checkbox('on_ticket', 1) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- /end modal body-->
|
||||
<div class="modal-footer">
|
||||
{!! Form::button('Cancel', ['class'=>"btn modal-close btn-danger",'data-dismiss'=>'modal']) !!}
|
||||
{!! Form::submit('Save Sponsor', ['class'=>"btn btn-success"]) !!}
|
||||
</div>
|
||||
</div><!-- /end modal content-->
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<div role="dialog" class="modal fade" style="display: none;">
|
||||
{!! Form::open(array('url' => route('postEditSponsor', ['event_id' => $sponsor->event_id, 'sponsor_id' => $sponsor->id]), 'class' => 'ajax')) !!}
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header text-center">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h3 class="modal-title">
|
||||
<i class="ico-ticket"></i>
|
||||
Edit {{ $sponsor->name }}</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
{!! Form::label('name', 'Name', array('class'=>'control-label required')) !!}
|
||||
{!! Form::text('name', $sponsor->name,
|
||||
array(
|
||||
'class'=>'form-control',
|
||||
'placeholder'=>'JapSeyz inc.'
|
||||
)) !!}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
{!! Form::label('sponsor_logo', 'Sponsor Logo', array('class'=>'control-label ')) !!}
|
||||
{!! Form::styledFile('sponsor_logo') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<div class="well well-sm well-small">
|
||||
{!! Form::label('on_ticket', 'On Ticket?', array('class'=>'control-label ')) !!}
|
||||
{!! Form::checkbox('on_ticket', 1, $sponsor->on_ticket) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<div class="well well-sm well-small">
|
||||
{!! Form::label('is_active', 'Active?', array('class'=>'control-label ')) !!}
|
||||
{!! Form::checkbox('is_active', 1, $sponsor->is_active) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- /end modal body-->
|
||||
<div class="modal-footer">
|
||||
{!! Form::button('Cancel', ['class'=>"btn modal-close btn-danger",'data-dismiss'=>'modal']) !!}
|
||||
{!! Form::submit('Save Sponsor', ['class'=>"btn btn-success"]) !!}
|
||||
</div>
|
||||
</div><!-- /end modal content-->
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -41,6 +41,12 @@
|
|||
<span class="text">Promote</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ Request::is('*sponsors*') ? 'active' : '' }}">
|
||||
<a href="{{route('showEventSponsors', array('event_id' => $event->id))}}">
|
||||
<span class="figure"><i class="ico-bullhorn"></i></span>
|
||||
<span class="text">Sponsors</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ Request::is('*customize*') ? 'active' : '' }}">
|
||||
<a href="{{route('showEventCustomize', array('event_id' => $event->id))}}">
|
||||
<span class="figure"><i class="ico-cog"></i></span>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<style>
|
||||
.ticket {
|
||||
border: 1px solid {{$event->ticket_border_color}};
|
||||
background: {{$event->ticket_bg_color}} ;
|
||||
background: {{$event->ticket_bg_color}};
|
||||
color: {{$event->ticket_sub_text_color}};
|
||||
border-left-color: {{$event->ticket_border_color}} ;
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
}
|
||||
</style>
|
||||
<div class="ticket">
|
||||
<div class="ticket no-sponsors">
|
||||
<div class="logo">
|
||||
{!! HTML::image(asset($image_path)) !!}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,77 @@
|
|||
@extends('Shared.Layouts.Master')
|
||||
|
||||
@section('title')
|
||||
@parent
|
||||
Sponsors
|
||||
@stop
|
||||
|
||||
@section('top_nav')
|
||||
@include('ManageEvent.Partials.TopNav')
|
||||
@stop
|
||||
|
||||
@section('menu')
|
||||
@include('ManageEvent.Partials.Sidebar')
|
||||
@stop
|
||||
|
||||
@section('page_title')
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-responsive">
|
||||
<button data-modal-id='CreateSponsor'
|
||||
data-href="{{route('showCreateSponsor', array('event_id'=>$event->id))}}"
|
||||
class='loadModal btn btn-success' type="button"><i class="ico-bullhorn"></i> Create Sponsor
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('page_header')
|
||||
<style>
|
||||
.page-header {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('head')
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="panel">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>On Ticket</th>
|
||||
<th colspan="2">Active</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($event->sponsors as $sponsor)
|
||||
<tr>
|
||||
<td>
|
||||
<a href='javascript:void(0);' data-modal-id='view-sponsor-{{ $sponsor->id }}' data-href="{{route('showEditSponsor', ['event_id'=>$event->id, 'sponsor_id' => $sponsor->id])}}" class="loadModal">{{ $sponsor->name }}</a>
|
||||
</td>
|
||||
<td>{{ $sponsor->on_ticket ? 'Yes' : 'No' }}</td>
|
||||
<td>{{ $sponsor->is_active ? 'Yes' : 'No' }}</td>
|
||||
<td>
|
||||
{!! Form::open(array('url' => route('postDeleteSponsor', ['event_id' => $event->id, 'sponsor_id' => $sponsor->id]), 'class' => 'ajax text-right')) !!}
|
||||
{!! Form::submit('Delete Sponsor', ['class'=>"btn btn-danger"]) !!}
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -55,7 +55,7 @@
|
|||
<div class="container">
|
||||
@foreach($attendees as $attendee)
|
||||
@if(!$attendee->is_cancelled)
|
||||
<div class="ticket">
|
||||
<div class="ticket no-sponsors">
|
||||
|
||||
<div class='logo'>
|
||||
<img alt="{{$event->organiser->full_logo_path}}" src="data:image/png;base64, {{$image}}" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue