From 8048313e87b9fd5ab6734e29a0e951524fa33e45 Mon Sep 17 00:00:00 2001 From: brettp Date: Fri, 16 Oct 2009 19:26:37 +0000 Subject: Standardized more files. git-svn-id: http://code.elgg.org/elgg/trunk@3554 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/account/forms/forgotten_password.php | 26 +- views/default/account/forms/login.php | 62 ++- views/default/account/forms/register.php | 80 ++-- views/default/account/forms/useradd.php | 57 +-- views/default/admin/main.php | 29 +- views/default/admin/main_opt/plugins.php | 20 +- views/default/admin/main_opt/site.php | 16 +- views/default/admin/main_opt/statistics.php | 16 +- views/default/admin/main_opt/user.php | 16 +- views/default/admin/plugins.php | 103 +++-- views/default/admin/plugins_opt/plugin.php | 75 ++-- views/default/admin/site.php | 32 +- views/default/admin/statistics.php | 22 +- views/default/admin/statistics_opt/basic.php | 61 ++- views/default/admin/statistics_opt/numentities.php | 90 ++-- views/default/admin/statistics_opt/online.php | 30 +- views/default/admin/user.php | 35 +- views/default/admin/user_opt/adduser.php | 18 +- views/default/admin/user_opt/search.php | 22 +- views/default/ajax/loader.php | 39 +- views/default/annotation/annotate.php | 57 +-- views/default/annotation/generic_comment.php | 113 +++-- views/default/api/output.php | 34 +- views/default/basic_elements/welcome.php | 21 +- views/default/canvas/default.php | 32 +- views/default/canvas/layouts/edit_layout.php | 20 +- views/default/canvas/layouts/one_column.php | 20 +- views/default/canvas/layouts/sidebar_boxes.php | 24 +- .../canvas/layouts/two_column_left_sidebar.php | 28 +- .../canvas/layouts/two_column_right_sidebar.php | 25 +- views/default/canvas/layouts/widgets.php | 174 ++++---- views/default/canvas_header/submenu_group.php | 30 +- views/default/canvas_header/submenu_template.php | 30 +- views/default/comments/forms/edit.php | 36 +- views/default/dashboard/blurb.php | 12 + views/default/export/entity.php | 44 +- views/default/export/metadata.php | 22 +- views/default/export/relationship.php | 27 +- views/default/friends/collection.php | 110 +++-- views/default/friends/collections.php | 84 ++-- views/default/friends/collectiontabs.php | 31 +- views/default/friends/forms/collectionfields.php | 30 +- views/default/friends/forms/edit.php | 110 +++-- views/default/friends/list.php | 41 +- views/default/friends/picker.php | 459 ++++++++++----------- views/default/friends/river/create.php | 36 +- 46 files changed, 1217 insertions(+), 1282 deletions(-) (limited to 'views/default') diff --git a/views/default/account/forms/forgotten_password.php b/views/default/account/forms/forgotten_password.php index 1ab2bd42e..5e760cef3 100644 --- a/views/default/account/forms/forgotten_password.php +++ b/views/default/account/forms/forgotten_password.php @@ -1,19 +1,19 @@ " . elgg_echo('user:password:text') . "

"; - $form_body .= "

"; - $form_body .= elgg_view('input/captcha'); - $form_body .= "

" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "

"; +$form_body = "

" . elgg_echo('user:password:text') . "

"; +$form_body .= "

"; +$form_body .= elgg_view('input/captcha'); +$form_body .= "

" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "

"; ?>
- "{$vars['url']}action/user/requestnewpassword", 'body' => $form_body)); ?> + "{$vars['url']}action/user/requestnewpassword", 'body' => $form_body)); ?>
\ No newline at end of file diff --git a/views/default/account/forms/login.php b/views/default/account/forms/login.php index 030375a19..189431698 100644 --- a/views/default/account/forms/login.php +++ b/views/default/account/forms/login.php @@ -1,37 +1,35 @@ "; +$form_body .= "
"; +$form_body .= "
"; +$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))) . "

"; +$form_body .= "

"; +$form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "" . elgg_echo('register') . " | " : ""; +$form_body .= "" . elgg_echo('user:password:lost') . "

"; - * @link http://elgg.org/ - */ - - global $CONFIG; - - $form_body = "

"; - $form_body .= "
"; - $form_body .= "
"; - $form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))) . "

"; - $form_body .= "

"; - $form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "" . elgg_echo('register') . " | " : ""; - $form_body .= "" . elgg_echo('user:password:lost') . "

"; - - $login_url = $vars['url']; - if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) - $login_url = str_replace("http", "https", $vars['url']); +$login_url = $vars['url']; +if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) { + $login_url = str_replace("http", "https", $vars['url']); +} ?> - -
-

- $form_body, 'action' => "{$login_url}action/login")); - ?> -
- \ No newline at end of file + +
+

+ $form_body, 'action' => "{$login_url}action/login")); + ?> +
+ \ No newline at end of file diff --git a/views/default/account/forms/register.php b/views/default/account/forms/register.php index 8ceeaab8f..99fdea272 100644 --- a/views/default/account/forms/register.php +++ b/views/default/account/forms/register.php @@ -1,45 +1,43 @@ admin) && ($vars['show_admin'])) - $admin_option = true; - - $form_body = "


