Debug v14
This commit is contained in:
parent
92b6425ce0
commit
a1bb7129da
@ -449,6 +449,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print $formconfirm;
|
print $formconfirm;
|
||||||
|
|
||||||
|
|
||||||
|
// TODO Replace this card into a list of all partnerships.
|
||||||
|
|
||||||
|
|
||||||
// Object card
|
// Object card
|
||||||
// ------------------------------------------------------------
|
// ------------------------------------------------------------
|
||||||
$linkback = '<a href="'.dol_buildpath('/partnership/partnership_list.php', 1).'?restore_lastsearch_values=1'.(!empty($memberid) ? '&rowid='.$memberid : '').'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.dol_buildpath('/partnership/partnership_list.php', 1).'?restore_lastsearch_values=1'.(!empty($memberid) ? '&rowid='.$memberid : '').'">'.$langs->trans("BackToList").'</a>';
|
||||||
@ -498,6 +501,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
|
|
||||||
print dol_get_fiche_end();
|
print dol_get_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Buttons for actions
|
// Buttons for actions
|
||||||
|
|
||||||
if ($action != 'presend') {
|
if ($action != 'presend') {
|
||||||
@ -509,10 +515,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
if ($object->status == $object::STATUS_DRAFT) {
|
|
||||||
print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?rowid='.$memberid.'&action=edit&token='.newToken(), '', $permissiontoadd);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Show
|
// Show
|
||||||
if ($permissiontoadd) {
|
if ($permissiontoadd) {
|
||||||
print dolGetButtonAction($langs->trans('ManagePartnership'), '', 'default', dol_buildpath('/partnership/partnership_card.php', 1).'?id='.$object->id, '', $permissiontoadd);
|
print dolGetButtonAction($langs->trans('ManagePartnership'), '', 'default', dol_buildpath('/partnership/partnership_card.php', 1).'?id='.$object->id, '', $permissiontoadd);
|
||||||
|
|||||||
@ -63,6 +63,33 @@ function member_prepare_head(Adherent $object)
|
|||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$tabtoadd = (!empty(getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR')) && getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') == 'member') ? 'member' : 'thirdparty';
|
||||||
|
|
||||||
|
if ($tabtoadd == 'member') {
|
||||||
|
if (!empty($user->rights->partnership->read)) {
|
||||||
|
$nbPartnership = is_array($object->partnerships) ? count($object->partnerships) : 0;
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/adherents/partnership.php?rowid='.$object->id;
|
||||||
|
$head[$h][1] = $langs->trans("Partnership");
|
||||||
|
$head[$h][2] = 'partnership';
|
||||||
|
if ($nbPartnership > 0) {
|
||||||
|
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbPartnership.'</span>';
|
||||||
|
}
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!empty($user->rights->partnership->read)) {
|
||||||
|
$nbPartnership = is_array($object->partnerships) ? count($object->partnerships) : 0;
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/societe/partnership.php?socid='.$object->id;
|
||||||
|
$head[$h][1] = $langs->trans("Partnership");
|
||||||
|
$head[$h][2] = 'partnership';
|
||||||
|
if ($nbPartnership > 0) {
|
||||||
|
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbPartnership.'</span>';
|
||||||
|
}
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Show more tabs from modules
|
// Show more tabs from modules
|
||||||
// Entries must be declared in modules descriptor with line
|
// Entries must be declared in modules descriptor with line
|
||||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
@ -70,9 +97,6 @@ function member_prepare_head(Adherent $object)
|
|||||||
complete_head_from_modules($conf, $langs, $object, $head, $h, 'member');
|
complete_head_from_modules($conf, $langs, $object, $head, $h, 'member');
|
||||||
|
|
||||||
$nbNote = 0;
|
$nbNote = 0;
|
||||||
if (!empty($object->note)) {
|
|
||||||
$nbNote++;
|
|
||||||
}
|
|
||||||
if (!empty($object->note_private)) {
|
if (!empty($object->note_private)) {
|
||||||
$nbNote++;
|
$nbNote++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -180,10 +180,8 @@ class modPartnership extends DolibarrModules
|
|||||||
$tabtoadd = (!empty(getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR')) && getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') == 'member') ? 'member' : 'thirdparty';
|
$tabtoadd = (!empty(getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR')) && getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') == 'member') ? 'member' : 'thirdparty';
|
||||||
|
|
||||||
if ($tabtoadd == 'member') {
|
if ($tabtoadd == 'member') {
|
||||||
$this->tabs[] = array('data'=>'member:+partnership:Partnership:partnership@partnership:$user->rights->partnership->read:/adherents/partnership.php?rowid=__ID__');
|
|
||||||
$fk_mainmenu = "members";
|
$fk_mainmenu = "members";
|
||||||
} else {
|
} else {
|
||||||
$this->tabs[] = array('data'=>'thirdparty:+partnership:Partnership:partnership@partnership:$user->rights->partnership->read:/societe/partnership.php?socid=__ID__');
|
|
||||||
$fk_mainmenu = "companies";
|
$fk_mainmenu = "companies";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,7 +256,7 @@ class modPartnership extends DolibarrModules
|
|||||||
|
|
||||||
$this->cronjobs = array(
|
$this->cronjobs = array(
|
||||||
0 => array('priority'=>60, 'label'=>'CancelPartnershipForExpiredMembers', 'jobtype'=>'method', 'class'=>'/partnership/class/partnershiputils.class.php', 'objectname'=>'PartnershipUtils', 'method'=>'doCancelStatusOfMemberPartnership', 'parameters'=>'', 'comment'=>'Cancel status of partnership when subscription is expired + x days.', 'frequency'=>1, 'unitfrequency'=>86400, 'status'=>1, 'test'=>'$conf->partnership->enabled', 'datestart'=>$datestart),
|
0 => array('priority'=>60, 'label'=>'CancelPartnershipForExpiredMembers', 'jobtype'=>'method', 'class'=>'/partnership/class/partnershiputils.class.php', 'objectname'=>'PartnershipUtils', 'method'=>'doCancelStatusOfMemberPartnership', 'parameters'=>'', 'comment'=>'Cancel status of partnership when subscription is expired + x days.', 'frequency'=>1, 'unitfrequency'=>86400, 'status'=>1, 'test'=>'$conf->partnership->enabled', 'datestart'=>$datestart),
|
||||||
1 => array('priority'=>61, 'label'=>'CheckDolibarrBacklink', 'jobtype'=>'method', 'class'=>'/partnership/class/partnershiputils.class.php', 'objectname'=>'PartnershipUtils', 'method'=>'doWarningOfPartnershipIfDolibarrBacklinkNotfound', 'parameters'=>'', 'comment'=>'Warning of partnership if Dolibarr backlink not found on partner website.', 'frequency'=>1, 'unitfrequency'=>86400, 'status'=>0, 'test'=>'$conf->partnership->enabled', 'datestart'=>$datestart),
|
1 => array('priority'=>61, 'label'=>'PartnershipCheckBacklink', 'jobtype'=>'method', 'class'=>'/partnership/class/partnershiputils.class.php', 'objectname'=>'PartnershipUtils', 'method'=>'doWarningOfPartnershipIfDolibarrBacklinkNotfound', 'parameters'=>'', 'comment'=>'Warning of partnership if Dolibarr backlink not found on partner website.', 'frequency'=>1, 'unitfrequency'=>86400, 'status'=>0, 'test'=>'$conf->partnership->enabled', 'datestart'=>$datestart),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Permissions provided by this module
|
// Permissions provided by this module
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2012 Nicolas Villa aka Boyquotes http://informetic.fr
|
/* Copyright (C) 2012 Nicolas Villa aka Boyquotes http://informetic.fr
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2013-2021 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -24,7 +24,6 @@
|
|||||||
* \brief Lists Jobs
|
* \brief Lists Jobs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php';
|
||||||
|
|||||||
@ -20,6 +20,9 @@ ModulePartnershipName=Partnership management
|
|||||||
PartnershipDescription=Module Partnership management
|
PartnershipDescription=Module Partnership management
|
||||||
PartnershipDescriptionLong= Module Partnership management
|
PartnershipDescriptionLong= Module Partnership management
|
||||||
|
|
||||||
|
CancelPartnershipForExpiredMembers=Partnership: Cancel partnership of members with expired subscriptions
|
||||||
|
PartnershipCheckBacklink=Partnership: Check referring backlink
|
||||||
|
|
||||||
#
|
#
|
||||||
# Menu
|
# Menu
|
||||||
#
|
#
|
||||||
|
|||||||
@ -193,11 +193,10 @@ print '</tr>';
|
|||||||
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("PARTNERSHIP_BACKLINKS_TO_CHECK").'</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("PARTNERSHIP_BACKLINKS_TO_CHECK").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$dbacklinks = 'dolibarr.org|dolibarr.fr|dolibarr.es';
|
$backlinks = (empty($conf->global->PARTNERSHIP_BACKLINKS_TO_CHECK) ? '' : $conf->global->PARTNERSHIP_BACKLINKS_TO_CHECK);
|
||||||
$backlinks = (!empty($conf->global->PARTNERSHIP_BACKLINKS_TO_CHECK)) ? $conf->global->PARTNERSHIP_BACKLINKS_TO_CHECK : $dbacklinks;
|
|
||||||
print '<input class="minwidth400" type="text" name="PARTNERSHIP_BACKLINKS_TO_CHECK" value="'.$backlinks.'">';
|
print '<input class="minwidth400" type="text" name="PARTNERSHIP_BACKLINKS_TO_CHECK" value="'.$backlinks.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td><span class="opacitymedium">'.$dbacklinks.'</span></td>';
|
print '<td><span class="opacitymedium">dolibarr.org|dolibarr.fr|dolibarr.es</span></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user