Browse Source

Use p instead of echo

tags/1.1.22
Victor Dubiniuk 6 years ago
parent
commit
09f2385b1e
1 changed files with 20 additions and 26 deletions
  1. 20
    26
      templates/documents.php

+ 20
- 26
templates/documents.php View File

@@ -1,27 +1,21 @@
<?php


if(empty($_['list'])) {
echo('<div id="emptyfolder">No documents are found. Please upload a document into your ownCloud</div>');

}else{

echo('<table class="documentslist" >');
foreach($_['list'] as $entry) {
echo('
<?php if(empty($_['list'])) { ?>
<div id="emptyfolder"><?php p('No documents are found. Please upload a document into your ownCloud');?></div>
<?php } else { ?>
<table class="documentslist" >
<?php foreach($_['list'] as $entry) { ?>
<tr>
<td width="1"><img align="left" src="'.\OCP\Util::linkToAbsolute('office','ajax/thumbnail.php').'?filepath='.urlencode($entry['url']).'"></td>
<td width="1"><img align="left" src="'.\OCP\Util::linkToAbsolute('office','img/office.png').'"></td>
<td><a target="_blank" href="'.\OCP\Util::linkToAbsolute('files','download.php').'&file='.urlencode($entry['url']).'&name='.urlencode($entry['name']).'">'.$entry['name'].'</a></td>
<td>'.\OCP\Util::formatDate($entry['mtime']).'</td><td>'.\OCP\Util::humanFileSize($entry['size']).'</td>
</tr>'
);
}
echo('</table>');
}


<td width="1"> <?php var_dump($entry) ?>
<img align="left" src="<?php p(\OCP\Util::linkToAbsolute('office','ajax/thumbnail.php').'?filepath='.urlencode($entry['url'])) ?>" />
</td>
<td width="1">
<img align="left" src="<?php p( \OCP\Util::linkToAbsolute('office','img/office.png')) ?>" />
</td>
<td>
<a target="_blank" href="<?php p(\OCP\Util::linkToAbsolute('files','download.php').'&file='.urlencode($entry['url']).'&name='.urlencode($entry['name'])) ?>"><?php p($entry['name'])?></a>
</td>
<td><?php p(\OCP\Util::formatDate($entry['mtime'])); ?></td>
<td><?php p(\OCP\Util::humanFileSize($entry['size'])); ?></td>
</tr>
<?php } ?>
</table>
<?php } ?>

Loading…
Cancel
Save