From: x2003bruneau Date: Wed, 12 Jul 2006 08:18:30 +0000 (+0000) Subject: Easier way to switch between subscribed newsgroups X-Git-Tag: 1.8~215 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=4f75645f09e19699a0d4554b966378233b5b3c89;p=banana.git Easier way to switch between subscribed newsgroups git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@80 9869982d-c50d-0410-be91-f2a2ec7c7c7b --- diff --git a/Changelog b/Changelog index ccc5403..d33bb9c 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,6 @@ +Wed, 12 Jul 2006 Florent Bruneau + * Add the list of subscriptions after the spool + Tue, 11 Jul 2006 Florent Bruneau * Bugfix: body conversion from unknown charset diff --git a/banana/banana.inc.php.in b/banana/banana.inc.php.in index b1ec2b2..f67c746 100644 --- a/banana/banana.inc.php.in +++ b/banana/banana.inc.php.in @@ -467,6 +467,9 @@ class Banana return false; } } + if (count($this->profile['subscribe']) > 0) { + $this->_newGroup(false); + } return true; } @@ -481,11 +484,11 @@ class Banana return true; } - function _newGroup() + function _newGroup($showNew = true) { $this->_require('groups'); $this->groups = new BananaGroups(BANANA_GROUP_SUB); - if ($this->groups->type == BANANA_GROUP_SUB) { + if ($showNew && $this->groups->type == BANANA_GROUP_SUB) { $this->newgroups = new BananaGroups(BANANA_GROUP_NEW); } } diff --git a/banana/post.inc.php b/banana/post.inc.php index 09c2a0a..e699e7f 100644 --- a/banana/post.inc.php +++ b/banana/post.inc.php @@ -428,10 +428,14 @@ class BananaPost $res .= ''; } - $res .= ''._b_('Apercu').''; + $res .= '' . _b_('Apercu de ') + . makeHREF(Array('group' => $banana->state['group']), + $banana->state['group']) + . ''; $ndx = $banana->spool->getndx($this->id); - $res .= ''.$banana->spool->to_html($ndx-$banana->tbefore, $ndx+$banana->tafter, $ndx).''; - + $res .= '' + . $banana->spool->to_html($ndx-$banana->tbefore, $ndx+$banana->tafter, $ndx) + . ''; return $res.''; } } diff --git a/banana/spool.inc.php b/banana/spool.inc.php index 0b121e9..f387ebf 100644 --- a/banana/spool.inc.php +++ b/banana/spool.inc.php @@ -403,6 +403,16 @@ class BananaSpool $res .= ''._b_('Aucun message dans ce forum').''; } + global $banana; + if (is_object($banana->groups)) { + $res .= '' + . $banana->groups->to_html() + . ''; + } + $res .= '' + . makeHREF(Array('subscribe' => 1), 'GĂ©rer mes abonnements') + . ''; + return $res .= ''; } diff --git a/css/style.css b/css/style.css index 50a0761..74e4592 100644 --- a/css/style.css +++ b/css/style.css @@ -38,6 +38,8 @@ table.banana_thread td.from { text-align: left; } table.banana_thread div.tree { float: left; padding-right: 0.3em; } table.banana_thread span.cur { font-style: italic; } +table.banana_thread table { border: 0px; padding: 0px; margin: 0px; width: 100%; } +table.banana_thread td.subs { padding: 0%; } /** MESSAGE VIEW **/