diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-16 20:26:12 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-16 20:26:12 +0000 |
commit | c66831fa5138a277a9729174caf14c7eb323fb07 (patch) | |
tree | 2444b54badf4914b59c88700cc1ce30a57ae7ff1 /views/default/object | |
parent | 8048313e87b9fd5ab6734e29a0e951524fa33e45 (diff) | |
download | elgg-c66831fa5138a277a9729174caf14c7eb323fb07.tar.gz elgg-c66831fa5138a277a9729174caf14c7eb323fb07.tar.bz2 |
Standardizing views.`
git-svn-id: http://code.elgg.org/elgg/trunk@3555 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/object')
-rw-r--r-- | views/default/object/default.php | 112 | ||||
-rw-r--r-- | views/default/object/object.php | 20 | ||||
-rw-r--r-- | views/default/object/plugin.php | 29 | ||||
-rw-r--r-- | views/default/object/widget.php | 25 |
4 files changed, 91 insertions, 95 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 diff --git a/views/default/object/object.php b/views/default/object/object.php index a27a2910f..2be9e1fa1 100644 --- a/views/default/object/object.php +++ b/views/default/object/object.php @@ -1,15 +1,15 @@ <?php - /** - * Elgg default object view. - * This is a placeholder. - * - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ - */ +/** + * Elgg default object view. + * This is a placeholder. + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ - $entity = $vars['entity']; +$entity = $vars['entity']; ?> <div> diff --git a/views/default/object/plugin.php b/views/default/object/plugin.php index 5f9c5354c..411a9f8d8 100644 --- a/views/default/object/plugin.php +++ b/views/default/object/plugin.php @@ -1,20 +1,19 @@ <?php - /** - * Elgg plugin - * - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ - */ +/** + * Elgg plugin + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ - $entity = $vars['entity']; - $plugin = $vars['plugin']; - $prefix = $vars['prefix']; // Do we want to show admin settings (default) or user settings - - $form_body = elgg_view("{$prefix}settings/{$plugin}/edit", $vars); - $form_body .= "<p>" . elgg_view('input/hidden', array('internalname' => 'plugin', 'value' => $plugin)) . elgg_view('input/submit', array('value' => elgg_echo('save'))) . "</p>"; - +$entity = $vars['entity']; +$plugin = $vars['plugin']; +$prefix = $vars['prefix']; // Do we want to show admin settings (default) or user settings + +$form_body = elgg_view("{$prefix}settings/{$plugin}/edit", $vars); +$form_body .= "<p>" . elgg_view('input/hidden', array('internalname' => 'plugin', 'value' => $plugin)) . elgg_view('input/submit', array('value' => elgg_echo('save'))) . "</p>"; ?> <div> diff --git a/views/default/object/widget.php b/views/default/object/widget.php index b49120e2e..9dd2999ce 100644 --- a/views/default/object/widget.php +++ b/views/default/object/widget.php @@ -1,16 +1,11 @@ <?php - - /** - * Elgg default widget view - * - * @package Elgg - * @subpackage Core - - * @author Curverider Ltd - - * @link http://elgg.org/ - */ - - echo elgg_view('widgets/wrapper',$vars); - -?>
\ No newline at end of file +/** + * Elgg default widget view + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ + +echo elgg_view('widgets/wrapper',$vars); |