aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/views.php4
-rw-r--r--mod/search/views/default/search/list.php4
-rw-r--r--views/default/css/admin.php2
-rw-r--r--views/default/css/elements/components.php4
-rw-r--r--views/default/object/elements/summary.php2
-rw-r--r--views/default/page/components/gallery.php31
-rw-r--r--views/default/page/components/list.php6
7 files changed, 39 insertions, 14 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 4911171c8..df69593f9 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -969,7 +969,7 @@ $list_type_toggle = true, $pagination = true) {
// new function
$defaults = array(
'items' => $entities,
- 'list_class' => 'elgg-entity-list',
+ 'list_class' => 'elgg-list-entity',
'full_view' => true,
'pagination' => true,
'gallery' => false,
@@ -992,7 +992,7 @@ $list_type_toggle = true, $pagination = true) {
'pagination' => $pagination,
'gallery' => false,
'list_type_toggle' => $list_type_toggle,
- 'list_class' => 'elgg-entity-list',
+ 'list_class' => 'elgg-list-entity',
);
}
diff --git a/mod/search/views/default/search/list.php b/mod/search/views/default/search/list.php
index c5afaaa86..11860c094 100644
--- a/mod/search/views/default/search/list.php
+++ b/mod/search/views/default/search/list.php
@@ -82,7 +82,7 @@ $more = ($more_check > 0) ? $more_check : 0;
if ($more) {
$title_key = ($more == 1) ? 'comment' : 'comments';
$more_str = elgg_echo('search:more', array($count, $type_str));
- $more_link = "<li class='elgg-list-item'><a href=\"$url\">$more_str</a></li>";
+ $more_link = "<li class='elgg-item'><a href=\"$url\">$more_str</a></li>";
} else {
$more_link = '';
}
@@ -98,7 +98,7 @@ if ($view) {
$body .= '<ul class="elgg-list search-list">';
foreach ($entities as $entity) {
$id = "elgg-{$entity->getType()}-{$entity->getGUID()}";
- $body .= "<li id=\"$id\" class=\"elgg-list-item\">";
+ $body .= "<li id=\"$id\" class=\"elgg-item\">";
$body .= elgg_view($view, array(
'entity' => $entity,
'params' => $vars['params'],
diff --git a/views/default/css/admin.php b/views/default/css/admin.php
index a56c7b214..d7c154438 100644
--- a/views/default/css/admin.php
+++ b/views/default/css/admin.php
@@ -383,7 +383,7 @@ table.mceLayout {
margin-left: 5px;
}
-.elgg-list-item {
+.elgg-item {
margin: 3px;
}
.elgg-menu-metadata {
diff --git a/views/default/css/elements/components.php b/views/default/css/elements/components.php
index 203f6d257..594694e60 100644
--- a/views/default/css/elements/components.php
+++ b/views/default/css/elements/components.php
@@ -47,10 +47,10 @@
border-bottom: 1px dotted #CCCCCC;
}
-.elgg-list-item .elgg-subtext {
+.elgg-item .elgg-subtext {
margin-bottom: 5px;
}
-.elgg-list-content {
+.elgg-item .elgg-content {
margin: 10px 5px;
}
diff --git a/views/default/object/elements/summary.php b/views/default/object/elements/summary.php
index d3a6ea862..9206ada66 100644
--- a/views/default/object/elements/summary.php
+++ b/views/default/object/elements/summary.php
@@ -49,5 +49,5 @@ echo "<h3>$title_link</h3>";
echo "<div class=\"elgg-subtext\">$subtitle</div>";
echo $tags;
if ($content) {
- echo "<div class=\"elgg-list-content\">$content</div>";
+ echo "<div class=\"elgg-content\">$content</div>";
}
diff --git a/views/default/page/components/gallery.php b/views/default/page/components/gallery.php
index e86b9f885..f03eb1109 100644
--- a/views/default/page/components/gallery.php
+++ b/views/default/page/components/gallery.php
@@ -2,7 +2,17 @@
/**
* Gallery view
*
- * @uses $vars['items']
+ * Implemented as an unorder list
+ *
+ * @uses $vars['items'] Array of ElggEntity or ElggAnnotation objects
+ * @uses $vars['offset'] Index of the first list item in complete list
+ * @uses $vars['limit'] Number of items per page
+ * @uses $vars['count'] Number of items in the complete list
+ * @uses $vars['pagination'] Show pagination? (default: true)
+ * @uses $vars['position'] Position of the pagination: before, after, or both
+ * @uses $vars['full_view'] Show the full view of the items (default: false)
+ * @uses $vars['gallery_class'] Additional CSS class for the <ul> element
+ * @uses $vars['item_class'] Additional CSS class for the <li> elements
*/
$items = $vars['items'];
@@ -19,6 +29,16 @@ $pagination = elgg_extract('pagination', $vars, true);
$offset_key = elgg_extract('offset_key', $vars, 'offset');
$position = elgg_extract('position', $vars, 'after');
+$gallery_class = 'elgg-gallery';
+if (isset($vars['gallery_class'])) {
+ $gallery_class = "$gallery_class {$vars['gallery_class']}";
+}
+
+$item_class = 'elgg-item';
+if (isset($vars['item_class'])) {
+ $item_class = "$item_class {$vars['item_class']}";
+}
+
if ($pagination && $count) {
$nav .= elgg_view('navigation/pagination', array(
'offset' => $offset,
@@ -33,10 +53,15 @@ if ($position == 'before' || $position == 'both') {
}
?>
-<ul class="elgg-gallery">
+<ul class="<?php echo $gallery_class; ?>">
<?php
foreach ($items as $item) {
- echo '<li>';
+ if (elgg_instanceof($item)) {
+ $id = "elgg-{$item->getType()}-{$item->getGUID()}";
+ } else {
+ $id = "item-{$item->getType()}-{$item->id}";
+ }
+ echo "<li id=\"$id\" class=\"$item_class\">";
echo elgg_view_list_item($item, $vars);
echo "</li>";
}
diff --git a/views/default/page/components/list.php b/views/default/page/components/list.php
index ae951c89f..c83fa0966 100644
--- a/views/default/page/components/list.php
+++ b/views/default/page/components/list.php
@@ -27,12 +27,12 @@ $position = elgg_extract('position', $vars, 'after');
$list_class = 'elgg-list';
if (isset($vars['list_class'])) {
- $list_class = "{$vars['list_class']} $list_class";
+ $list_class = "$list_class {$vars['list_class']}";
}
-$item_class = 'elgg-list-item';
+$item_class = 'elgg-item';
if (isset($vars['item_class'])) {
- $item_class = "{$vars['item_class']} $item_class";
+ $item_class = "$item_class {$vars['item_class']}";
}
$html = "";