"; - - $form_body .= "
"; - $form_body .= "
"; - $form_body .= "
"; - $form_body .= "
"; - - // Add captcha hook - $form_body .= elgg_view('input/captcha'); - - if ($admin_option) - $form_body .= elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option')))); - - $form_body .= elgg_view('input/hidden', array('internalname' => 'friend_guid', 'value' => $vars['friend_guid'])); - $form_body .= elgg_view('input/hidden', array('internalname' => 'invitecode', 'value' => $vars['invitecode'])); - $form_body .= elgg_view('input/hidden', array('internalname' => 'action', 'value' => 'register')); - $form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "

"; +$username = get_input('u'); +$email = get_input('e'); +$name = get_input('n'); + +$admin_option = false; +if (($_SESSION['user']->admin) && ($vars['show_admin'])) { + $admin_option = true; +} + +$form_body = "


"; + +$form_body .= "
"; +$form_body .= "
"; +$form_body .= "
"; +$form_body .= "
"; + +// Add captcha hook +$form_body .= elgg_view('input/captcha'); + +if ($admin_option) { + $form_body .= elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option')))); +} + +$form_body .= elgg_view('input/hidden', array('internalname' => 'friend_guid', 'value' => $vars['friend_guid'])); +$form_body .= elgg_view('input/hidden', array('internalname' => 'invitecode', 'value' => $vars['invitecode'])); +$form_body .= elgg_view('input/hidden', array('internalname' => 'action', 'value' => 'register')); +$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "

"; ?> - -
-

- "{$vars['url']}action/register", 'body' => $form_body)) ?> -
\ No newline at end of file +
+

+ "{$vars['url']}action/register", 'body' => $form_body)) ?> +
\ No newline at end of file diff --git a/views/default/account/forms/useradd.php b/views/default/account/forms/useradd.php index dac31a692..09b4c4718 100644 --- a/views/default/account/forms/useradd.php +++ b/views/default/account/forms/useradd.php @@ -1,32 +1,33 @@ admin) && ($vars['show_admin'])) - $admin_option = true; - - $form_body = "

"; - - $form_body .= "

"; - $form_body .= "

"; - $form_body .= "

"; - $form_body .= "

"; - - if ($admin_option) - $form_body .= "

" . elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option')))); - - $form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "

"; +$admin_option = false; +if (($_SESSION['user']->admin) && ($vars['show_admin'])) { + $admin_option = true; +} + +$form_body = "

"; + +$form_body .= "

"; +$form_body .= "

"; +$form_body .= "

"; +$form_body .= "

"; + +if ($admin_option) { + $form_body .= "

" . elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option')))); +} + +$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "

"; ?> - -
-

- "{$vars['url']}action/useradd", 'body' => $form_body)) ?> -
\ No newline at end of file +
+

+ "{$vars['url']}action/useradd", 'body' => $form_body)) ?> +
\ No newline at end of file diff --git a/views/default/admin/main.php b/views/default/admin/main.php index 7922de906..fc143244d 100644 --- a/views/default/admin/main.php +++ b/views/default/admin/main.php @@ -1,19 +1,12 @@ " . elgg_view('output/longtext', array('value' => elgg_echo("admin:description"))) . "

"; - - - -?> \ No newline at end of file +/** + * Elgg administration main screen + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ + +// Description of what's going on +echo "

" . elgg_view('output/longtext', array('value' => elgg_echo("admin:description"))) . "

"; diff --git a/views/default/admin/main_opt/plugins.php b/views/default/admin/main_opt/plugins.php index 33467f7a2..b1e2f0078 100644 --- a/views/default/admin/main_opt/plugins.php +++ b/views/default/admin/main_opt/plugins.php @@ -1,17 +1,17 @@


- ">

+ ">

\ No newline at end of file diff --git a/views/default/admin/main_opt/site.php b/views/default/admin/main_opt/site.php index 0cfd9f70c..7c34015ba 100644 --- a/views/default/admin/main_opt/site.php +++ b/views/default/admin/main_opt/site.php @@ -1,12 +1,12 @@

diff --git a/views/default/admin/main_opt/statistics.php b/views/default/admin/main_opt/statistics.php index b42825fa8..fec4c3f20 100644 --- a/views/default/admin/main_opt/statistics.php +++ b/views/default/admin/main_opt/statistics.php @@ -1,12 +1,12 @@

diff --git a/views/default/admin/main_opt/user.php b/views/default/admin/main_opt/user.php index 284bab255..e82f97625 100644 --- a/views/default/admin/main_opt/user.php +++ b/views/default/admin/main_opt/user.php @@ -1,12 +1,12 @@

