| @@ 4-16 (lines=13) @@ | ||
| 1 | <?php defined('C5_EXECUTE') or die("Access Denied."); |
|
| 2 | $f = $controller->getFileObject(); |
|
| 3 | $fp = new Permissions($f); |
|
| 4 | if ($f && $fp->canViewFile()) { |
|
| 5 | $c = Page::getCurrentPage(); |
|
| 6 | if($c instanceof Page) { |
|
| 7 | $cID = $c->getCollectionID(); |
|
| 8 | } |
|
| 9 | ||
| 10 | ?> |
|
| 11 | <div class="ccm-block-file"> |
|
| 12 | <a href="<?php echo ($forceDownload ? $f->getForceDownloadURL() : $f->getDownloadURL()); ?>"> <i class="fa fa-paperclip"></i> <?php echo stripslashes($controller->getLinkText()) ?></a> |
|
| 13 | </div> |
|
| 14 | ||
| 15 | ||
| 16 | <?php } |
|
| 17 | ||
| 18 | $c = Page::getCurrentPage(); |
|
| 19 | if (!$f && $c->isEditMode()) { ?> |
|
| @@ 4-15 (lines=12) @@ | ||
| 1 | <?php defined('C5_EXECUTE') or die("Access Denied."); |
|
| 2 | $f = $controller->getFileObject(); |
|
| 3 | $fp = new Permissions($f); |
|
| 4 | if ($f && $fp->canViewFile()) { |
|
| 5 | $c = Page::getCurrentPage(); |
|
| 6 | if($c instanceof Page) { |
|
| 7 | $cID = $c->getCollectionID(); |
|
| 8 | } |
|
| 9 | ||
| 10 | ?> |
|
| 11 | <div class="ccm-block-file"> |
|
| 12 | <a href="<?php echo ($forceDownload ? $f->getForceDownloadURL() : $f->getDownloadURL()); ?>"> <i class="fa fa-paperclip"></i> <?php echo stripslashes($controller->getLinkText()) ?></a> |
|
| 13 | </div> |
|
| 14 | ||
| 15 | <?php } |
|
| @@ 4-24 (lines=21) @@ | ||
| 1 | <?php defined('C5_EXECUTE') or die("Access Denied."); |
|
| 2 | $f = $controller->getFileObject(); |
|
| 3 | $fp = new Permissions($f); |
|
| 4 | if ($f && $fp->canViewFile()) { |
|
| 5 | $c = Page::getCurrentPage(); |
|
| 6 | if($c instanceof Page) { |
|
| 7 | $cID = $c->getCollectionID(); |
|
| 8 | } |
|
| 9 | ||
| 10 | ?> |
|
| 11 | <style> |
|
| 12 | .related-file-block a { |
|
| 13 | text-decoration: none; |
|
| 14 | } |
|
| 15 | .related-file-block a:hover { |
|
| 16 | color: #3598dc; |
|
| 17 | } |
|
| 18 | </style> |
|
| 19 | <div class="related-file-block"> |
|
| 20 | <a href="<?php echo ($forceDownload ? $f->getForceDownloadURL() : $f->getDownloadURL()); ?>"> <i class="fa fa-paperclip"></i> <?php echo stripslashes($controller->getLinkText()) ?></a> |
|
| 21 | </div> <!-- END related-file-block --> |
|
| 22 | ||
| 23 | ||
| 24 | <?php } |
|
| 25 | ||
| 26 | $c = Page::getCurrentPage(); |
|
| 27 | if (!$f && $c->isEditMode()) { ?> |
|