예제 #1
0
    }
    ?>
        <?php 
    foreach (array_key_exists('files', $items) ? $items['files'] : [] as $file) {
        ?>
        <?php 
        echo FileSystemItem::widget(['parentFolderId' => $parentFolderId, 'type' => $file->getItemType(), 'id' => $file->getItemId(), 'downloadUrl' => $file->getUrl(true), 'url' => $file->getUrl(), 'wallUrl' => $file->getWallUrl(), 'iconClass' => $file->getIconClass(), 'title' => $file->getTitle(), 'size' => $file->getSize(), 'creator' => $file->creator, 'editor' => $file->editor, 'updatedAt' => $file->content->updated_at, 'contentObject' => $file]);
        ?>
        <?php 
    }
    ?>
        <?php 
    foreach (array_key_exists('postedFiles', $items) ? $items['postedFiles'] : [] as $file) {
        ?>
        <?php 
        echo FileSystemItem::widget(['parentFolderId' => $parentFolderId, 'type' => \humhub\modules\cfiles\models\File::getItemTypeByExt($file->getExtension()), 'columns' => $itemsSelectable ? ['select', 'title', 'size', 'timestamp', 'creator'] : ['title', 'size', 'timestamp', 'creator'], 'id' => 'baseFile_' . $file->id, 'downloadUrl' => $file->getUrl() . '&' . http_build_query(['download' => true]), 'url' => $file->getUrl(), 'wallUrl' => \humhub\modules\cfiles\models\File::getBasePost($file)->getUrl(), 'iconClass' => \humhub\modules\cfiles\models\File::getIconClassByExt($file->getExtension()), 'title' => $file->file_name, 'size' => $file->size, 'creator' => \humhub\modules\cfiles\models\File::getUserById($file->created_by), 'editor' => \humhub\modules\cfiles\models\File::getUserById($file->updated_by), 'updatedAt' => $file->updated_at]);
        ?>
        <?php 
    }
    ?>
    </table>
</div>
<?php 
} else {
    ?>
<div class="folderEmptyMessage">
    <div class="panel">
        <div class="panel-body">
            <p>
                <strong><?php 
    echo Yii::t('CfilesModule.base', 'This folder is empty.');