diff --git a/public.php b/public.php index a0c16314..52cbcffc 100644 --- a/public.php +++ b/public.php @@ -38,6 +38,15 @@ if (isset($_GET['t'])) { \OCP\Util::addStyle( 'documents', '3rdparty/webodf/dojo-app'); \OCP\Util::addStyle( 'documents', '3rdparty/webodf/editor' ); \OCP\Util::addScript('documents', 'documents'); + if ($file->getFileId()){ + $session = new Db_Session(); + $sessionData = $session->loadBy('file_id', $file->getFileId())->getData(); + $member = new Db_Member(); + $members = $member->getCollectionBy('es_id', $sessionData['es_id']); + $tmpl->assign('total', count($members)+1); + } else { + $tmpl->assign('total', 1); + } $tmpl->assign('document', $token); } } catch (\Exception $e){ diff --git a/templates/public.php b/templates/public.php index 8c28808f..eb52973e 100644 --- a/templates/public.php +++ b/templates/public.php @@ -14,6 +14,7 @@ +