1
0
Fork 0
mirror of synced 2024-06-29 19:50:26 +12:00
appwrite/app/views/console/storage/index.phtml

85 lines
4.5 KiB
PHTML

<?php
use Utopia\Locale\Locale;
$providers = $this->getParam('providers', []);
?>
<div class="cover margin-bottom-large">
<h1 class="zone xl margin-bottom-large margin-top">
<a data-ls-attrs="href=/console/openings/new?company={{router.params.company}}" class="button icon margin-top-tiny pull-end"><i class="icon-plus"></i> &nbsp;Upload</a>
<?php echo Locale::getText('console.storage.title'); ?>
</h1>
</div>
<div class="zone xl">
<div>
<form class="row clear margin-bottom-tiny" data-forms-filter="filter-files" data-event="init">
<div class="col span-4">
<div class="margin-bottom-small">
<input type="hidden" name="offset" value="0">
<input type="hidden" name="limit" value="15">
<input name="search" id="search" type="search" autocomplete="off" placeholder="Search" class="strip">
</div>
</div>
<div class="col span-4"></div>
<div class="col span-4"></div>
</form>
<div data-service="storage.files.list"
data-param-search="{{filter-files.keys.search}}"
data-param-limit="{{filter-files.keys.limit}}"
data-param-offset="{{filter-files.keys.offset}}"
data-param-order-type="DESC"
data-scope="sdk"
data-name="project-files"
data-event="filter-files-changed"
data-success="render,trigger"
data-error="render"
data-success-rerender="user.update,filter-files-changed"
data-error-rerender=""
data-success-triggers="users.load">
<div data-ls-if="0 == {{project-files.sum}}" class="box margin-bottom" style="display: none;">
<h3 class="margin-bottom">No Files Found</h3>
<p class="margin-bottom-no">Upload your first file to get started</p>
</div>
<div data-ls-if="0 != {{project-files.sum}}" style="display: none;">
<ul data-ls-loop="project-files.files" data-ls-as="file" class="tiles cell-3">
<li>
<div class="box padding-small margin-bottom">
<img data-ls-attrs="src=//{{env.DOMAIN}}/v1/storage/files/{{file.$uid}}/preview?width=100&height=100&project={{router.params.project}}&mode=admin" class="pull-start avatar margin-end" />
<button class="pull-end strip margin-top-tiny"><i class="icon icon-dot-3"></i></button>
<div data-ls-bind="{{file.name}}" data-ls-attrs="title={{file.name}}" class="text-one-liner margin-bottom-tiny">&nbsp;</div>
<div data-ls-bind="{{file.sizeOriginal|humanFileSize}}" class="note text-one-liner">&nbsp;</div>
</div>
</li>
</ul>
<div class="clear">
<span class="pull-end paging" data-ls-ui-paging="" data-sum="{{project-files.sum}}" data-offset="{{filter-files.keys.offset}}" data-limit="{{filter-files.keys.limit}}"></span>
<span data-ls-if="{{filter-files.backward}} >= 0" style="display: none;">
<button type="button" class="margin-end round" data-forms-filter="filter-files" data-params="<?php echo $this->escape(json_encode(['offset' => '{{filter-files.backward}}'])); ?>" aria-label="Back"><i class="icon-left-open"></i></button>
</span>
<span data-ls-if="{{filter-files.backward}} < 0" style="display: none;">
<button type="button" class="disabled margin-end round" disabled aria-label="Back"><i class="icon-left-open"></i></button>
</span>
<span data-ls-if="{{filter-files.forward}} < {{project-files.sum}}" style="display: none;">
<button type="button" class="margin-end round" data-forms-filter="filter-files" data-params="<?php echo $this->escape(json_encode(['offset' => '{{filter-files.forward}}'])); ?>" aria-label="Next"><i class="icon-right-open"></i></button>
</span>
<span data-ls-if="{{filter-files.forward}} >= {{project-files.sum}}" style="display: none;">
<button type="button" class="disabled margin-end round" disabled aria-label="Next"><i class="icon-right-open"></i></button>
</span>
</div>
</div>
</div>
</div>
</div>