diff options
Diffstat (limited to 'views/default/object')
-rw-r--r-- | views/default/object/admin_notice.php | 3 | ||||
-rw-r--r-- | views/default/object/default.php | 3 | ||||
-rw-r--r-- | views/default/object/elements/full.php | 37 | ||||
-rw-r--r-- | views/default/object/elements/summary.php | 4 | ||||
-rw-r--r-- | views/default/object/plugin.php | 4 | ||||
-rw-r--r-- | views/default/object/plugin/elements/dependencies.php | 2 | ||||
-rw-r--r-- | views/default/object/plugin/full.php (renamed from views/default/object/plugin/advanced.php) | 43 | ||||
-rw-r--r-- | views/default/object/plugin/invalid.php | 2 | ||||
-rw-r--r-- | views/default/object/plugin/simple.php | 76 | ||||
-rw-r--r-- | views/default/object/widget/elements/controls.php | 1 |
10 files changed, 74 insertions, 101 deletions
diff --git a/views/default/object/admin_notice.php b/views/default/object/admin_notice.php index 086eddb1f..11524567e 100644 --- a/views/default/object/admin_notice.php +++ b/views/default/object/admin_notice.php @@ -11,7 +11,8 @@ if (isset($vars['entity']) && elgg_instanceof($vars['entity'], 'object', 'admin_ 'href' => "action/admin/delete_admin_notice?guid=$notice->guid", 'text' => '<span class="elgg-icon elgg-icon-delete"></span>', 'is_action' => true, - 'class' => 'elgg-admin-notice' + 'class' => 'elgg-admin-notice', + 'is_trusted' => true, )); echo "<p>$delete$message</p>"; diff --git a/views/default/object/default.php b/views/default/object/default.php index a50f19387..110648304 100644 --- a/views/default/object/default.php +++ b/views/default/object/default.php @@ -28,6 +28,7 @@ if ($owner) { $owner_link = elgg_view('output/url', array( 'href' => $owner->getURL(), 'text' => $owner->name, + 'is_trusted' => true, )); } @@ -45,4 +46,4 @@ $params = array( $params = $params + $vars; $body = elgg_view('object/elements/summary', $params); -echo elgg_view_image_block($icon, $body); +echo elgg_view_image_block($icon, $body, $vars); diff --git a/views/default/object/elements/full.php b/views/default/object/elements/full.php new file mode 100644 index 000000000..9b89f9706 --- /dev/null +++ b/views/default/object/elements/full.php @@ -0,0 +1,37 @@ +<?php +/** + * Object full rendering + * + * Sample output: + * <div class="elgg-content"> + * <div class="elgg-image-block"> + * </div> + * <div class="elgg-output"> + * </div> + * </div> + * + * @uses $vars['entity'] ElggEntity + * @uses $vars['icon'] HTML for the content icon + * @uses $vars['summary'] HTML for the content summary + * @uses $vars['body'] HTML for the content body + * @uses $vars['class'] Optional additional class for the content wrapper + */ + +$icon = elgg_extract('icon', $vars); +$summary = elgg_extract('summary', $vars); +$body = elgg_extract('body', $vars); +$class = elgg_extract('class', $vars); +if ($class) { + $class = "elgg-content $class"; +} else { + $class = "elgg-content"; +} + +$header = elgg_view_image_block($icon, $summary); + +echo <<<HTML +<div class="$class"> +$header +$body +</div> +HTML; diff --git a/views/default/object/elements/summary.php b/views/default/object/elements/summary.php index 10cf0b148..8d82bc52a 100644 --- a/views/default/object/elements/summary.php +++ b/views/default/object/elements/summary.php @@ -29,6 +29,7 @@ if ($title_link === '') { $params = array( 'text' => $text, 'href' => $entity->getURL(), + 'is_trusted' => true, ); $title_link = elgg_view('output/url', $params); } @@ -48,6 +49,9 @@ if ($metadata) { echo "<h3>$title_link</h3>"; echo "<div class=\"elgg-subtext\">$subtitle</div>"; echo $tags; + +echo elgg_view('object/summary/extend', $vars); + if ($content) { echo "<div class=\"elgg-content\">$content</div>"; } diff --git a/views/default/object/plugin.php b/views/default/object/plugin.php index 2facca97a..2f64cfcc9 100644 --- a/views/default/object/plugin.php +++ b/views/default/object/plugin.php @@ -11,8 +11,6 @@ $plugin = $vars['entity']; if (!$plugin->isValid()) { echo elgg_view('object/plugin/invalid', $vars); -} elseif ($vars['full_view']) { - echo elgg_view('object/plugin/advanced', $vars); } else { - echo elgg_view('object/plugin/simple', $vars); + echo elgg_view('object/plugin/full', $vars); } diff --git a/views/default/object/plugin/elements/dependencies.php b/views/default/object/plugin/elements/dependencies.php index 5f4aa4392..8abd61692 100644 --- a/views/default/object/plugin/elements/dependencies.php +++ b/views/default/object/plugin/elements/dependencies.php @@ -13,7 +13,7 @@ $deps = $plugin->getPackage()->checkDependencies(true); $columns = array('type', 'name', 'expected_value', 'local_value', 'comment'); -echo '<table class="elgg-plugins-dependencies styled"><tr>'; +echo '<table class="elgg-plugin-dependencies styled"><tr>'; foreach ($columns as $column) { $column = elgg_echo("admin:plugins:dependencies:$column"); diff --git a/views/default/object/plugin/advanced.php b/views/default/object/plugin/full.php index 08da89c01..db4e4dbcc 100644 --- a/views/default/object/plugin/advanced.php +++ b/views/default/object/plugin/full.php @@ -40,9 +40,10 @@ if ($reordering) { )); $links .= "<li>" . elgg_view('output/url', array( - 'href' => $top_url, - 'text' => elgg_echo('top'), - 'is_action' => true + 'href' => $top_url, + 'text' => elgg_echo('top'), + 'is_action' => true, + 'is_trusted' => true, )) . "</li>"; $up_url = elgg_http_add_url_query_elements($actions_base . 'set_priority', array( @@ -52,9 +53,10 @@ if ($reordering) { )); $links .= "<li>" . elgg_view('output/url', array( - 'href' => $up_url, - 'text' => elgg_echo('up'), - 'is_action' => true + 'href' => $up_url, + 'text' => elgg_echo('up'), + 'is_action' => true, + 'is_trusted' => true, )) . "</li>"; } @@ -67,9 +69,10 @@ if ($reordering) { )); $links .= "<li>" . elgg_view('output/url', array( - 'href' => $down_url, - 'text' => elgg_echo('down'), - 'is_action' => true + 'href' => $down_url, + 'text' => elgg_echo('down'), + 'is_action' => true, + 'is_trusted' => true, )) . "</li>"; $bottom_url = elgg_http_add_url_query_elements($actions_base . 'set_priority', array( @@ -81,7 +84,8 @@ if ($reordering) { $links .= "<li>" . elgg_view('output/url', array( 'href' => $bottom_url, 'text' => elgg_echo('bottom'), - 'is_action' => true + 'is_action' => true, + 'is_trusted' => true, )) . "</li>"; } } else { @@ -93,7 +97,8 @@ if ($reordering) { // always let them deactivate $options = array( - 'is_action' => true + 'is_action' => true, + 'is_trusted' => true, ); if ($active) { $active_class = 'elgg-state-active'; @@ -163,7 +168,8 @@ $author = '<span>' . elgg_echo('admin:plugins:label:author') . '</span>: ' $version = htmlspecialchars($plugin->getManifest()->getVersion()); $website = elgg_view('output/url', array( 'href' => $plugin->getManifest()->getWebsite(), - 'text' => $plugin->getManifest()->getWebsite() + 'text' => $plugin->getManifest()->getWebsite(), + 'is_trusted' => true, )); $copyright = elgg_view('output/text', array('value' => $plugin->getManifest()->getCopyright())); @@ -179,7 +185,8 @@ if ($files) { $url = 'admin_plugin_text_file/' . $plugin->getID() . "/$file"; $link = elgg_view('output/url', array( 'text' => $file, - 'href' => $url + 'href' => $url, + 'is_trusted' => true, )); $docs .= "<li>$link</li>"; @@ -197,7 +204,7 @@ if ($files) { <?php echo $links; ?> </ul> <?php endif; ?> - <div class="clearfloat right mtm"> + <div class="clearfloat float-alt mtm"> <?php echo $action_button; ?> </div> </div> @@ -207,7 +214,7 @@ $settings_view_old = 'settings/' . $plugin->getID() . '/edit'; $settings_view_new = 'plugins/' . $plugin->getID() . '/settings'; if (elgg_view_exists($settings_view_old) || elgg_view_exists($settings_view_new)) { $link = elgg_get_site_url() . "admin/plugin_settings/" . $plugin->getID(); - $settings_link = "<a class='plugin_settings small link' href='$link'>[" . elgg_echo('settings') . "]</a>"; + $settings_link = "<a class='elgg-plugin-settings' href='$link'>[" . elgg_echo('settings') . "]</a>"; } ?> <div class="elgg-head"> @@ -233,8 +240,8 @@ if (elgg_view_exists($settings_view_old) || elgg_view_exists($settings_view_new) } ?> - <div class="plugin_description"><?php echo $description; ?></div> - <p class="plugin_author"><?php echo $author . ' - ' . $website; ?></p> + <div><?php echo $description; ?></div> + <p><?php echo $author . ' - ' . $website; ?></p> <?php echo $docs; ?> <div class="pts"> @@ -248,7 +255,7 @@ if (elgg_view_exists($settings_view_old) || elgg_view_exists($settings_view_new) </div> </div> </div> - <div class="hidden manifest_file" id="elgg-plugin-manifest-<?php echo $plugin->getID(); ?>"> + <div class="elgg-plugin-more hidden" id="elgg-plugin-manifest-<?php echo $plugin->getID(); ?>"> <?php if ($screenshots_html) { diff --git a/views/default/object/plugin/invalid.php b/views/default/object/plugin/invalid.php index f29ee8d12..bb518cd53 100644 --- a/views/default/object/plugin/invalid.php +++ b/views/default/object/plugin/invalid.php @@ -34,7 +34,7 @@ $error = $plugin->getError(); ?> </div> - <div class="hidden manifest_file" id="elgg-plugin-manifest-<?php echo $plugin->getID(); ?>"> + <div class="hidden elgg-plugin-more" id="elgg-plugin-manifest-<?php echo $plugin->getID(); ?>"> <p><?php echo elgg_echo('admin:plugins:label:location') . ": " . $path; ?></p> <p><?php echo $error; ?></p> </div> diff --git a/views/default/object/plugin/simple.php b/views/default/object/plugin/simple.php deleted file mode 100644 index 5f5b08f10..000000000 --- a/views/default/object/plugin/simple.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php -$plugin = $vars['entity']; - -$plugin_guid = $plugin->guid; -$plugin_id = $plugin->getID(); -$active = $plugin->isActive(); -$can_activate = $plugin->canActivate(); -$name = $plugin->getManifest()->getName(); -$author = $plugin->getManifest()->getAuthor(); -$version = $plugin->getManifest()->getVersion(); -$website = $plugin->getManifest()->getWebsite(); -$description = $plugin->getManifest()->getDescription(); - -if ($active) { - $active_class = 'elgg-state-active'; - $checked = 'checked="checked"'; -} else { - $active_class = 'elgg-state-inactive'; - $checked = ''; -} - -if ($can_activate) { - $disabled = ''; -} else { - $disabled = 'disabled="disabled"'; - $description .= '<p>' . elgg_echo('admin:plugins:simple:cannot_activate') . '</p>'; -} - -$description = elgg_view('output/longtext', array('value' => $description)); - -$plugin_footer = '<ul class="elgg-menu elgg-menu-footer">'; - -if ($author) { - $plugin_footer .= '<li>' . elgg_echo('admin:plugins:author', array($author)) . '</li>'; -} - -if ($version) { - $plugin_footer .= '<li>' . elgg_echo('admin:plugins:version', array($version)) . '</li>'; -} - -if ($website) { - $plugin_footer .= "<li><a href=\"$website\">" . elgg_echo('admin:plugins:plugin_website') . '</a></li>'; -} - -// show links to text files -$files = $plugin->getAvailableTextFiles(); - -foreach ($files as $file => $path) { - $url = 'admin_plugin_text_file/' . $plugin->getID() . "/$file"; - $link = elgg_view('output/url', array( - 'text' => $file, - 'href' => $url - )); - $plugin_footer .= "<li>$link</li>"; - -} - -if (elgg_view_exists("settings/$plugin_id/edit")) { - $settings_href = elgg_get_site_url() . "admin/plugin_settings/$plugin_id"; - $plugin_footer .= "<li><a class='plugin_settings link' href='$settings_href'>" . elgg_echo('settings') . "</a></li>"; -} - -$plugin_footer .= "</ul>"; - -echo <<<___END - <div class="elgg-plugin $active_class elgg-grid"> - <div class="elgg-col elgg-col-1of5"> - <input type="checkbox" id="$plugin_guid" $checked $disabled name="active_plugin_guids[]" value="$plugin_guid"/> - <label for="$plugin_guid">$name</label> - </div> - <div class="elgg-col elgg-col-4of5"> - $description - $plugin_footer - </div> - </div> -___END; diff --git a/views/default/object/widget/elements/controls.php b/views/default/object/widget/elements/controls.php index abf2154fc..6d06d28bc 100644 --- a/views/default/object/widget/elements/controls.php +++ b/views/default/object/widget/elements/controls.php @@ -24,6 +24,7 @@ if ($widget->canEdit()) { 'title' => elgg_echo('widget:delete', array($widget->getTitle())), 'href' => "action/widgets/delete?guid=$widget->guid", 'is_action' => true, + 'is_trusted' => true, 'class' => 'elgg-widget-delete-button', 'id' => "elgg-widget-delete-button-$widget->guid" ); |