diff --git a/app/Gdoo/Calendar/Controllers/EventController.php b/app/Gdoo/Calendar/Controllers/EventController.php index 29004698..24b3c303 100644 --- a/app/Gdoo/Calendar/Controllers/EventController.php +++ b/app/Gdoo/Calendar/Controllers/EventController.php @@ -664,15 +664,12 @@ class EventController extends DefaultController $options['accessclass'] = 'PUBLIC'; $options['access_class_options'] = CalendarService::getAccessClassOptions(); - $attach['model'] = 'calendar_attachment'; - $attach['path'] = 'calendar'; - $attach['rows'] = AttachmentService::get($event['attachment']); - + $attachment['rows'] = AttachmentService::get($event['attachment']); $calendar = CalendarService::getCalendar($event['calendarid'], false); $share = ShareService::getItem('event', $id); return $this->render(array( - 'attachList' => $attach, + 'attachment' => $attachment, 'options' => $options, 'calendar' => $calendar, 'share' => $share, diff --git a/app/Gdoo/Calendar/views/event/view.blade.php b/app/Gdoo/Calendar/views/event/view.blade.php index da30c0fd..f1e10908 100644 --- a/app/Gdoo/Calendar/views/event/view.blade.php +++ b/app/Gdoo/Calendar/views/event/view.blade.php @@ -57,19 +57,9 @@ 附件管理 - @if($attachList['main']) - - - @if($attachList['main']) - @foreach($attachList['main'] as $k => $v) -
- {{$v['title']}} -  ({{human_filesize($v['size'])}}) -
- @endforeach - @endif - - @endif + + @include('attachment/show') +