aboutsummaryrefslogtreecommitdiff
path: root/mod/file/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/file/views')
-rw-r--r--mod/file/views/default/file/css.php10
-rw-r--r--mod/file/views/default/object/file.php8
2 files changed, 17 insertions, 1 deletions
diff --git a/mod/file/views/default/file/css.php b/mod/file/views/default/file/css.php
index 206cdc345..bd2a30c43 100644
--- a/mod/file/views/default/file/css.php
+++ b/mod/file/views/default/file/css.php
@@ -14,6 +14,16 @@
-moz-border-radius: 6px;
background: #333333;
}
+.file-gallery-item {
+ float: left;
+ text-align: center;
+ width: 165px;
+ margin: 10px 10px 0 0;
+ padding: 5px;
+ background-color: #eeeeee;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+}
.files .entity-listing .entity-listing-info {
diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php
index 166ab9cd3..1d3aa7140 100644
--- a/mod/file/views/default/object/file.php
+++ b/mod/file/views/default/object/file.php
@@ -65,7 +65,7 @@ if (elgg_in_context('widgets')) {
$metadata = '';
}
-if ($full) {
+if ($full && !elgg_in_context('gallery')) {
$extra = '';
if (elgg_view_exists("file/specialcontent/$mime")) {
@@ -103,6 +103,12 @@ $file_info
</div>
HTML;
+} elseif (elgg_in_context('gallery')) {
+ echo '<div class="file-gallery-item">';
+ echo "<h3>" . $file->title . "</h3>";
+ echo "<a href=\"{$file->getURL()}\"><img src=\"".elgg_get_site_url()."mod/file/thumbnail.php?size=medium&file_guid={$vars['entity']->getGUID()}\" /></a>";
+ echo "<p class='subtitle'>$owner_link $date</p>";
+ echo '</div>';
} else {
// brief view