diff --git a/views/default/admin/plugins.php b/views/default/admin/plugins.php index e62943d46..f73530f44 100644 --- a/views/default/admin/plugins.php +++ b/views/default/admin/plugins.php @@ -1,55 +1,52 @@ url}action/admin/plugins/enableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('enableall')." url}action/admin/plugins/disableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('disableall')." "; - echo "
" . $buttons . elgg_view('output/longtext', array('value' => elgg_echo("admin:plugins:description"))) . "
"; - - $limit = get_input('limit', 10); - $offset = get_input('offset', 0); - - - // Get the installed plugins - $installed_plugins = $vars['installed_plugins']; - $count = count($installed_plugins); - - $plugin_list = get_plugin_list(); - $max = 0; - foreach($plugin_list as $key => $foo) - if ($key > $max) $max = $key; - - // Display list of plugins - $n = 0; - foreach ($installed_plugins as $plugin => $data) - { - //if (($n>=$offset) && ($n < $offset+$limit)) - echo elgg_view("admin/plugins_opt/plugin", array('plugin' => $plugin, 'details' => $data, 'maxorder' => $max, 'order' => array_search($plugin, $plugin_list))); - - $n++; - } - - // Diplay nav - /* - if ($count) - { - echo elgg_view('navigation/pagination',array( - 'baseurl' => $_SERVER['REQUEST_URI'], - 'offset' => $offset, - 'count' => $count, - )); - } - */ -?> +global $CONFIG; + +$ts = time(); +$token = generate_action_token($ts); + +// Description of what's going on +$buttons = " url}action/admin/plugins/enableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('enableall')." url}action/admin/plugins/disableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('disableall')." "; +echo "
" . $buttons . elgg_view('output/longtext', array('value' => elgg_echo("admin:plugins:description"))) . "
"; + +$limit = get_input('limit', 10); +$offset = get_input('offset', 0); + +// Get the installed plugins +$installed_plugins = $vars['installed_plugins']; +$count = count($installed_plugins); + +$plugin_list = get_plugin_list(); +$max = 0; +foreach($plugin_list as $key => $foo) { + if ($key > $max) $max = $key; +} + +// Display list of plugins +$n = 0; +foreach ($installed_plugins as $plugin => $data) { + //if (($n>=$offset) && ($n < $offset+$limit)) + echo elgg_view("admin/plugins_opt/plugin", array('plugin' => $plugin, 'details' => $data, 'maxorder' => $max, 'order' => array_search($plugin, $plugin_list))); + + $n++; +} + +// Diplay nav +/* +if ($count) +{ + echo elgg_view('navigation/pagination',array( + 'baseurl' => $_SERVER['REQUEST_URI'], + 'offset' => $offset, + 'count' => $count, + )); +} +*/ \ No newline at end of file diff --git a/views/default/admin/plugins_opt/plugin.php b/views/default/admin/plugins_opt/plugin.php index 8a7850ed6..33718f2ac 100644 --- a/views/default/admin/plugins_opt/plugin.php +++ b/views/default/admin/plugins_opt/plugin.php @@ -1,42 +1,41 @@
">
- 10) { ?> + ?> @@ -44,7 +43,7 @@ + ?>
@@ -55,7 +54,7 @@

[]

- +
@@ -63,27 +62,27 @@
- +
$manifest['description'])); ?>
- +

- +
-
- +
\ No newline at end of file diff --git a/views/default/admin/site.php b/views/default/admin/site.php index 077ce3bf3..67cfca5a1 100644 --- a/views/default/admin/site.php +++ b/views/default/admin/site.php @@ -1,20 +1,18 @@ " . elgg_view('output/longtext', array('value' => elgg_echo("admin:site:description"))) . " "; - - echo elgg_view("settings/system",array("action" => $CONFIG->wwwroot."action/admin/site/update_basic")); // Always want to do this first. - - echo "
"; -?> \ No newline at end of file +// Description of what's going on +echo "
" . elgg_view('output/longtext', array('value' => elgg_echo("admin:site:description"))) . " "; + +echo elgg_view("settings/system",array("action" => $CONFIG->wwwroot."action/admin/site/update_basic")); // Always want to do this first. + +echo "
"; \ No newline at end of file diff --git a/views/default/admin/statistics.php b/views/default/admin/statistics.php index 4e0f7c3b1..7c987a607 100644 --- a/views/default/admin/statistics.php +++ b/views/default/admin/statistics.php @@ -1,15 +1,11 @@ \ No newline at end of file +global $CONFIG; \ No newline at end of file diff --git a/views/default/admin/statistics_opt/basic.php b/views/default/admin/statistics_opt/basic.php index aa6b48edf..eed94c76b 100644 --- a/views/default/admin/statistics_opt/basic.php +++ b/views/default/admin/statistics_opt/basic.php @@ -1,36 +1,35 @@
-

- - - - - - - - - +

+
: - , -
: /
+ + + + + + + + -
: - , -
: /
-
\ No newline at end of file + +
\ No newline at end of file diff --git a/views/default/admin/statistics_opt/numentities.php b/views/default/admin/statistics_opt/numentities.php index b48b86319..9f67512e1 100644 --- a/views/default/admin/statistics_opt/numentities.php +++ b/views/default/admin/statistics_opt/numentities.php @@ -1,55 +1,51 @@
-

