From 54bcc3b4de53ed10ed51c30e0b722e4ae6ccd438 Mon Sep 17 00:00:00 2001 From: hawind Date: Sun, 21 Mar 2021 21:45:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=97=A5=E7=A8=8B=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Calendar/Controllers/EventController.php | 7 ++----- app/Gdoo/Calendar/views/event/view.blade.php | 16 +++------------- 2 files changed, 5 insertions(+), 18 deletions(-) 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') +