Work on look and feel v6
This commit is contained in:
parent
ed89852807
commit
4902df7e3f
@ -116,8 +116,8 @@ Notifications=Notifications
|
||||
NoNotificationsWillBeSent=No email notifications are planned for this event and company
|
||||
ANotificationsWillBeSent=1 notification will be sent by email
|
||||
SomeNotificationsWillBeSent=%s notifications will be sent by email
|
||||
AddNewNotification=Activate a new email notification target
|
||||
ListOfActiveNotifications=List all active targets for email notification
|
||||
AddNewNotification=Activate a new email notification target/event
|
||||
ListOfActiveNotifications=List all active targets/events for email notification
|
||||
ListOfNotificationsDone=List all email notifications sent
|
||||
MailSendSetupIs=Configuration of email sending has been setup to '%s'. This mode can't be used to send mass emailing.
|
||||
MailSendSetupIs2=You must first go, with an admin account, into menu %sHome - Setup - EMails%s to change parameter <strong>'%s'</strong> to use mode '%s'. With this mode, you can enter setup of the SMTP server provided by your Internet Service Provider and use Mass emailing feature.
|
||||
|
||||
@ -58,7 +58,7 @@ if ($page == -1) { $page = 0; }
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (! $sortfield) $sortfield='a.datep, a.id';
|
||||
if (! $sortfield) $sortfield='a.datep,a.id';
|
||||
if (! $sortorder) $sortorder='DESC';
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
@ -190,7 +190,7 @@ if ($socid > 0)
|
||||
$filters=array();
|
||||
$filters['search_agenda_label']=$search_agenda_label;
|
||||
|
||||
// TODO Replace this with smae code then into listactions.php
|
||||
// TODO Replace this with same code than into listactions.php
|
||||
show_actions_done($conf,$langs,$db,$object,null,0,$actioncode, '', $filters, $sortfield, $sortorder);
|
||||
}
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ $sortorder=GETPOST("sortorder",'alpha');
|
||||
$page=GETPOST("page",'int');
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
if (! $sortfield) $sortfield="s.nom";
|
||||
if (empty($page) || $page == -1) { $page = 0 ; }
|
||||
if (empty($page) || $page == -1) { $page = 0; }
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
@ -44,15 +44,16 @@ $actionid=GETPOST('actionid');
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'societe','','');
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
$page = GETPOST("page",'int');
|
||||
if ($page == -1) { $page = 0; }
|
||||
$offset = $conf->liste_limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
|
||||
$sortfield=GETPOST("sortfield",'alpha');
|
||||
$sortorder=GETPOST("sortorder",'alpha');
|
||||
$page=GETPOST("page",'int');
|
||||
if (! $sortorder) $sortorder="DESC";
|
||||
if (! $sortfield) $sortfield="n.daten";
|
||||
if (empty($page) || $page == -1) { $page = 0; }
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
@ -188,7 +189,7 @@ if ($result > 0)
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans("NbOfActiveNotifications").'</td>'; // Notification for this thirdparty
|
||||
/*print '<tr><td class="titlefield">'.$langs->trans("NbOfActiveNotifications").'</td>'; // Notification for this thirdparty
|
||||
print '<td colspan="3">';
|
||||
$nbofrecipientemails=0;
|
||||
$notify=new Notify($db);
|
||||
@ -198,7 +199,8 @@ if ($result > 0)
|
||||
if (! empty($tmpkey)) $nbofrecipientemails++;
|
||||
}
|
||||
print $nbofrecipientemails;
|
||||
print '</td></tr>';
|
||||
print '</td></tr>';*/
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
@ -286,7 +288,7 @@ if ($result > 0)
|
||||
$sql.= " WHERE a.rowid = n.fk_action";
|
||||
$sql.= " AND c.rowid = n.fk_contact";
|
||||
$sql.= " AND c.fk_soc = ".$object->id;
|
||||
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -299,8 +301,7 @@ if ($result > 0)
|
||||
|
||||
// List of active notifications
|
||||
print load_fiche_titre($langs->trans("ListOfActiveNotifications").' ('.$num.')','','');
|
||||
$var=true;
|
||||
|
||||
|
||||
// Line with titles
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -321,14 +322,12 @@ if ($result > 0)
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$var = !$var;
|
||||
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
$contactstatic->id=$obj->contactid;
|
||||
$contactstatic->lastname=$obj->lastname;
|
||||
$contactstatic->firstname=$obj->firstname;
|
||||
print '<tr '.$bc[$var].'><td>'.$contactstatic->getNomUrl(1);
|
||||
print '<tr class="oddeven"><td>'.$contactstatic->getNomUrl(1);
|
||||
if ($obj->type == 'email')
|
||||
{
|
||||
if (isValidEmail($obj->email))
|
||||
@ -425,6 +424,16 @@ if ($result > 0)
|
||||
$sql.= " AND n.fk_soc = ".$object->id;
|
||||
$sql.= $db->order($sortfield, $sortorder);
|
||||
|
||||
// Count total nb of records
|
||||
$nbtotalofrecords = '';
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
{
|
||||
$result = $db->query($sql);
|
||||
$nbtotalofrecords = $db->num_rows($result);
|
||||
}
|
||||
|
||||
$sql.= $db->plimit($limit+1, $offset);
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -435,9 +444,20 @@ if ($result > 0)
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
// List of notifications done
|
||||
print load_fiche_titre($langs->trans("ListOfNotificationsDone").' ('.$num.')','','');
|
||||
$var=true;
|
||||
$param='&socid='.$object->id;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'" name="formfilter">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="socid" value="'.$object->id.'">';
|
||||
|
||||
// List of active notifications
|
||||
print_barre_liste($langs->trans("ListOfNotificationsDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit);
|
||||
|
||||
// Line with titles
|
||||
print '<table width="100%" class="noborder">';
|
||||
@ -457,11 +477,9 @@ if ($result > 0)
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$var = !$var;
|
||||
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
if ($obj->id > 0)
|
||||
{
|
||||
$contactstatic->id=$obj->id;
|
||||
@ -501,6 +519,8 @@ if ($result > 0)
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
else dol_print_error('','RecordNotFound');
|
||||
|
||||
|
||||
@ -723,11 +723,10 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
|
||||
print dol_set_focus('#lastname');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr>';
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Lastname
|
||||
print '<tr>';
|
||||
print '<td class="titlefieldcreate"><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td>';
|
||||
print '<td>';
|
||||
if (! empty($ldap_lastname))
|
||||
@ -1257,7 +1256,6 @@ else
|
||||
|
||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="fichehalfleft">';
|
||||
|
||||
|
||||
@ -44,15 +44,16 @@ $actionid=GETPOST('actionid');
|
||||
if ($user->societe_id) $id=$user->societe_id;
|
||||
$result = restrictedArea($user, 'societe','','');
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
$page = GETPOST("page",'int');
|
||||
if ($page == -1) { $page = 0; }
|
||||
$offset = $conf->liste_limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
|
||||
$sortfield=GETPOST("sortfield",'alpha');
|
||||
$sortorder=GETPOST("sortorder",'alpha');
|
||||
$page=GETPOST("page",'int');
|
||||
if (! $sortorder) $sortorder="DESC";
|
||||
if (! $sortfield) $sortfield="n.daten";
|
||||
if (empty($page) || $page == -1) { $page = 0; }
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
@ -135,12 +136,45 @@ if ($result > 0)
|
||||
|
||||
$head = user_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'notify', $langs->trans("User"), 0, 'user');
|
||||
dol_fiche_head($head, 'notify', $langs->trans("User"), -1, 'user');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', '', '', 0, '', '', 1, '');
|
||||
dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', '', '', 0, '', '', 0, '');
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Login
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Login").'</td>';
|
||||
if (! empty($object->ldap_sid) && $object->statut==0)
|
||||
{
|
||||
print '<td class="error">'.$langs->trans("LoginAccountDisableInDolibarr").'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td>'.$object->login.'</td>';
|
||||
}
|
||||
print '</tr>'."\n";
|
||||
|
||||
/*print '<tr><td class="titlefield">'.$langs->trans("NbOfActiveNotifications").'</td>'; // Notification for this thirdparty
|
||||
print '<td colspan="3">';
|
||||
$nbofrecipientemails=0;
|
||||
$notify=new Notify($db);
|
||||
$tmparray = $notify->getNotificationsArray('', 0, null, $object->id, array('user'));
|
||||
foreach($tmparray as $tmpkey => $tmpval)
|
||||
{
|
||||
$nbofrecipientemails++;
|
||||
}
|
||||
print $nbofrecipientemails;
|
||||
print '</td></tr>';*/
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print "\n";
|
||||
@ -345,13 +379,13 @@ if ($result > 0)
|
||||
print '<td align="right">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</td>';
|
||||
print '</tr>';
|
||||
}*/
|
||||
if ($user->admin)
|
||||
/*if ($user->admin)
|
||||
{
|
||||
$var = ! $var;
|
||||
print '<tr '.$bc[$var].'><td colspan="4">';
|
||||
print '+ <a href="'.DOL_URL_ROOT.'/admin/notification.php">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</a>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
}*/
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -364,12 +398,22 @@ if ($result > 0)
|
||||
$sql.= " c.rowid as id, c.lastname, c.firstname, c.email as contactemail,";
|
||||
$sql.= " a.code, a.label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."notify as n ";
|
||||
$sql.= " ".MAIN_DB_PREFIX."notify as n";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as c ON n.fk_user = c.rowid";
|
||||
$sql.= " WHERE a.rowid = n.fk_action";
|
||||
$sql.= " AND n.fk_user = ".$object->id;
|
||||
$sql.= $db->order($sortfield, $sortorder);
|
||||
|
||||
// Count total nb of records
|
||||
$nbtotalofrecords = '';
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
{
|
||||
$result = $db->query($sql);
|
||||
$nbtotalofrecords = $db->num_rows($result);
|
||||
}
|
||||
|
||||
$sql.= $db->plimit($limit+1, $offset);
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -380,10 +424,21 @@ if ($result > 0)
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
$param='&id='.$object->id;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'" name="formfilter">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
|
||||
// List of notifications done
|
||||
print_fiche_titre($langs->trans("ListOfNotificationsDone").' ('.$num.')','','');
|
||||
$var=true;
|
||||
|
||||
print_barre_liste($langs->trans("ListOfNotificationsDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit);
|
||||
|
||||
// Line with titles
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -402,11 +457,9 @@ if ($result > 0)
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$var = !$var;
|
||||
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
if ($obj->id > 0)
|
||||
{
|
||||
$userstatic->id=$obj->id;
|
||||
@ -446,6 +499,8 @@ if ($result > 0)
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
else dol_print_error('','RecordNotFound');
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user