- - $entry) - { - arsort($entry); - foreach ($entry as $a => $b) - { - - //This function controls the alternating class - $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; +

+
+ $entry) { + arsort($entry); + foreach ($entry as $a => $b) { + + //This function controls the alternating class + $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; + + if ($a == "__base__") { + $a = elgg_echo("item:{$k}"); + if (empty($a)) + $a = $k; + } else { + if (empty($a)) { + $a = elgg_echo("item:{$k}"); + } else { + $a = elgg_echo("item:{$k}:{$a}"); + } - if ($a == "__base__") { - $a = elgg_echo("item:{$k}"); - if (empty($a)) - $a = $k; - } - else { - if (empty($a)) - $a = elgg_echo("item:{$k}"); - else - $a = elgg_echo("item:{$k}:{$a}"); - if (empty($a)) { + if (empty($a)) { $a = "$k $a"; - } - } - echo <<< END - - - - + } + } + echo <<< END + + + + END; - } - } - ?> -
{$a}:{$b}
{$a}:{$b}
+ } + } + ?> +
\ No newline at end of file diff --git a/views/default/admin/statistics_opt/online.php b/views/default/admin/statistics_opt/online.php index 7b82ae085..70a2979c1 100644 --- a/views/default/admin/statistics_opt/online.php +++ b/views/default/admin/statistics_opt/online.php @@ -1,22 +1,20 @@
-

- +

+
diff --git a/views/default/admin/user.php b/views/default/admin/user.php index afd4bdd51..409afbe88 100644 --- a/views/default/admin/user.php +++ b/views/default/admin/user.php @@ -1,21 +1,20 @@ " . elgg_view('output/longtext', array('value' => elgg_echo("admin:user:description"))) . "
"; - // Description of what's going on - echo "
" . elgg_view('output/longtext', array('value' => elgg_echo("admin:user:description"))) . "
"; - - echo elgg_view("admin/user_opt/adduser"); - - echo elgg_view("admin/user_opt/search"); - - if ($vars['list']) echo $vars['list']; - -?> \ No newline at end of file +echo elgg_view("admin/user_opt/adduser"); + +echo elgg_view("admin/user_opt/search"); + +if ($vars['list']) { + echo $vars['list']; +} \ No newline at end of file diff --git a/views/default/admin/user_opt/adduser.php b/views/default/admin/user_opt/adduser.php index 146a7bfa7..759678bc1 100644 --- a/views/default/admin/user_opt/adduser.php +++ b/views/default/admin/user_opt/adduser.php @@ -1,13 +1,13 @@ - * @link http://elgg.org/ - */ - - $loader = <<< END - -
- END; - $loader = str_replace("\n","",$loader); - $loader = str_replace("\r","",$loader); +$loader = str_replace("\n","",$loader); +$loader = str_replace("\r","",$loader); + +if (isset($vars['slashes']) && $vars['slashes'] == true) { + $loader = addslashes($loader); +} - if (isset($vars['slashes']) && $vars['slashes'] == true) { - $loader = addslashes($loader); - } - - echo $loader; - -?> \ No newline at end of file +echo $loader; \ No newline at end of file diff --git a/views/default/annotation/annotate.php b/views/default/annotation/annotate.php index d2869536a..b4e68c9b2 100644 --- a/views/default/annotation/annotate.php +++ b/views/default/annotation/annotate.php @@ -1,27 +1,36 @@ subject_guid); // $statement->getSubject(); - $object = get_entity($vars['item']->object_guid); - $url = $object->getURL(); - $title = $object->title; - if(!$title) - $title = 'Untitled'; - $subtype = get_subtype_from_id($object->subtype); - //grab the annotation, if one exists - if($vars['item']->annotation_id != 0) - $comment = get_annotation($vars['item']->annotation_id)->value; - $url = "getURL()}\">{$performed_by->name}"; - $string = sprintf(elgg_echo("river:posted:generic"),$url) . " "; - $string .= elgg_echo("{$subtype}:river:annotate") . " | getURL()}\">" . $title . ""; - $string .= "
"; - if($comment){ - $contents = strip_tags($comment);//this is so we don't get large images etc in the activity river - if(strlen($contents) > 200) - $string .= substr($contents, 0, strpos($contents, ' ', 200)) . "..."; - else - $string .= $contents; - } - $string .= "
"; -?> +$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject(); +$object = get_entity($vars['item']->object_guid); +$url = $object->getURL(); +$title = $object->title; +if(!$title) { + $title = 'Untitled'; +} +$subtype = get_subtype_from_id($object->subtype); +//grab the annotation, if one exists +if($vars['item']->annotation_id != 0) { + $comment = get_annotation($vars['item']->annotation_id)->value; +} +$url = "getURL()}\">{$performed_by->name}"; +$string = sprintf(elgg_echo("river:posted:generic"),$url) . " "; +$string .= elgg_echo("{$subtype}:river:annotate") . " | getURL()}\">" . $title . ""; +$string .= "
"; +if($comment){ + $contents = strip_tags($comment);//this is so we don't get large images etc in the activity river + if(strlen($contents) > 200) { + $string .= substr($contents, 0, strpos($contents, ' ', 200)) . "..."; + } else { + $string .= $contents; + } +$string .= "
"; - \ No newline at end of file +echo $string; \ No newline at end of file diff --git a/views/default/annotation/generic_comment.php b/views/default/annotation/generic_comment.php index 1ecf7ad8e..ca0f69eaf 100644 --- a/views/default/annotation/generic_comment.php +++ b/views/default/annotation/generic_comment.php @@ -1,61 +1,58 @@ owner_guid); +/** + * Elgg generic comment + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + */ + +$owner = get_user($vars['annotation']->owner_guid); ?> - - -
- -
- $owner, - 'size' => 'small')); - ?> -
-
- - - $vars['annotation']->value)); ?> - -

- name; ?> time_created); ?> -

- - canEdit()) { - - ?> -

- $vars['url'] . "action/comments/delete?annotation_id=" . $vars['annotation']->id, - 'text' => elgg_echo('delete'), - 'confirm' => elgg_echo('deleteconfirm'), - )); - - ?> -

- - -
-
\ No newline at end of file +
+ +
+ $owner, + 'size' => 'small' + ) + ); + ?> +
+
+ + + $vars['annotation']->value)); ?> + +

+ name; ?> time_created); ?> +

+ + canEdit()) { + + ?> +

+ $vars['url'] . "action/comments/delete?annotation_id=" . $vars['annotation']->id, + 'text' => elgg_echo('delete'), + 'confirm' => elgg_echo('deleteconfirm'), + )); + + ?> +

