diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/default/css/elements/components.php | 9 | ||||
-rw-r--r-- | views/default/forms/admin/site/update_advanced.php | 8 | ||||
-rw-r--r-- | views/default/output/tags.php | 38 |
3 files changed, 41 insertions, 14 deletions
diff --git a/views/default/css/elements/components.php b/views/default/css/elements/components.php index 77313fa1a..c71ef1de9 100644 --- a/views/default/css/elements/components.php +++ b/views/default/css/elements/components.php @@ -265,17 +265,16 @@ Tags *************************************** */ .elgg-tags { - display: inline; font-size: 85%; } -.elgg-tags li { - display: inline; +.elgg-tags > li { + float:left; margin-right: 5px; } -.elgg-tags li:after { +.elgg-tags li.elgg-tag:after { content: ","; } -.elgg-tags li:last-child:after { +.elgg-tags li.elgg-tag:last-child:after { content: ""; } .elgg-tagcloud { diff --git a/views/default/forms/admin/site/update_advanced.php b/views/default/forms/admin/site/update_advanced.php index 5155fc415..f79a235b5 100644 --- a/views/default/forms/admin/site/update_advanced.php +++ b/views/default/forms/admin/site/update_advanced.php @@ -19,6 +19,12 @@ foreach (array('wwwroot', 'path', 'dataroot') as $field) { $form_body .= "<div>" . elgg_echo('admin:site:access:warning') . "<br />"; $form_body .= "<label>" . elgg_echo('installation:sitepermissions') . "</label>"; $form_body .= elgg_view('input/access', array( + 'options_values' => array( + ACCESS_PRIVATE => elgg_echo("PRIVATE"), + ACCESS_FRIENDS => elgg_echo("access:friends:label"), + ACCESS_LOGGED_IN => elgg_echo("LOGGED_IN"), + ACCESS_PUBLIC => elgg_echo("PUBLIC") + ), 'name' => 'default_access', 'value' => elgg_get_config('default_access'), )) . "</div>"; @@ -95,4 +101,4 @@ $form_body .= '<div class="elgg-foot">'; $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save"))); $form_body .= '</div>'; -echo $form_body;
\ No newline at end of file +echo $form_body; diff --git a/views/default/output/tags.php b/views/default/output/tags.php index 6dedfacc7..3082dd41e 100644 --- a/views/default/output/tags.php +++ b/views/default/output/tags.php @@ -7,6 +7,9 @@ * @uses $vars['type'] The entity type, optional * @uses $vars['subtype'] The entity subtype, optional * @uses $vars['entity'] Optional. Entity whose tags are being displayed (metadata ->tags) + * @uses $vars['list_class'] Optional. Additional classes to be passed to <ul> element + * @uses $vars['item_class'] Optional. Additional classes to be passed to <li> elements + * @uses $vars['icon_class'] Optional. Additional classes to be passed to tags icon image */ if (isset($vars['entity'])) { @@ -38,9 +41,19 @@ if (!empty($vars['tags'])) { $vars['tags'] = array($vars['tags']); } - echo '<div>'; - echo elgg_view_icon('tag'); - echo '<ul class="elgg-tags">'; + $list_class = "elgg-tags"; + if (isset($vars['list_class'])) { + $list_class = "$list_class {$vars['list_class']}"; + } + + $item_class = "elgg-tag"; + if (isset($vars['item_class'])) { + $item_class = "$item_class {$vars['item_class']}"; + } + + $icon_class = elgg_extract('icon_class', $vars); + $list_items = '<li>' . elgg_view_icon('tag', $icon_class) . '</li>'; + foreach($vars['tags'] as $tag) { if (!empty($vars['type'])) { $type = "&type={$vars['type']}"; @@ -49,11 +62,20 @@ if (!empty($vars['tags'])) { } $url = elgg_get_site_url() . 'search?q=' . urlencode($tag) . "&search_type=tags{$type}{$subtype}{$object}"; if (is_string($tag)) { - echo '<li>'; - echo elgg_view('output/url', array('href' => $url, 'text' => $tag, 'rel' => 'tag')); - echo '</li>'; + $list_items .= "<li class=\"$item_class\">"; + $list_items .= elgg_view('output/url', array('href' => $url, 'text' => $tag, 'rel' => 'tag')); + $list_items .= '</li>'; } } - echo '</ul>'; - echo '</div>'; + + $list = <<<___HTML + <div class="clearfix"> + <ul class="$list_class"> + $list_items + </ul> + </div> +___HTML; + + echo $list; } + |