aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/profile/views')
-rw-r--r--mod/profile/views/default/profile/hoverover.php23
-rw-r--r--mod/profile/views/default/profile/hoverover/actions.php25
-rw-r--r--mod/profile/views/default/profile/hoverover/links.php25
3 files changed, 53 insertions, 20 deletions
diff --git a/mod/profile/views/default/profile/hoverover.php b/mod/profile/views/default/profile/hoverover.php
index ed02f1872..73f94a8f3 100644
--- a/mod/profile/views/default/profile/hoverover.php
+++ b/mod/profile/views/default/profile/hoverover.php
@@ -20,24 +20,7 @@
<?php
- if (isloggedin()) {
- if ($_SESSION['user']->getGUID() != $vars['entity']->getGUID()) {
- if ($vars['entity']->isFriend()) {
- echo "<p class=\"user_menu_removefriend\"><a href=\"{$vars['url']}action/friends/remove?friend={$vars['entity']->getGUID()}\">" . elgg_echo("friend:remove") . "</a></p>";
- } else {
- echo "<p><a href=\"{$vars['url']}action/friends/add?friend={$vars['entity']->getGUID()}\">" . elgg_echo("friend:add") . "</a></p>";
- }
- }
- }
+ echo elgg_view("profile/hoverover/actions",$vars);
+ echo elgg_view("profile/hoverover/links",$vars);
-?>
-
- <p class="user_menu_profile">
- <a href="<?php echo $vars['entity']->getURL(); ?>"><?php echo elgg_echo("profile"); ?></a>
- </p>
- <p class="user_menu_friends">
- <a href="<?php echo $vars['url']; ?>pg/friends/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends"); ?></a>
- </p>
- <p class="user_menu_friends_of">
- <a href="<?php echo $vars['url']; ?>pg/friendsof/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends:of"); ?></a>
- </p> \ No newline at end of file
+?> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/hoverover/actions.php b/mod/profile/views/default/profile/hoverover/actions.php
new file mode 100644
index 000000000..f69ad1316
--- /dev/null
+++ b/mod/profile/views/default/profile/hoverover/actions.php
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Elgg profile icon hover over: actions
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Ben Werdmuller <ben@curverider.co.uk>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
+ */
+
+ if (isloggedin()) {
+ if ($_SESSION['user']->getGUID() != $vars['entity']->getGUID()) {
+ if ($vars['entity']->isFriend()) {
+ echo "<p class=\"user_menu_removefriend\"><a href=\"{$vars['url']}action/friends/remove?friend={$vars['entity']->getGUID()}\">" . elgg_echo("friend:remove") . "</a></p>";
+ } else {
+ echo "<p><a href=\"{$vars['url']}action/friends/add?friend={$vars['entity']->getGUID()}\">" . elgg_echo("friend:add") . "</a></p>";
+ }
+ }
+ }
+
+?> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/hoverover/links.php b/mod/profile/views/default/profile/hoverover/links.php
new file mode 100644
index 000000000..c60de7456
--- /dev/null
+++ b/mod/profile/views/default/profile/hoverover/links.php
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Elgg profile icon hover over: passive links
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Ben Werdmuller <ben@curverider.co.uk>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
+ */
+
+?>
+
+ <p class="user_menu_profile">
+ <a href="<?php echo $vars['entity']->getURL(); ?>"><?php echo elgg_echo("profile"); ?></a>
+ </p>
+ <p class="user_menu_friends">
+ <a href="<?php echo $vars['url']; ?>pg/friends/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends"); ?></a>
+ </p>
+ <p class="user_menu_friends_of">
+ <a href="<?php echo $vars['url']; ?>pg/friendsof/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends:of"); ?></a>
+ </p> \ No newline at end of file