aboutsummaryrefslogtreecommitdiff
path: root/mod/profile
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-19 13:36:23 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-19 13:36:23 +0000
commit5be5ad742df140a9efe170465eadefaa0a0137bf (patch)
tree4cb8b9500a7b7a351dd3c159737b8a843c5770b3 /mod/profile
parent3a7d48dd0e0ae27c373650146b011749029b7af6 (diff)
downloadelgg-5be5ad742df140a9efe170465eadefaa0a0137bf.tar.gz
elgg-5be5ad742df140a9efe170465eadefaa0a0137bf.tar.bz2
Sorting hoverover links into actions and plain links
git-svn-id: https://code.elgg.org/elgg/trunk@996 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile')
-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