From d325c3c77f7931ceba6babd8741febf4f33151f0 Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 30 Dec 2010 22:53:36 +0000 Subject: added gallery css for the file plugin git-svn-id: http://code.elgg.org/elgg/trunk@7782 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/file/search.php | 11 ++++++++++- mod/file/views/default/file/css.php | 10 ++++++++++ mod/file/views/default/object/file.php | 8 +++++++- 3 files changed, 27 insertions(+), 2 deletions(-) (limited to 'mod/file') diff --git a/mod/file/search.php b/mod/file/search.php index fa6c5ea71..ba6808176 100644 --- a/mod/file/search.php +++ b/mod/file/search.php @@ -73,7 +73,12 @@ $offset = (int)get_input('offset', 0); $limit = 10; - if ($listtype == "gallery") $limit = 12; + + if ($listtype == "gallery") { + $limit = 12; + elgg_push_context('gallery'); + } + if (!empty($tag)) { $params = array( 'metadata_name' => $md_type, @@ -88,6 +93,10 @@ $area2 .= elgg_list_entities(array('types' => 'object', 'subtypes' => 'file', 'owner_guid' => $owner_guid, 'limit' => $limit, 'offset' => $offset)); } + if ($listtype == "gallery") { + elgg_pop_context(); + } + elgg_pop_context(); $content = "
".$area1.$area2."
"; 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 HTML; +} elseif (elgg_in_context('gallery')) { + echo ''; } else { // brief view -- cgit v1.2.3