Skip to content

Commit

Permalink
Fix: [ bug #1360 ] note indicator for member tab.
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed May 6, 2014
1 parent 3abede6 commit fe43d10
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -19,6 +19,7 @@ Fix: Navigation on notes for shipments was not working.
Fix: [ bug #1353 ] Email notifications, wrong URL.
Fix: [ bug #1362 ] Note is not saved.
Fix: tr/td balance.
Fix: [ bug #1360 ] note indicator for member tab.

***** ChangeLog for 3.5.2 compared to 3.5.1 *****
Fix: Can't add user for a task.
Expand Down
4 changes: 2 additions & 2 deletions htdocs/adherents/note.php
@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -19,7 +19,7 @@
/**
* \file htdocs/adherents/note.php
* \ingroup member
* \brief Fiche de notes sur un adherent
* \brief Tabe for note of a member
*/

require '../main.inc.php';
Expand Down
7 changes: 6 additions & 1 deletion htdocs/core/lib/member.lib.php
Expand Up @@ -81,9 +81,14 @@ function member_prepare_head($object)
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
complete_head_from_modules($conf,$langs,$object,$head,$h,'member');

$nbNote = 0;
if(!empty($object->note)) $nbNote++;
if(!empty($object->note_private)) $nbNote++;
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/adherents/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Note");
$head[$h][2] = 'note';
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
$h++;

$head[$h][0] = DOL_URL_ROOT.'/adherents/document.php?id='.$object->id;
Expand Down Expand Up @@ -130,7 +135,7 @@ function member_admin_prepare_head()
$head[$h][1] = $langs->trans("ExtraFieldsMember");
$head[$h][2] = 'attributes';
$h++;

$head[$h][0] = DOL_URL_ROOT.'/adherents/admin/adherent_type_extrafields.php';
$head[$h][1] = $langs->trans("ExtraFieldsMemberType");
$head[$h][2] = 'attributes_type';
Expand Down

0 comments on commit fe43d10

Please sign in to comment.