Fix #2994
This commit is contained in:
parent
3ed200766c
commit
35dd069ec9
@ -2527,11 +2527,12 @@ function dol_print_error_email($prefixcode)
|
||||
* @param string $td Options of attribute td ("" by defaut, example: 'align="center"')
|
||||
* @param string $sortfield Current field used to sort
|
||||
* @param string $sortorder Current sort order
|
||||
* @param string $prefix Prefix for css
|
||||
* @return void
|
||||
*/
|
||||
function print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $td="", $sortfield="", $sortorder="")
|
||||
function print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $td="", $sortfield="", $sortorder="", $prefix="")
|
||||
{
|
||||
print getTitleFieldOfList($name, 0, $file, $field, $begin, $moreparam, $td, $sortfield, $sortorder);
|
||||
print getTitleFieldOfList($name, 0, $file, $field, $begin, $moreparam, $td, $sortfield, $sortorder, $prefix);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2546,9 +2547,10 @@ function print_liste_field_titre($name, $file="", $field="", $begin="", $morepar
|
||||
* @param string $moreattrib Add more attributes on th ("" by defaut)
|
||||
* @param string $sortfield Current field used to sort
|
||||
* @param string $sortorder Current sort order
|
||||
* @param string $prefix Prefix for css
|
||||
* @return string
|
||||
*/
|
||||
function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="")
|
||||
function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="")
|
||||
{
|
||||
global $conf;
|
||||
//print "$name, $file, $field, $begin, $options, $moreattrib, $sortfield, $sortorder<br>\n";
|
||||
@ -2562,7 +2564,7 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
|
||||
// If field is used as sort criteria we use a specific class
|
||||
// Example if (sortfield,field)=("nom","xxx.nom") or (sortfield,field)=("nom","nom")
|
||||
if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) $out.= '<'.$tag.' class="liste_titre_sel" '. $moreattrib.'>';
|
||||
else $out.= '<'.$tag.' class="liste_titre" '. $moreattrib.'>';
|
||||
else $out.= '<'.$tag.' class="'.$prefix.'liste_titre" '. $moreattrib.'>';
|
||||
|
||||
if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
|
||||
{
|
||||
|
||||
@ -65,7 +65,11 @@ $extrafields = new ExtraFields($db);
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeaderVierge($langs->trans("MemberCard"));
|
||||
$morehead='';
|
||||
if (! empty($conf->global->MEMBER_PUBLIC_CSS)) $morehead='<link rel="stylesheet" type="text/css" href="'.$conf->global->MEMBER_PUBLIC_CSS.'">';
|
||||
else $morehead='<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/eldy/style.css.php'.'">';
|
||||
|
||||
llxHeaderVierge($langs->trans("MemberCard"), $morehead);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('adherent');
|
||||
@ -75,7 +79,7 @@ if ($id > 0)
|
||||
if ($res < 0) { dol_print_error($db,$object->error); exit; }
|
||||
$res=$object->fetch_optionals($object->id,$extralabels);
|
||||
|
||||
print_titre($langs->trans("MemberCard"));
|
||||
print_fiche_titre($langs->trans("MemberCard"), '', '');
|
||||
|
||||
if (empty($object->public))
|
||||
{
|
||||
@ -83,7 +87,7 @@ if ($id > 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<table class="border" cellspacing="0" width="100%" cellpadding="3">';
|
||||
print '<table class="public_border" cellspacing="0" width="100%" cellpadding="3">';
|
||||
|
||||
print '<tr><td width="15%">'.$langs->trans("Type").'</td><td class="valeur">'.$object->type."</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("Person").'</td><td class="valeur">'.$object->morphy.'</td></tr>';
|
||||
@ -138,7 +142,7 @@ function llxHeaderVierge($title, $head = "")
|
||||
print "<title>".$title."</title>\n";
|
||||
if ($head) print $head."\n";
|
||||
print "</head>\n";
|
||||
print "<body>\n";
|
||||
print '<body class="public_body">'."\n";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -62,7 +62,7 @@ function llxHeaderVierge($title, $head = "")
|
||||
print "<title>".$title."</title>\n";
|
||||
if ($head) print $head."\n";
|
||||
print "</head>\n";
|
||||
print "<body>\n";
|
||||
print '<body class="public_body">'."\n";
|
||||
}
|
||||
|
||||
/**
|
||||
@ -98,7 +98,13 @@ if (! $sortfield) { $sortfield="lastname"; }
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeaderVierge($langs->trans("ListOfValidatedPublicMembers"));
|
||||
$form = new Form($db);
|
||||
|
||||
$morehead='';
|
||||
if (! empty($conf->global->MEMBER_PUBLIC_CSS)) $morehead='<link rel="stylesheet" type="text/css" href="'.$conf->global->MEMBER_PUBLIC_CSS.'">';
|
||||
else $morehead='<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/eldy/style.css.php'.'">';
|
||||
|
||||
llxHeaderVierge($langs->trans("ListOfValidatedPublicMembers"), $morehead);
|
||||
|
||||
$sql = "SELECT rowid, firstname, lastname, societe, zip, town, email, birth, photo";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent";
|
||||
@ -120,17 +126,16 @@ if ($result)
|
||||
|
||||
$param="&statut=$statut&sortorder=$sortorder&sortfield=$sortfield";
|
||||
print_barre_liste($langs->trans("ListOfValidatedPublicMembers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, 0, '');
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table class="public_border" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?page='.$page.'&sortorder=ASC&sortfield=firstname">'.$langs->trans("Firstname").'</a>';
|
||||
print ' <a href="'.$_SERVER['PHP_SELF'].'?page='.$page.'&sortorder=ASC&sortfield=lastname">'.$langs->trans("Lastname").'</a>';
|
||||
print ' / <a href="'.$_SERVER["PHP_SELF"].'?page='.$page.'&sortorder=ASC&sortfield=societe">'.$langs->trans("Company").'</a></td>'."\n";
|
||||
print '<tr class="public_liste_titre">';
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?page='.$page.'&sortorder=ASC&sortfield=firstname">'.dolGetFirstLastname($langs->trans("Firstname"),$langs->trans("Lastname")).'</a></td>';
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?page='.$page.'&sortorder=ASC&sortfield=societe">'.$langs->trans("Company").'</a></td>'."\n";
|
||||
//print_liste_field_titre($langs->trans("DateToBirth"), $_SERVER["PHP_SELF"],"birth",'',$param,$sortfield,$sortorder); // est-ce nécessaire ??
|
||||
print_liste_field_titre($langs->trans("EMail"), $_SERVER["PHP_SELF"],"email",'',$param,$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Zip"), $_SERVER["PHP_SELF"],"zip","",$param,$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Town"), $_SERVER["PHP_SELF"],"town","",$param,$sortfield,$sortorder);
|
||||
print "<td>".$langs->trans("Photo")."</td>\n";
|
||||
print_liste_field_titre($langs->trans("EMail"), $_SERVER["PHP_SELF"],"email",'',$param,'',$sortfield,$sortorder,'public_');
|
||||
print_liste_field_titre($langs->trans("Zip"), $_SERVER["PHP_SELF"],"zip","",$param,'',$sortfield,$sortorder,'public_');
|
||||
print_liste_field_titre($langs->trans("Town"), $_SERVER["PHP_SELF"],"town","",$param,'',$sortfield,$sortorder,'public_');
|
||||
print_liste_field_titre($langs->trans("Photo"), $_SERVER["PHP_SELF"],"","",$param,'',$sortfield,$sortorder,'public_');
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
@ -139,13 +144,13 @@ if ($result)
|
||||
$objp = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td><a href="public_card.php?id='.$objp->rowid.'">'.dolGetFirstLastname($obj->firstname, $obj->lastname).($objp->societe?' / '.$objp->societe:'').'</a></td>'."\n";
|
||||
print '<td><a href="public_card.php?id='.$objp->rowid.'">'.dolGetFirstLastname($objp->firstname, $objp->lastname).'</a></td>'."\n";
|
||||
print '<td>'.$objp->societe.'</td>'."\n";
|
||||
print '<td>'.$objp->email.'</td>'."\n";
|
||||
print '<td>'.$objp->zip.'</td>'."\n";
|
||||
print '<td>'.$objp->town.'</td>'."\n";
|
||||
if (isset($objp->photo) && $objp->photo != '')
|
||||
{
|
||||
$form = new Form($db);
|
||||
print '<td>';
|
||||
print $form->showphoto('memberphoto', $objp, 64);
|
||||
print '</td>'."\n";
|
||||
@ -165,6 +170,6 @@ else
|
||||
}
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooterVierge();
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -3079,5 +3079,17 @@ border-top-right-radius: 6px;
|
||||
padding-left: 54px;
|
||||
}
|
||||
|
||||
|
||||
/* The theme for public pages */
|
||||
.public_body {
|
||||
margin: 20px;
|
||||
}
|
||||
.public_border {
|
||||
border: 1px solid #888;
|
||||
}
|
||||
.public_liste_titre {
|
||||
|
||||
}
|
||||
|
||||
<?php
|
||||
if (is_object($db)) $db->close();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user