aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-01 16:55:17 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-01 16:55:17 +0000
commit18d930d4e2c7149e74df65b40a42a7d602b5dc54 (patch)
treecaecedbf18f5e022e7abee3045e567210c96489f /views
parentc5a46b76d68a6042b793549dcc0e3a9c5784d629 (diff)
downloadelgg-18d930d4e2c7149e74df65b40a42a7d602b5dc54.tar.gz
elgg-18d930d4e2c7149e74df65b40a42a7d602b5dc54.tar.bz2
Spotlight state persists.
git-svn-id: https://code.elgg.org/elgg/trunk@1658 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/default/page_elements/spotlight.php25
1 files changed, 23 insertions, 2 deletions
diff --git a/views/default/page_elements/spotlight.php b/views/default/page_elements/spotlight.php
index ea508bee3..446d5902c 100644
--- a/views/default/page_elements/spotlight.php
+++ b/views/default/page_elements/spotlight.php
@@ -19,10 +19,31 @@
<div class="collapsable_box no_space_after">
<div class="collapsable_box_header">
- <a href="javascript:void(0);" class="toggle_box_contents">-</a>
+<?php
+
+ $closed = false;
+ if ($_SESSION['user'] instanceof ElggUser) {
+ if ($_SESSION['user']->spotlightclosed) {
+
+ $closed = true;
+
+ }
+ }
+ if ($closed) {
+?>
+ <a href="javascript:void(0);" class="toggle_box_contents" onClick="$.post('<?php echo $vars['url']; ?>action/user/spotlight?closed=false')">+</a>
+<?php
+ } else {
+?>
+ <a href="javascript:void(0);" class="toggle_box_contents" onClick="$.post('<?php echo $vars['url']; ?>action/user/spotlight?closed=true')">-</a>
+<?php
+
+ }
+
+?>
<h1><?php echo elgg_echo("spotlight"); ?></h1>
</div>
- <div class="collapsable_box_content">
+ <div class="collapsable_box_content" <?php if ($closed) echo "style=\"display:none\"" ?>>
<?php
$context = get_context();