Work on custom attendee questions
Start on moving surveys, widgets, check-in to their own pages Refactoring code Fix bug where tickets sales volume was not updating
This commit is contained in:
parent
6d101cea05
commit
ed4e86baa1
|
|
@ -358,6 +358,9 @@ class EventAttendeesController extends MyBaseController
|
|||
*/
|
||||
public function showExportAttendees($event_id, $export_as = 'xls')
|
||||
{
|
||||
|
||||
|
||||
|
||||
Excel::create('attendees-as-of-'.date('d-m-Y-g.i.a'), function ($excel) use ($event_id) {
|
||||
|
||||
$excel->setTitle('Attendees List');
|
||||
|
|
@ -368,6 +371,7 @@ class EventAttendeesController extends MyBaseController
|
|||
|
||||
$excel->sheet('attendees_sheet_1', function ($sheet) use ($event_id) {
|
||||
|
||||
|
||||
DB::connection()->setFetchMode(\PDO::FETCH_ASSOC);
|
||||
$data = DB::table('attendees')
|
||||
->where('attendees.event_id', '=', $event_id)
|
||||
|
|
@ -376,12 +380,21 @@ class EventAttendeesController extends MyBaseController
|
|||
->join('events', 'events.id', '=', 'attendees.event_id')
|
||||
->join('orders', 'orders.id', '=', 'attendees.order_id')
|
||||
->join('tickets', 'tickets.id', '=', 'attendees.ticket_id')
|
||||
->select(
|
||||
'attendees.first_name', 'attendees.last_name', 'attendees.email', 'attendees.reference', 'orders.order_reference', 'tickets.title', 'orders.created_at', DB::raw("(CASE WHEN attendees.has_arrived = 1 THEN 'YES' ELSE 'NO' END) AS `attendees.has_arrived`"), 'attendees.arrival_time')->get();
|
||||
//DB::raw("(CASE WHEN UNIX_TIMESTAMP(`attendees.arrival_time`) = 0 THEN '---' ELSE 'd' END) AS `attendees.arrival_time`"))
|
||||
->select([
|
||||
'attendees.first_name',
|
||||
'attendees.last_name',
|
||||
'attendees.email',
|
||||
'attendees.reference',
|
||||
'orders.order_reference',
|
||||
'tickets.title',
|
||||
'orders.created_at',
|
||||
DB::raw("(CASE WHEN attendees.has_arrived = 1 THEN 'YES' ELSE 'NO' END) AS `attendees.has_arrived`"),
|
||||
'attendees.arrival_time',
|
||||
'question_answers.answer_text'
|
||||
])->get();
|
||||
|
||||
$sheet->fromArray($data);
|
||||
|
||||
$event = Event::scope()->findOrFail($event_id);
|
||||
$sheet->row(1, [
|
||||
'First Name', 'Last Name', 'Email', 'Ticket Reference', 'Order Reference', 'Ticket Type', 'Purchase Date', 'Has Arrived', 'Arrival Time',
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
|||
|
||||
use App\Http\Requests\StoreEventQuestionRequest;
|
||||
use App\Models\Event;
|
||||
use App\Models\Attendee;
|
||||
use App\Models\Question;
|
||||
use App\Models\QuestionType;
|
||||
use Illuminate\Http\Request;
|
||||
|
|
@ -14,8 +15,14 @@ use Illuminate\Http\Request;
|
|||
|
||||
class EventSurveyController extends MyBaseController
|
||||
{
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Show the event survey page
|
||||
*
|
||||
* @param Request $request
|
||||
* @param $event_id
|
||||
* @return mixed
|
||||
*/
|
||||
public function showEventSurveys(Request $request, $event_id)
|
||||
{
|
||||
$event = Event::scope()->findOrFail($event_id);
|
||||
|
|
@ -99,6 +106,14 @@ class EventSurveyController extends MyBaseController
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show the Edit Question Modal
|
||||
*
|
||||
* @param Request $request
|
||||
* @param $event_id
|
||||
* @param $question_id
|
||||
* @return mixed
|
||||
*/
|
||||
public function showEditEventQuestion(Request $request, $event_id, $question_id)
|
||||
{
|
||||
$question = Question::scope()->findOrFail($question_id);
|
||||
|
|
@ -115,6 +130,14 @@ class EventSurveyController extends MyBaseController
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Edits a question
|
||||
*
|
||||
* @param Request $request
|
||||
* @param $event_id
|
||||
* @param $question_id
|
||||
* @return mixed
|
||||
*/
|
||||
public function postEditEventQuestion(Request $request, $event_id, $question_id)
|
||||
{
|
||||
// Get the event or display a 'not found' warning.
|
||||
|
|
@ -159,6 +182,13 @@ class EventSurveyController extends MyBaseController
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a question
|
||||
*
|
||||
* @param Request $request
|
||||
* @param $event_id
|
||||
* @return mixed
|
||||
*/
|
||||
public function postDeleteEventQuestion(Request $request, $event_id)
|
||||
{
|
||||
$question_id = $request->get('question_id');
|
||||
|
|
@ -183,4 +213,25 @@ class EventSurveyController extends MyBaseController
|
|||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all attendees answers to questions
|
||||
*
|
||||
* @param Request $request
|
||||
* @param $event_id
|
||||
* @param $question_id
|
||||
* @return mixed
|
||||
*/
|
||||
public function showEventQuestionAnswers(Request $request, $event_id, $question_id)
|
||||
{
|
||||
|
||||
$attendees = Attendee::scope()->where('event_id', $event_id)->get();
|
||||
|
||||
$data = [
|
||||
'attendees' => $attendees,
|
||||
'modal_id' => $request->get('modal_id'),
|
||||
];
|
||||
|
||||
return view('ManageEvent.Modals.ViewAnswers', $data);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\StoreEventQuestionRequest;
|
||||
use App\Models\Event;
|
||||
use App\Models\Question;
|
||||
use App\Models\QuestionType;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/*
|
||||
Attendize.com - Event Management & Ticketing
|
||||
*/
|
||||
|
||||
class EventWidgetsController extends MyBaseController
|
||||
{
|
||||
|
||||
|
||||
public function showEventWidgets(Request $request, $event_id)
|
||||
{
|
||||
$event = Event::scope()->findOrFail($event_id);
|
||||
|
||||
$data = [
|
||||
'event' => $event,
|
||||
];
|
||||
|
||||
return view('ManageEvent.Widgets', $data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -540,6 +540,16 @@ Route::group(['middleware' => ['auth', 'first.run']], function () {
|
|||
]);
|
||||
|
||||
|
||||
/*
|
||||
* -------
|
||||
* Event Widget page
|
||||
* -------
|
||||
*/
|
||||
Route::get('{event_id}/widgets', [
|
||||
'as' => 'showEventWidgets',
|
||||
'uses' => 'EventWidgetsController@showEventWidgets',
|
||||
]);
|
||||
|
||||
/*
|
||||
* -------
|
||||
* Event Survey page
|
||||
|
|
@ -575,6 +585,11 @@ Route::group(['middleware' => ['auth', 'first.run']], function () {
|
|||
'uses' => 'EventSurveyController@postDeleteEventQuestion'
|
||||
]);
|
||||
|
||||
Route::get('{event_id}/question/{question_id}/answers', [
|
||||
'as' => 'showEventQuestionAnswers',
|
||||
'uses' => 'EventSurveyController@showEventQuestionAnswers',
|
||||
]);
|
||||
|
||||
|
||||
/*
|
||||
* -------
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class EventStats extends \Illuminate\Database\Eloquent\Model
|
|||
$amount = $amount * -1;
|
||||
}
|
||||
|
||||
$ticket->ticket_revenue = $ticket->ticket_revenue + $amount;
|
||||
$ticket->sales_volume = $ticket->sales_volume + $amount;
|
||||
|
||||
return $ticket->save();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,11 @@ class Question extends MyBaseModel
|
|||
return $this->belongsTo('\App\Models\QuestionType');
|
||||
}
|
||||
|
||||
public function answers()
|
||||
{
|
||||
return $this->hasMany('\App\Models\Answers');
|
||||
}
|
||||
|
||||
/**
|
||||
* The options associated with the question.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -24,11 +24,11 @@ class QuestionAnswer extends MyBaseModel
|
|||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function question()
|
||||
{
|
||||
return $this->belongsTo('\App\Models\Question');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,4 +100,4 @@ body {
|
|||
opacity: 0.7;
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
|
||||
}
|
||||
body{font-family:'Open Sans',sans-serif}table{margin:0}@media (min-width:1200px){.container{width:960px}}section.container{padding:40px;background-color:#fff;margin-bottom:25px}.section_head{border:none !important;font-size:35px;text-align:center;margin:0;margin-bottom:30px;letter-spacing:.2em;font-weight:200}.section_head h1{margin:0;font-weight:100;text-align:center}section{color:#666}#organiser_page_wrap #intro{position:relative;text-align:center;font-weight:100;padding:20px 0 20px 0;border:none;margin-bottom:0;margin-top:20px;color:#fff;background-color:#af5050}#organiser_page_wrap .organiser_logo{max-width:150px;margin:0 auto}#organiser_page_wrap .organiser_logo .thumbnail{background-color:transparent;border:none}#event_page_wrap{background:rgba(0,0,0,0.4)}#event_page_wrap #organiserHead{text-align:center;color:#fff;border:none;font-size:15px;opacity:.6;transition:all .15s ease-in-out;background:rgba(0,0,0,0.4);line-height:30px;cursor:pointer}#event_page_wrap #organiserHead:hover{opacity:1}#event_page_wrap #intro{position:relative;text-align:center;font-weight:100;padding:20px 0 20px 0;color:#fff;border:none;background-color:transparent;margin-bottom:0}#event_page_wrap #intro h1{position:relative;padding:10px 10px;margin:0;font-weight:400;font-size:60px;margin-bottom:10px}#event_page_wrap #intro .event_date{font-size:15px;padding:10px;font-weight:500}#event_page_wrap #intro .event_venue{font-size:19px}#event_page_wrap #intro .event_buttons{margin-top:30px;margin-bottom:30px}#event_page_wrap #intro .event_buttons .btn-event-link{line-height:35px;font-size:17px;text-transform:uppercase;letter-spacing:5px;border:1px solid;border-color:rgba(255,255,255,0.2);text-decoration:none;color:#fff;padding:0 15px;transition:all .15s ease-in-out;width:100%;background:rgba(0,0,0,0.3)}#event_page_wrap #intro .event_buttons .btn-event-link:hover{border-color:rgba(255,255,255,0.6)}#event_page_wrap #tickets .input-group-addon{background:none;border:none}#event_page_wrap #tickets table tr:first-child td{border-top:none}#event_page_wrap #tickets table tr td{padding:20px 0}#event_page_wrap #details .event_poster img{border:4px solid #f6f6f6;max-width:100%;min-width:100%}#event_page_wrap #details .event_details iframe,#event_page_wrap #details .event_details img{max-width:100%}#event_page_wrap #details .event_details h1,#event_page_wrap #details .event_details h2,#event_page_wrap #details .event_details h3,#event_page_wrap #details .event_details h4,#event_page_wrap #details .event_details h5,#event_page_wrap #details .event_details h6{margin-top:0;margin-bottom:15px;font-weight:100}#event_page_wrap #details .event_details h1{font-size:28px}#event_page_wrap #details .event_details h2{font-size:24px}#event_page_wrap #details .event_details h3{font-size:20px}#event_page_wrap #details .event_details h4{font-size:17px}#event_page_wrap #share .btn{margin-bottom:20px}#event_page_wrap #location{padding:0}#event_page_wrap #location .google-maps{position:relative;overflow:hidden}#event_page_wrap #location .google-maps iframe{width:100% !important;height:100% !important;min-height:500px}#footer{background-color:#888;background-color:rgba(0,0,0,0.4);min-height:60px;line-height:60px;color:#fff;text-align:center}#organiser{text-align:center}#organiser .contact_form{display:none;padding:20px;margin-top:25px;text-align:left}.totop{border-radius:0;background-color:#888;background-color:rgba(0,0,0,0.4)}.totop:hover{background-color:#fff;background-color:rgba(255,255,255,0.4);color:#000}@media (min-width:100px) and (max-width:767px){.row{margin:0}section.container{margin-bottom:0;padding:10px}.section_head{padding:10px;font-size:30px}.main_content{padding:0;background:#fff}#organiser_page_wrap #intro{padding:30px}#organiser_page_wrap #intro h1{font-size:2.236em;padding:15px}#event_page_wrap #intro{padding:30px}#event_page_wrap #intro .event_date h2{font-size:20px}#event_page_wrap #intro .event_date h4{font-size:11px}#event_page_wrap #intro h1{font-size:2.236em;padding:15px}#event_page_wrap #intro .event_venue{color:#fff;font-size:20px;margin-top:10px}#event_page_wrap #intro .event_buttons{margin-top:50px}#event_page_wrap #intro .event_buttons .btn-event-link{padding:5px 0;font-size:18px;margin-bottom:5px;line-height:30px}#event_page_wrap #tickets .btn-checkout{width:100%}#event_page_wrap #location .google-maps iframe{min-height:290px}.content{padding:15px}}.rrssb-buttons.large-format li a{border-radius:0}.event-listing .event .panel{min-height:140px}.event-listing .event_flyer{text-align:center}.event-listing .event_flyer img{max-height:140px;max-width:100%}
|
||||
body{font-family:'Open Sans',sans-serif}table{margin:0}label.required::after{content:'*';color:red;padding-left:3px;font-size:9px}@media (min-width:1200px){.container{width:960px}}section.container{padding:40px;background-color:#fff;margin-bottom:25px}.section_head{border:none !important;font-size:35px;text-align:center;margin:0;margin-bottom:30px;letter-spacing:.2em;font-weight:200}.section_head h1{margin:0;font-weight:100;text-align:center}section{color:#666}#organiser_page_wrap #intro{position:relative;text-align:center;font-weight:100;padding:20px 0 20px 0;border:none;margin-bottom:0;margin-top:20px;color:#fff;background-color:#af5050}#organiser_page_wrap .organiser_logo{max-width:150px;margin:0 auto}#organiser_page_wrap .organiser_logo .thumbnail{background-color:transparent;border:none}#event_page_wrap{background:rgba(0,0,0,0.4)}#event_page_wrap #organiserHead{text-align:center;color:#fff;border:none;font-size:15px;opacity:.6;transition:all .15s ease-in-out;background:rgba(0,0,0,0.4);line-height:30px;cursor:pointer}#event_page_wrap #organiserHead:hover{opacity:1}#event_page_wrap #intro{position:relative;text-align:center;font-weight:100;padding:20px 0 20px 0;color:#fff;border:none;background-color:transparent;margin-bottom:0}#event_page_wrap #intro h1{position:relative;padding:10px 10px;margin:0;font-weight:400;font-size:60px;margin-bottom:10px}#event_page_wrap #intro .event_date{font-size:15px;padding:10px;font-weight:500}#event_page_wrap #intro .event_venue{font-size:19px}#event_page_wrap #intro .event_buttons{margin-top:30px;margin-bottom:30px}#event_page_wrap #intro .event_buttons .btn-event-link{line-height:35px;font-size:17px;text-transform:uppercase;letter-spacing:5px;border:1px solid;border-color:rgba(255,255,255,0.2);text-decoration:none;color:#fff;padding:0 15px;transition:all .15s ease-in-out;width:100%;background:rgba(0,0,0,0.3)}#event_page_wrap #intro .event_buttons .btn-event-link:hover{border-color:rgba(255,255,255,0.6)}#event_page_wrap #tickets .input-group-addon{background:none;border:none}#event_page_wrap #tickets table tr:first-child td{border-top:none}#event_page_wrap #tickets table tr td{padding:20px 0}#event_page_wrap #details .event_poster img{border:4px solid #f6f6f6;max-width:100%;min-width:100%}#event_page_wrap #details .event_details iframe,#event_page_wrap #details .event_details img{max-width:100%}#event_page_wrap #details .event_details h1,#event_page_wrap #details .event_details h2,#event_page_wrap #details .event_details h3,#event_page_wrap #details .event_details h4,#event_page_wrap #details .event_details h5,#event_page_wrap #details .event_details h6{margin-top:0;margin-bottom:15px;font-weight:100}#event_page_wrap #details .event_details h1{font-size:28px}#event_page_wrap #details .event_details h2{font-size:24px}#event_page_wrap #details .event_details h3{font-size:20px}#event_page_wrap #details .event_details h4{font-size:17px}#event_page_wrap #share .btn{margin-bottom:20px}#event_page_wrap #location{padding:0}#event_page_wrap #location .google-maps{position:relative;overflow:hidden}#event_page_wrap #location .google-maps iframe{width:100% !important;height:100% !important;min-height:500px}#footer{background-color:#888;background-color:rgba(0,0,0,0.4);min-height:60px;line-height:60px;color:#fff;text-align:center}#organiser{text-align:center}#organiser .contact_form{display:none;padding:20px;margin-top:25px;text-align:left}.totop{border-radius:0;background-color:#888;background-color:rgba(0,0,0,0.4)}.totop:hover{background-color:#fff;background-color:rgba(255,255,255,0.4);color:#000}@media (min-width:100px) and (max-width:767px){.row{margin:0}section.container{margin-bottom:0;padding:10px}.section_head{padding:10px;font-size:30px}.main_content{padding:0;background:#fff}#organiser_page_wrap #intro{padding:30px}#organiser_page_wrap #intro h1{font-size:2.236em;padding:15px}#event_page_wrap #intro{padding:30px}#event_page_wrap #intro .event_date h2{font-size:20px}#event_page_wrap #intro .event_date h4{font-size:11px}#event_page_wrap #intro h1{font-size:2.236em;padding:15px}#event_page_wrap #intro .event_venue{color:#fff;font-size:20px;margin-top:10px}#event_page_wrap #intro .event_buttons{margin-top:50px}#event_page_wrap #intro .event_buttons .btn-event-link{padding:5px 0;font-size:18px;margin-bottom:5px;line-height:30px}#event_page_wrap #tickets .btn-checkout{width:100%}#event_page_wrap #location .google-maps iframe{min-height:290px}.content{padding:15px}}.rrssb-buttons.large-format li a{border-radius:0}.event-listing .event .panel{min-height:140px}.event-listing .event_flyer{text-align:center}.event-listing .event_flyer img{max-height:140px;max-width:100%}
|
||||
|
|
@ -9,6 +9,13 @@ table {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
label.required::after {
|
||||
content: '*';
|
||||
color: red;
|
||||
padding-left: 3px;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.container {
|
||||
width: 960px;
|
||||
|
|
|
|||
|
|
@ -206,9 +206,7 @@
|
|||
<li data-route="{{route('showEventCustomizeTab', ['event_id' => $event->id, 'tab' => 'ticket_design'])}}"
|
||||
class="{{$tab == 'ticket_design' ? 'active' : ''}}"><a href="#ticket_design" data-toggle="tab">Ticket
|
||||
Design</a></li>
|
||||
<li data-route="{{route('showEventCustomizeTab', ['event_id' => $event->id, 'tab' => 'embed'])}}"
|
||||
class="{{$tab == 'embed' ? 'active' : ''}}"><a href="#embed" data-toggle="tab">Website Embed
|
||||
Code</a></li>
|
||||
|
||||
</ul>
|
||||
<!--/ tab -->
|
||||
<!-- tab content -->
|
||||
|
|
@ -596,35 +594,6 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane {{$tab == 'embed' ? 'active' : ''}}" id="embed">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h4>HTML Embed Code</h4>
|
||||
<textarea rows="7" onfocus="this.select();"
|
||||
class="form-control">{{$event->embed_html_code}}</textarea>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h4>Instructions</h4>
|
||||
|
||||
<p>
|
||||
Simply copy and paste the HTML provided onto your website where you would like the
|
||||
widget to appear and the widget will appear.
|
||||
</p>
|
||||
|
||||
<h5>
|
||||
<b>Embed Preview</b>
|
||||
</h5>
|
||||
|
||||
<div class="preview_embed" style="border:1px solid #ddd; padding: 5px;">
|
||||
{!! $event->embed_html_code !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--/ tab content -->
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
<div role="dialog" id="{{$modal_id}}" class="modal fade" style="display: none;">
|
||||
<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-question3"></i>
|
||||
View Answers
|
||||
</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@foreach($attendees as $attendee)
|
||||
@if(count($attendee->answers))
|
||||
{{ $attendee->first_name }} {{ $attendee->last_name }}<br>
|
||||
@foreach($attendee->answers as $answer)
|
||||
<b>{{ $answer->question->title }}</b><br>
|
||||
{{ $answer->answer_text }}<br>
|
||||
@endforeach
|
||||
<hr>
|
||||
@endif
|
||||
@endforeach
|
||||
</div> <!-- /end modal body-->
|
||||
<div class="modal-footer">
|
||||
{!! Form::button('Close', ['class'=>"btn modal-close btn-danger",'data-dismiss'=>'modal']) !!}
|
||||
</div>
|
||||
</div><!-- /end modal content-->
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,169 +0,0 @@
|
|||
<div role="dialog" id="{{$modal_id}}" class="modal fade" style="display: none;">
|
||||
<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-question"></i>
|
||||
Questions</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h3>
|
||||
Existing Questions
|
||||
</h3>
|
||||
<div class="panel-group" id="QuestionsAccordion">
|
||||
|
||||
@foreach($event->questions as $question)
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#QuestionsAccordion" href="#collapse{{$question->id}}" class="collapsed">
|
||||
<span class="arrow mr5"></span> {{$question->title}}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div id="collapse{{$question->id}}" class="panel-collapse collapse" style="height: 0px;">
|
||||
{!! Form::open(['url' => '']) !!}
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="required">
|
||||
Question
|
||||
</label>
|
||||
<input placeholder="What is your name?" class="form-control" type='text' name='title' />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>
|
||||
Question Type
|
||||
</label>
|
||||
<select class="form-control" name="question_type_id">
|
||||
@foreach($question_types as $question_type)
|
||||
<option data-allow-multiple="{{$question_type->allow_multiple}}" value="{{$question_type->id}}">
|
||||
{{$question_type->name}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>
|
||||
Instructions
|
||||
</label>
|
||||
<input class="form-control" type="text" name="instructions" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>
|
||||
Question Options
|
||||
</label>
|
||||
<input placeholder="e.g option 1, option 2, option 3" class="form-control" type="text" name="options" />
|
||||
<div class="help-block">
|
||||
Please use a comma to separate options.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="checkbox" name="is_required" id="is_required" value="1" />
|
||||
<label for="is_required"> Make this a required question</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>
|
||||
Require this question for ticket(s):
|
||||
</label>
|
||||
|
||||
@foreach($event->tickets as $ticket)
|
||||
<br>
|
||||
<input name="tickets[]" type="checkbox" id="ticket_{{$ticket->id}}" value="{{$ticket->id}}">
|
||||
<label for="ticket_{{$ticket->id}}"> {{$ticket->title}}</label>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
{!!Form::close();!!}
|
||||
<div class="panel-footer">
|
||||
<div class="form-group no-border">
|
||||
<button class="btn btn-danger deleteThis float-right">Delete Question</button>
|
||||
<button type="submit" class="btn btn-success float-right">Save Question</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
{!! Form::open(['url' => route('postCreateQuestion', [
|
||||
'event_id' => $event->id
|
||||
]), 'class' => 'ajax']) !!}
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="required">
|
||||
Question
|
||||
</label>
|
||||
<input placeholder="What is your name?" class="form-control" type="text" name="title" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>
|
||||
Question Type
|
||||
</label>
|
||||
<select class="form-control" name="question_type_id">
|
||||
@foreach($question_types as $question_type)
|
||||
<option data-allow-multiple="{{$question_type->allow_multiple}}" value="{{$question_type->id}}">
|
||||
{{$question_type->name}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>
|
||||
Instructions
|
||||
</label>
|
||||
<input class="form-control" type="text" name="instructions" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>
|
||||
Question Options
|
||||
</label>
|
||||
<input placeholder="e.g option 1, option 2, option 3" class="form-control" type="text" name="options" />
|
||||
<div class="help-block">
|
||||
Please use a comma to separate options.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="checkbox" name="is_required" id="is_required" value="1" />
|
||||
<label for="is_required"> Make this a required question</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>
|
||||
Require this question for ticket(s):
|
||||
</label>
|
||||
|
||||
@foreach($event->tickets as $ticket)
|
||||
<br>
|
||||
<input name="tickets[]" type="checkbox" id="ticket_{{$ticket->id}}" value="{{$ticket->id}}" />
|
||||
<label for="ticket_{{$ticket->id}}"> {{$ticket->title}}</label>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<div class="form-group no-border">
|
||||
<button type="submit" class="btn btn-success float-right">Create Question</button>
|
||||
</div>
|
||||
</div>
|
||||
{!!Form::close();!!}
|
||||
</div>
|
||||
</div> <!-- /end modal body-->
|
||||
<div class="modal-footer">
|
||||
<a href="" class="btn btn-danger" data-dismiss="modal">
|
||||
Close
|
||||
</a>
|
||||
<a href="" class="btn btn-success">
|
||||
Create Question
|
||||
</a>
|
||||
</div>
|
||||
</div><!-- /end modal content-->
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -62,8 +62,8 @@
|
|||
<span class="text">Surveys</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ Request::is('*check_in*') ? 'active' : '' }}">
|
||||
<a href="{{route('showChechIn', array('event_id' => $event->id))}}">
|
||||
<li class="{{ Request::is('*widgets*') ? 'active' : '' }}">
|
||||
<a href="{{route('showEventWidgets', array('event_id' => $event->id))}}">
|
||||
<span class="figure"><i class="ico-code"></i></span>
|
||||
<span class="text">Widgets</span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -27,10 +27,13 @@ Event Surveys
|
|||
<div class="col-md-9 col-sm-6">
|
||||
<!-- Toolbar -->
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<button class="loadModal btn btn-success" type="button" data-modal-id="CreateQuestion" href="javascript:void(0);"
|
||||
data-href="{{route('showCreateEventQuestion', ['event_id' => $event->id])}}">
|
||||
<i class="ico-question"></i> Add question
|
||||
</button>
|
||||
<div class="btn-group btn-group btn-group-responsive">
|
||||
|
||||
<button class="loadModal btn btn-success" type="button" data-modal-id="CreateQuestion" href="javascript:void(0);"
|
||||
data-href="{{route('showCreateEventQuestion', ['event_id' => $event->id])}}">
|
||||
<i class="ico-question"></i> Add question
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="btn-group btn-group btn-group-responsive">
|
||||
<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown">
|
||||
|
|
@ -63,7 +66,6 @@ Event Surveys
|
|||
<!-- START panel -->
|
||||
<div class="panel">
|
||||
<div class="table-responsive">
|
||||
@if($questions->count())
|
||||
<table class="table">
|
||||
<thead>
|
||||
<th>
|
||||
|
|
@ -98,6 +100,10 @@ Event Surveys
|
|||
{{implode(', ', array_column($question->tickets->toArray(), 'title'))}}
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-primary loadModal" data-modal-id="showEventQuestionAnswers" href="javascript:void(0);"
|
||||
data-href="{{route('showEventQuestionAnswers', ['event_id' => $event->id, 'question_id' => $question->id])}}">
|
||||
View Answers
|
||||
</a>
|
||||
<a class="btn btn-xs btn-primary loadModal" data-modal-id="EditQuestion" href="javascript:void(0);"
|
||||
data-href="{{route('showEditEventQuestion', ['event_id' => $event->id, 'question_id' => $question->id])}}">
|
||||
Edit
|
||||
|
|
@ -110,12 +116,6 @@ Event Surveys
|
|||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@else
|
||||
<div class="panel-body">
|
||||
You haven't added any questions yet. You can add question by clicking the '<b>Add Question</b>' button below.
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
@extends('Shared.Layouts.Master')
|
||||
|
||||
@section('title')
|
||||
@parent
|
||||
|
||||
Event Surveys
|
||||
@stop
|
||||
|
||||
@section('top_nav')
|
||||
@include('ManageEvent.Partials.TopNav')
|
||||
@stop
|
||||
|
||||
@section('menu')
|
||||
@include('ManageEvent.Partials.Sidebar')
|
||||
@stop
|
||||
|
||||
@section('page_title')
|
||||
<i class='ico-cart mr5'></i>
|
||||
Event Surveys
|
||||
@stop
|
||||
|
||||
@section('head')
|
||||
|
||||
@stop
|
||||
|
||||
@section('page_header')
|
||||
<style>
|
||||
.page-header {display: none;}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h4>HTML Embed Code</h4>
|
||||
<textarea rows="7" onfocus="this.select();"
|
||||
class="form-control">{{$event->embed_html_code}}</textarea>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h4>Instructions</h4>
|
||||
|
||||
<p>
|
||||
Simply copy and paste the HTML provided into your website wherever you would like the widget to appear.
|
||||
</p>
|
||||
|
||||
<h5>
|
||||
<b>Embed Preview</b>
|
||||
</h5>
|
||||
|
||||
<div class="preview_embed" style="border:1px solid #ddd; padding: 5px;">
|
||||
{!! $event->embed_html_code !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
@elseif($question->question_type_id == config('attendize.question_textbox_multi'))
|
||||
{!! Form::textarea("ticket_holder_questions[{$ticket->id}][{$i}][$question->id]", null, ['rows'=>5, 'required' => $question->is_required ? 'required' : '', 'class' => "ticket_holder_questions.{$ticket->id}.{$i}.{$question->id} form-control"]) !!}
|
||||
@elseif($question->question_type_id == config('attendize.question_dropdown_single'))
|
||||
{!! Form::select("ticket_holder_questions[{$ticket->id}][{$i}][$question->id]",$question->options->lists('name', 'name'), null, ['required' => $question->is_required ? 'required' : '', 'class' => "ticket_holder_questions.{$ticket->id}.{$i}.{$question->id} form-control"]) !!}
|
||||
{!! Form::select("ticket_holder_questions[{$ticket->id}][{$i}][$question->id]", $question->options->lists('name', 'name'), null, ['required' => $question->is_required ? 'required' : '', 'class' => "ticket_holder_questions.{$ticket->id}.{$i}.{$question->id} form-control"]) !!}
|
||||
@elseif($question->question_type_id == config('attendize.question_dropdown_multi'))
|
||||
{!! Form::select("ticket_holder_questions[{$ticket->id}][{$i}][$question->id]",$question->options->lists('name', 'name'), null, ['required' => $question->is_required ? 'required' : '', 'multiple' => 'multiple','class' => "ticket_holder_questions.{$ticket->id}.{$i}.{$question->id} form-control"]) !!}
|
||||
@elseif($question->question_type_id == config('attendize.question_checkbox_multi'))
|
||||
|
|
@ -25,6 +25,11 @@
|
|||
@endforeach
|
||||
@endif
|
||||
|
||||
@if($question->instructions)
|
||||
<div class="help-block">
|
||||
{{ $question->instructions }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
Loading…
Reference in New Issue