aboutsummaryrefslogtreecommitdiff
path: root/views/default/object/default.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/object/default.php')
-rw-r--r--views/default/object/default.php112
1 files changed, 57 insertions, 55 deletions
diff --git a/views/default/object/default.php b/views/default/object/default.php
index 10ac062d1..3ace73d7f 100644
--- a/views/default/object/default.php
+++ b/views/default/object/default.php
@@ -1,57 +1,59 @@
<?php
- /**
- * ElggEntity default view.
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- */
-
- if ($vars['full']) {
- echo elgg_view('export/entity', $vars);
- } else {
-
- $icon = elgg_view(
- 'graphics/icon', array(
- 'entity' => $vars['entity'],
- 'size' => 'small',
- )
- );
-
-
- $title = $vars['entity']->title;
- if (!$title) $title = $vars['entity']->name;
- if (!$title) $title = get_class($vars['entity']);
-
- $controls = "";
- if ($vars['entity']->canEdit())
- {
- $controls .= " (<a href=\"{$vars['url']}action/entities/delete?guid={$vars['entity']->guid}\">" . elgg_echo('delete') . "</a>)";
- }
-
- $info = "<div><p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $title . "</a></b> $controls </p></div>";
-
- if (get_input('search_viewtype') == "gallery") {
-
- $icon = "";
-
- }
-
- $owner = $vars['entity']->getOwnerEntity();
- $ownertxt = elgg_echo('unknown');
- if ($owner)
- $ownertxt = "<a href=\"" . $owner->getURL() . "\">" . $owner->name ."</a>";
-
- $info .= "<div>".sprintf(elgg_echo("entity:default:strapline"),
- friendly_time($vars['entity']->time_created),
- $ownertxt
- );
-
- $info .= "</div>";
-
- $info = "<span title=\"" . elgg_echo('entity:default:missingsupport:popup') . "\">$info</span>";
- $icon = "<span title=\"" . elgg_echo('entity:default:missingsupport:popup') . "\">$icon</span>";
-
- echo elgg_view_listing($icon, $info);
+/**
+ * ElggEntity default view.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+if ($vars['full']) {
+ echo elgg_view('export/entity', $vars);
+} else {
+
+ $icon = elgg_view(
+ 'graphics/icon', array(
+ 'entity' => $vars['entity'],
+ 'size' => 'small',
+ )
+ );
+
+
+ $title = $vars['entity']->title;
+ if (!$title) {
+ $title = $vars['entity']->name;
+ }
+ if (!$title) {
+ $title = get_class($vars['entity']);
+ }
+
+ $controls = "";
+ if ($vars['entity']->canEdit()) {
+ $controls .= " (<a href=\"{$vars['url']}action/entities/delete?guid={$vars['entity']->guid}\">" . elgg_echo('delete') . "</a>)";
+ }
+
+ $info = "<div><p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $title . "</a></b> $controls </p></div>";
+
+ if (get_input('search_viewtype') == "gallery") {
+ $icon = "";
+ }
+
+ $owner = $vars['entity']->getOwnerEntity();
+ $ownertxt = elgg_echo('unknown');
+ if ($owner) {
+ $ownertxt = "<a href=\"" . $owner->getURL() . "\">" . $owner->name ."</a>";
}
+
+ $info .= "<div>".sprintf(elgg_echo("entity:default:strapline"),
+ friendly_time($vars['entity']->time_created),
+ $ownertxt
+ );
+
+ $info .= "</div>";
+
+ $info = "<span title=\"" . elgg_echo('entity:default:missingsupport:popup') . "\">$info</span>";
+ $icon = "<span title=\"" . elgg_echo('entity:default:missingsupport:popup') . "\">$icon</span>";
+
+ echo elgg_view_listing($icon, $info);
+} \ No newline at end of file