From 54dac8c96380082136b38532707c7b1e031549e8 Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 24 Dec 2010 05:16:04 +0000 Subject: creating standard list body for plugins git-svn-id: http://code.elgg.org/elgg/trunk@7717 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/css/elements/core.php | 29 +++++++++++++++-- views/default/layout/objects/list/body.php | 51 ++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 views/default/layout/objects/list/body.php (limited to 'views/default') diff --git a/views/default/css/elements/core.php b/views/default/css/elements/core.php index 29fdd598b..6f4e46f66 100644 --- a/views/default/css/elements/core.php +++ b/views/default/css/elements/core.php @@ -210,11 +210,34 @@ h2 { margin: 5px 0; clear: both; } - -.elgg-list li { +.elgg-list > li { border-bottom: 1px dotted #CCCCCC; } - +.elgg-list-metadata { + float: right; + margin-left: 15px; + font-size: 90%; +} +.elgg-list-metadata li { + float: left; + margin-left: 15px; +} +.elgg-list-metadata, .elgg-list-metadata a { + color: #aaaaaa; +} +.elgg-list-subtitle { + color: #666666; + font-size: 85%; + line-height: 1.2em; + font-style: italic; + margin-bottom: 5px; +} +.elgg-tags { + margin-bottom: 5px; +} +.elgg-list-content { + margin: 10px 5px; +} .elgg-center { margin: 0 auto; } diff --git a/views/default/layout/objects/list/body.php b/views/default/layout/objects/list/body.php new file mode 100644 index 000000000..9bef21da9 --- /dev/null +++ b/views/default/layout/objects/list/body.php @@ -0,0 +1,51 @@ +
  • Public
  • Like this
  • + *

    Title

    + *

    Posted 3 hours ago by George

    + *

    one, two

    + *
    Excerpt text
    + * + * @uses $vars['entity'] ElggEntity + * @uses $vars['title'] Title link (optional) + * @uses $vars['metadata'] HTML for entity metadata and actions (optional) + * @uses $vars['subtitle'] HTML for the subtitle (optional) + * @uses $vars['tags'] HTML for the tags (optional) + * @uses $vars['content'] HTML for the entity content (optional) + */ + +$entity = $vars['entity']; + +$title_link = elgg_get_array_value('title', $vars, ''); +if (!$title_link) { + $params = array( + 'text' => $entity->title, + 'href' => $entity->getURL(), + ); + $title_link = elgg_view('output/url', $params); +} + +$metadata = elgg_get_array_value('metadata', $vars, ''); +$subtitle = elgg_get_array_value('subtitle', $vars, ''); +$content = elgg_get_array_value('content', $vars, ''); + +$tags = elgg_get_array_value('tags', $vars, ''); +if (!$tags) { + $tag_text = elgg_view('output/tags', array('tags' => $entity->tags)); + if ($tag_text) { + $tags = '

    ' . $tag_text . '

    '; + } +} + +if ($metadata) { + echo $metadata; +} +echo "

    $title_link

    "; +echo "

    $subtitle

    "; +echo $tags; +if ($content) { + echo "
    $content
    "; +} -- cgit v1.2.3