+ + +
+
\ No newline at end of file diff --git a/views/default/api/output.php b/views/default/api/output.php index 112b09e64..57b8461ea 100644 --- a/views/default/api/output.php +++ b/views/default/api/output.php @@ -1,18 +1,18 @@ export(); - $result = $vars['result']; - $export = $result->export(); - ?>
@@ -24,19 +24,19 @@ echo "**** ERROR ({$export->status}) ****"; ?> - + message!="") { ?> result) { ?> - - + + pam) { ?> - + runtime_errors) { ?> diff --git a/views/default/basic_elements/welcome.php b/views/default/basic_elements/welcome.php index 1a37a464e..297daa830 100644 --- a/views/default/basic_elements/welcome.php +++ b/views/default/basic_elements/welcome.php @@ -1,18 +1,15 @@

diff --git a/views/default/canvas/default.php b/views/default/canvas/default.php index a5c30fe52..0cfa8b49a 100644 --- a/views/default/canvas/default.php +++ b/views/default/canvas/default.php @@ -1,21 +1,15 @@ \ No newline at end of file +} \ No newline at end of file diff --git a/views/default/canvas/layouts/edit_layout.php b/views/default/canvas/layouts/edit_layout.php index b43ff4255..0d2997965 100644 --- a/views/default/canvas/layouts/edit_layout.php +++ b/views/default/canvas/layouts/edit_layout.php @@ -1,16 +1,12 @@
diff --git a/views/default/canvas/layouts/one_column.php b/views/default/canvas/layouts/one_column.php index bb5681f4c..c71c2def6 100644 --- a/views/default/canvas/layouts/one_column.php +++ b/views/default/canvas/layouts/one_column.php @@ -1,14 +1,12 @@ @@ -16,4 +14,4 @@ -
\ No newline at end of file + \ No newline at end of file diff --git a/views/default/canvas/layouts/sidebar_boxes.php b/views/default/canvas/layouts/sidebar_boxes.php index f6ae93a2c..d639901c0 100644 --- a/views/default/canvas/layouts/sidebar_boxes.php +++ b/views/default/canvas/layouts/sidebar_boxes.php @@ -1,23 +1,19 @@
- - + +
diff --git a/views/default/canvas/layouts/two_column_left_sidebar.php b/views/default/canvas/layouts/two_column_left_sidebar.php index 4be8939bb..40eb77b1a 100644 --- a/views/default/canvas/layouts/two_column_left_sidebar.php +++ b/views/default/canvas/layouts/two_column_left_sidebar.php @@ -1,25 +1,23 @@
- $vars['area1'])); - echo elgg_view('page_elements/owner_block',array('content' => $vars['area1'])); - - ?> + ?> - +
diff --git a/views/default/canvas/layouts/two_column_right_sidebar.php b/views/default/canvas/layouts/two_column_right_sidebar.php index ab38e6529..feaa993b5 100644 --- a/views/default/canvas/layouts/two_column_right_sidebar.php +++ b/views/default/canvas/layouts/two_column_right_sidebar.php @@ -1,22 +1,20 @@
$vars['area1'])); - if (isset($vars['area2'])) echo $vars['area2']; ?> +echo elgg_view('page_elements/owner_block',array('content' => $vars['area1'])); +if (isset($vars['area2'])) echo $vars['area2']; ?>
@@ -25,5 +23,4 @@ - - + \ No newline at end of file diff --git a/views/default/canvas/layouts/widgets.php b/views/default/canvas/layouts/widgets.php index 04df22bf9..f6c9dec79 100644 --- a/views/default/canvas/layouts/widgets.php +++ b/views/default/canvas/layouts/widgets.php @@ -1,32 +1,33 @@ 0 && $owner && $owner->canEdit()) { +/** + * Elgg widget layout + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ + +$widgettypes = get_widget_types(); + +$owner = page_owner_entity(); + +$area1widgets = get_widgets(page_owner(),get_context(),1); +$area2widgets = get_widgets(page_owner(),get_context(),2); +$area3widgets = get_widgets(page_owner(),get_context(),3); + +if (empty($area1widgets) && empty($area2widgets) && empty($area3widgets)) { + if (isset($vars['area3'])) { + $vars['area1'] = $vars['area3']; + } + if (isset($vars['area4'])) { + $vars['area2'] = $vars['area4']; + } +} + +if (is_array($widgettypes) && sizeof($widgettypes) > 0 && $owner && $owner->canEdit()) { - ?>
@@ -37,9 +38,7 @@ $widget) { - ?>
Message: message; ?>
Result:
result); ?>
PAM:
pam); ?>
Runtime:
runtime_errors); ?>
"; - - //echo "

" . $user->name . "

"; - $label = elgg_view("profile/icon",array('entity' => $friend, 'size' => 'tiny', 'override' => true)); - $options[$label] = $friend->getGUID(); - - if ($vars['highlight'] == 'all' - && !in_array($letter,$activeletters)) { - $activeletters[] = $letter; - } - - - if (in_array($friend->getGUID(),$vars['value'])) { - $checked = "checked = \"checked\""; - if ( - !in_array($letter,$activeletters) - && $vars['highlight'] == 'default' - ) - $activeletters[] = $letter; - } else { - $checked = ""; - } +// Initialise letters + $chararray .= "*"; + if (is_callable('mb_substr')) { + $letter = mb_substr($chararray,0,1); + } else { + $letter = substr($chararray,0,1); + } + $letpos = 0; + while (1 == 1) { + ?> +
+
+

+ "; + $col = 0; + + foreach($users[$letter] as $friend) { + if ($col == 0) { + echo "
"; + } -?> + //echo "

" . $user->name . "

"; + $label = elgg_view("profile/icon",array('entity' => $friend, 'size' => 'tiny', 'override' => true)); + $options[$label] = $friend->getGUID(); - + if ($vars['highlight'] == 'all' + && !in_array($letter,$activeletters)) { - - -"; - $col = 0; + if (in_array($friend->getGUID(),$vars['value'])) { + $checked = "checked = \"checked\""; + if (!in_array($letter,$activeletters) && $vars['highlight'] == 'default') { + $activeletters[] = $letter; } + } else { + $checked = ""; } - if ($col < 3) echo ""; - - echo "
@@ -77,24 +76,23 @@
- - - - - + + + - - - - + + + + +
- - -

-
-

-
- - -
+
+ + +

+
+

+
+ + +

> handler}::{$widget->getGUID()}"; ?> - +

handler]->name; ?> - @@ -124,19 +122,19 @@

- + - +
-

@@ -155,8 +153,8 @@

handler]->name; ?> - @@ -171,7 +169,7 @@

@@ -196,8 +194,8 @@

handler]->name; ?> - @@ -212,7 +210,7 @@

@@ -244,20 +242,20 @@ - - + - - - + + + + + -
+
- + guid == page_owner()){ ?> @@ -269,54 +267,52 @@
0) foreach($area3widgets as $widget) { echo elgg_view_entity($widget); } ?> - -
-
- +
- + 0) foreach($area1widgets as $widget) { echo elgg_view_entity($widget); } ?> - +
- +
- +
- + 0) foreach($area2widgets as $widget) { echo elgg_view_entity($widget); } - + ?> - +
- +
- - +
\ No newline at end of file diff --git a/views/default/canvas_header/submenu_group.php b/views/default/canvas_header/submenu_group.php index a5995b240..2ec9ab451 100644 --- a/views/default/canvas_header/submenu_group.php +++ b/views/default/canvas_header/submenu_group.php @@ -1,15 +1,19 @@ " . $vars['submenu'] . ""; - echo "
{$submenu}
"; - - } - -?> \ No newline at end of file +if (isset($vars['submenu'])) { + $submenu = "
    " . $vars['submenu'] . "
"; + echo "
{$submenu}
"; +} \ No newline at end of file diff --git a/views/default/canvas_header/submenu_template.php b/views/default/canvas_header/submenu_template.php index 143b0311e..0210e865f 100644 --- a/views/default/canvas_header/submenu_template.php +++ b/views/default/canvas_header/submenu_template.php @@ -1,16 +1,24 @@
  • >>
  • \ No newline at end of file diff --git a/views/default/comments/forms/edit.php b/views/default/comments/forms/edit.php index b629fc3f0..3116bd3da 100644 --- a/views/default/comments/forms/edit.php +++ b/views/default/comments/forms/edit.php @@ -1,25 +1,19 @@ + * @link http://elgg.com/ + * + * @uses $vars['entity'] + */ - /** - * Elgg comments add form - * - * @package Elgg +if (isset($vars['entity']) && isloggedin()) { + $form_body = "

    "; + $form_body .= "

    " . elgg_view('input/hidden', array('internalname' => 'entity_guid', 'value' => $vars['entity']->getGUID())); + $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save"))) . "

    "; - * @author Curverider Ltd + echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/comments/add")); - * @link http://elgg.com/ - * - * @uses $vars['entity'] - */ - - if (isset($vars['entity']) && isloggedin()) { - - $form_body = "

    "; - $form_body .= "

    " . elgg_view('input/hidden', array('internalname' => 'entity_guid', 'value' => $vars['entity']->getGUID())); - $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save"))) . "

    "; - - echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/comments/add")); - - } - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/views/default/dashboard/blurb.php b/views/default/dashboard/blurb.php index 1bde24736..4b71e70e1 100644 --- a/views/default/dashboard/blurb.php +++ b/views/default/dashboard/blurb.php @@ -1,3 +1,15 @@ + + * @link http://elgg.com/ + * + * @uses $vars['entity'] + */ +?> +

    guid); - $annotations = get_annotations($entity->guid); - $relationships = get_entity_relationships($entity->guid); - - $exportable_values = $entity->getExportableValues(); +$entity = $vars['entity']; +if (!$entity) { + throw new InvalidParameterException(elgg_echo('InvalidParameterException:NoEntityFound')); +} + +$metadata = get_metadata_for_entity($entity->guid); +$annotations = get_annotations($entity->guid); +$relationships = get_entity_relationships($entity->guid); + +$exportable_values = $entity->getExportableValues(); ?>

    @@ -36,7 +38,7 @@
    -

    +

    - +
    -

    +

    -

    +

    entity_guid); +$m = $vars['metadata']; +$e = get_entity($m->entity_guid); ?>

    getURL() . "\">GUID:{$m->entity_guid}"; else echo "GUID:".$m->entity_guid; diff --git a/views/default/export/relationship.php b/views/default/export/relationship.php index a91d38115..ec6a94bd4 100644 --- a/views/default/export/relationship.php +++ b/views/default/export/relationship.php @@ -1,20 +1,19 @@ guid_one); - $e2 = get_entity($r->guid_two); +$r = $vars['relationship']; + +$e1 = get_entity($r->guid_one); +$e2 = get_entity($r->guid_two); - ?>

    members)) { + $count = sizeof($vars['collection']->members); +} else { + $count = 0; +} + +echo "

  • "; + +//as collections are private, check that the logged in user is the owner +if($coll->owner_guid == $_SESSION['user']->getGUID()) { + echo "
    "; + echo elgg_view('output/confirmlink', array( + 'href' => $vars['url'] . 'action/friends/deletecollection?collection=' . $coll->id, + 'class' => 'delete_collection' + )); + echo "
    "; +} +echo $coll->name; +echo " ({$count})

    "; + +// individual collection panels +if($friends = $vars['collection']->entities) { + $content = elgg_view('friends/collectiontabs', array('owner' => $_SESSION['user'], 'collection' => $vars['collection'], 'friendspicker' => $vars['friendspicker'])); + + echo elgg_view('friends/picker',array('entities' => $friends, 'value' => $members, 'content' => $content, 'replacement' => '', 'friendspicker' => $vars['friendspicker'])); + ?> + + - "; - -?> \ No newline at end of file + + "; diff --git a/views/default/friends/collections.php b/views/default/friends/collections.php index c785cd68e..a013dc1da 100644 --- a/views/default/friends/collections.php +++ b/views/default/friends/collections.php @@ -1,53 +1,45 @@ "; + +if (is_array($vars['collections']) && sizeof($vars['collections'])) { + echo "
      "; + + foreach($vars['collections'] as $collection) { + $friendspicker++; + echo elgg_view('friends/collection',array('collection' => $collection, 'friendspicker' => $friendspicker)); + } + + echo "
    "; + +} else { + echo elgg_echo("friends:nocollections"); +} + +echo "
  • "; - /** - * Elgg friends collections - * Lists a user's friends collections - * - * @package Elgg - * @subpackage Core - - * @author Curverider Ltd - - * @link http://elgg.org/ - * - * @uses $vars['collections'] The array of friends collections - */ - - if (!isset($friendspicker)) $friendspicker = 0; - - echo "
    "; - - if (is_array($vars['collections']) && sizeof($vars['collections'])) { - - echo "
      "; - - foreach($vars['collections'] as $collection) { - - $friendspicker++; - echo elgg_view('friends/collection',array('collection' => $collection, 'friendspicker' => $friendspicker)); - - } - - echo "
    "; - - } else { - - echo elgg_echo("friends:nocollections"); - - } - - echo "
    "; - ?> \ No newline at end of file + diff --git a/views/default/friends/collectiontabs.php b/views/default/friends/collectiontabs.php index a4ad59866..8f3c684a8 100644 --- a/views/default/friends/collectiontabs.php +++ b/views/default/friends/collectiontabs.php @@ -1,10 +1,21 @@ id; +$ownerid = $vars['owner']->getGUID(); - $friendspicker = $vars['friendspicker']; - - $collectionid = $vars['collection']->id; - $ownerid = $vars['owner']->getGUID(); - ?>
    @@ -22,14 +33,14 @@ $(document).ready(function () { $('a.collectionmembers').click(function () { // load collection members pane $('#friends_picker_placeholder').load('friends/pickercallback.php?username=username; ?>&type=list&collection=&friendspicker='); - + // remove selected state from previous tab $(this).parent().parent().find("li.selected").removeClass("selected"); // add selected class to current tab $(this).parent().addClass("selected"); - + return false; - }); + }); $('a.editmembers').click(function () { // load friends picker pane @@ -39,9 +50,9 @@ $(document).ready(function () { $(this).parent().parent().find("li.selected").removeClass("selected"); // add selected class to current tab $(this).parent().addClass("selected"); - + return false; - }); + }); }); diff --git a/views/default/friends/forms/collectionfields.php b/views/default/friends/forms/collectionfields.php index bec7212ee..f9d8ac5ff 100644 --- a/views/default/friends/forms/collectionfields.php +++ b/views/default/friends/forms/collectionfields.php @@ -1,23 +1,17 @@ - + \ No newline at end of file +} \ No newline at end of file diff --git a/views/default/friends/forms/edit.php b/views/default/friends/forms/edit.php index c35bcaba3..5751950d8 100644 --- a/views/default/friends/forms/edit.php +++ b/views/default/friends/forms/edit.php @@ -1,59 +1,55 @@ id); - - // Set title, form destination - if (isset($vars['collection'])) { - $action = "friends/editcollection"; - $title = $vars['collection'][0]->name; - $highlight = 'default'; - } else { - $action = "friends/addcollection"; - $title = ""; - $highlight = 'all'; - } - - - $form_body = "

    "; - - $form_body .= "

    "; - - if($vars['collection_members']){ - $form_body .= elgg_echo("friends:collectionfriends") . "
    "; - foreach($vars['collection_members'] as $mem){ - - $form_body .= elgg_view("profile/icon",array('entity' => $mem, 'size' => 'tiny')); - $form_body .= $mem->name; - - } - } - - $form_body .= "

    "; - - $form_body .= "

    ". - elgg_view('friends/picker',array('entities' => $vars['friends'], 'internalname' => 'friends_collection', 'highlight' => $highlight)) . "

    "; - - $form_body .= "

    "; - if (isset($vars['collection'])) { - $form_body .= elgg_view('input/hidden', array('internalname' => 'collection_id', 'value' => "{$vars['collection'][0]->id}")); - } - $form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save'))); - $form_body .= "

    "; - - echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/$action")); -?> \ No newline at end of file +// var_export($vars['collection'][0]->id); + +// Set title, form destination +if (isset($vars['collection'])) { + $action = "friends/editcollection"; + $title = $vars['collection'][0]->name; + $highlight = 'default'; +} else { + $action = "friends/addcollection"; + $title = ""; + $highlight = 'all'; +} + + +$form_body = "

    "; + +$form_body .= "

    "; + +if($vars['collection_members']){ + $form_body .= elgg_echo("friends:collectionfriends") . "
    "; + foreach($vars['collection_members'] as $mem){ + $form_body .= elgg_view("profile/icon",array('entity' => $mem, 'size' => 'tiny')); + $form_body .= $mem->name; + } +} + +$form_body .= "

    "; + +$form_body .= "

    ". + elgg_view('friends/picker',array('entities' => $vars['friends'], 'internalname' => 'friends_collection', 'highlight' => $highlight)) . "

    "; + +$form_body .= "

    "; +if (isset($vars['collection'])) { + $form_body .= elgg_view('input/hidden', array('internalname' => 'collection_id', 'value' => "{$vars['collection'][0]->id}")); +} +$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save'))); +$form_body .= "

    "; + +echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/$action")); \ No newline at end of file diff --git a/views/default/friends/list.php b/views/default/friends/list.php index 3907479bd..7bc42a015 100644 --- a/views/default/friends/list.php +++ b/views/default/friends/list.php @@ -1,27 +1,18 @@ 0) { - - foreach($vars['friends'] as $friend) { - - echo elgg_view_entity($friend); - - } - - } - -?> \ No newline at end of file +if (is_array($vars['friends']) && sizeof($vars['friends']) > 0) { + foreach($vars['friends'] as $friend) { + echo elgg_view_entity($friend); + } +} \ No newline at end of file diff --git a/views/default/friends/picker.php b/views/default/friends/picker.php index 319088601..1ac8b23af 100644 --- a/views/default/friends/picker.php +++ b/views/default/friends/picker.php @@ -1,115 +1,110 @@ name,0,1)); } else { - $internalname = $vars['internalname']; - } - - // Are we highlighting default or all? - if (empty($vars['highlight'])) $vars['highlight'] = 'default'; - if ($vars['highlight'] != 'all') $vars['highlight'] = 'default'; - - // Initialise values - if (!isset($vars['value'])) { - $vars['value'] = array(); - } else { - if (!is_array($vars['value'])) { - $vars['value'] = (int) $vars['value']; - $vars['value'] = array($vars['value']); - } + $letter = strtoupper(substr($user->name,0,1)); } - // Initialise whether we're calling back or not - if (isset($vars['callback'])) { - $callback = $vars['callback']; - } else { - $callback = false; + if (!substr_count($chararray,$letter)) { + $letter = "*"; } - - // We need to count the number of friends pickers on the page. - if (!isset($vars['friendspicker'])) { - global $friendspicker; - if (!isset($friendspicker)) $friendspicker = 0; - $friendspicker++; - } else { - $friendspicker = $vars['friendspicker']; + if (!isset($users[$letter])) { + $users[$letter] = array(); } + $users[$letter][$user->name] = $user; + } +} - $users = array(); - $activeletters = array(); - - // Are we displaying form tags and submit buttons? - // (If we've been given a target, then yes! Otherwise, no.) - if (isset($vars['formtarget'])) { - $formtarget = $vars['formtarget']; - } else { - $formtarget = false; - } - - // Sort users by letter - if (is_array($vars['entities']) && sizeof($vars['entities'])) - foreach($vars['entities'] as $user) { - - if (is_callable('mb_substr')) - $letter = strtoupper(mb_substr($user->name,0,1)); - else - $letter = strtoupper(substr($user->name,0,1)); - if (!substr_count($chararray,$letter)) { - $letter = "*"; - } - if (!isset($users[$letter])) { - $users[$letter] = array(); - } - $users[$letter][$user->name] = $user; - - } - - if (!$callback) { - -?> - -
    +if (!$callback) { + ?> - - if (isset($vars['content'])) echo $vars['content']; + + if (isset($vars['content'])) { + echo $vars['content']; + } + ?>
    - - - -
    + + -
    -
    -
    +
    +
    +
    -
    -
    -

    - -"; - $col = 0; - - foreach($users[$letter] as $friend) { - if ($col == 0) echo "
    - - name="[]" value="" /> - - - -
    - -
    -
    -name; - -?> -
    "; - + ?> + + + + name="[]" value="" /> + + + + + +
    + +
    + + + name; ?> + + "; + $col = 0; + } + } + if ($col < 3) { + echo ""; } + echo ""; + } + ?> - -
    +
    - + - - + + -
    -
    - - -
    - - +
    +
    + + +
    + + - - - - + + + + - - + + \ No newline at end of file +} \ No newline at end of file diff --git a/views/default/friends/river/create.php b/views/default/friends/river/create.php index 04947568b..e577ba721 100644 --- a/views/default/friends/river/create.php +++ b/views/default/friends/river/create.php @@ -1,19 +1,23 @@ + * @link http://elgg.com/ + * + * @uses $vars['entity'] + */ +$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject(); +$performed_on = get_entity($vars['item']->object_guid); +$url = $performed_on->getURL(); - $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject(); - $performed_on = get_entity($vars['item']->object_guid); - $url = $performed_on->getURL(); +$url = "getURL()}\">{$performed_by->name}"; +$string = sprintf(elgg_echo("friends:river:add"),$url) . " "; +$string .= "getURL()}\">{$performed_on->name}"; +$string .= "
    "; +$string .= ""; +$string .= "
    " . elgg_view("profile/icon",array('entity' => $performed_by, 'size' => 'small')) . "
    " . elgg_view("profile/icon",array('entity' => $performed_on, 'size' => 'small')) . "
    "; +$string .= "
    "; - $url = "getURL()}\">{$performed_by->name}"; - $string = sprintf(elgg_echo("friends:river:add"),$url) . " "; - $string .= "getURL()}\">{$performed_on->name}"; - $string .= "
    "; - $string .= ""; - $string .= "
    " . elgg_view("profile/icon",array('entity' => $performed_by, 'size' => 'small')) . "
    " . elgg_view("profile/icon",array('entity' => $performed_on, 'size' => 'small')) . "
    "; - $string .= "
    "; - -?> - - \ No newline at end of file +echo $string; \ No newline at end of file -- cgit v1.2.3