|
|
@ -4,17 +4,26 @@ |
|
|
|
|
|
|
|
|
@section('content') |
|
|
@section('content') |
|
|
|
|
|
|
|
|
<div class=""> |
|
|
|
|
|
<div class="row"> |
|
|
|
|
|
|
|
|
<div class="row"> |
|
|
<div class="col-md-12"> |
|
|
<div class="col-md-12"> |
|
|
<div class="x_panel"> |
|
|
<div class="x_panel"> |
|
|
<div class="x_title"><h3>User Calendar <small>Click to add/edit events</small></h3></div> |
|
|
|
|
|
|
|
|
<div class="x_title"> |
|
|
|
|
|
<div class="pull-right"> |
|
|
|
|
|
@if (request('action') == 'edit') |
|
|
|
|
|
{{ link_to_route('users.calendar', __('app.done'), [], ['class' => 'btn btn-default btn-xs']) }} |
|
|
|
|
|
@else |
|
|
|
|
|
{{ link_to_route('users.calendar', __('event.edit'), ['action' => 'edit'], ['class' => 'btn btn-warning btn-xs']) }} |
|
|
|
|
|
@endif |
|
|
|
|
|
</div> |
|
|
|
|
|
<h3> |
|
|
|
|
|
User Calendar <small>Click to add/edit events</small> |
|
|
|
|
|
</h3> |
|
|
|
|
|
</div> |
|
|
<div class="x_content"> |
|
|
<div class="x_content"> |
|
|
<div id='calendar'></div> |
|
|
<div id='calendar'></div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- calendar modal --> |
|
|
<!-- calendar modal --> |
|
|
@ -147,6 +156,7 @@ |
|
|
y = date.getFullYear(), |
|
|
y = date.getFullYear(), |
|
|
started, |
|
|
started, |
|
|
categoryClass; |
|
|
categoryClass; |
|
|
|
|
|
var selectable = "{{ request('action') }}" == 'edit'; |
|
|
|
|
|
|
|
|
var calendar = $('#calendar').fullCalendar({ |
|
|
var calendar = $('#calendar').fullCalendar({ |
|
|
header: { |
|
|
header: { |
|
|
@ -156,7 +166,7 @@ |
|
|
}, |
|
|
}, |
|
|
defaultView: 'agendaWeek', |
|
|
defaultView: 'agendaWeek', |
|
|
height: 550, |
|
|
height: 550, |
|
|
selectable: true, |
|
|
|
|
|
|
|
|
selectable: selectable, |
|
|
selectHelper: true, |
|
|
selectHelper: true, |
|
|
minTime: '06:00:00', |
|
|
minTime: '06:00:00', |
|
|
// eventLimit: true,
|
|
|
// eventLimit: true,
|
|
|
@ -165,7 +175,7 @@ |
|
|
slotLabelFormat: 'HH:mm', |
|
|
slotLabelFormat: 'HH:mm', |
|
|
slotDuration: '01:00:00', |
|
|
slotDuration: '01:00:00', |
|
|
events: { |
|
|
events: { |
|
|
url: "{{ route('api.events.index') }}", |
|
|
|
|
|
|
|
|
url: "{{ route('api.events.index', request(['action'])) }}", |
|
|
type: "GET", |
|
|
type: "GET", |
|
|
error: function() { |
|
|
error: function() { |
|
|
alert('there was an error while fetching events!'); |
|
|
alert('there was an error while fetching events!'); |
|
|
|