Skip to content
Snippets Groups Projects

Dev#14279 integrations exemplaires

Merged Laurent requested to merge dev#14279_integrations_exemplaires into master
Compare and
+ 547
163
Preferences
Compare changes
Files
@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with AFI-OPAC 2.0; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
////////////////////////////////////////////////////////////////////////////////////////
// FICHE BIBLIOTHEQUE
@@ -34,7 +34,7 @@ class bibliotheque
$bibs=$sql->fetchAll("select * from int_bib ".$where."order by nom_court");
return $bibs;
}
//---------------------------------------------------------------------------------
// Rend le nom court d'1 bib
//---------------------------------------------------------------------------------
@@ -70,9 +70,9 @@ class bibliotheque
else $ecart.=" jours";
}
$lig=$bib;
if(!$lig["date_mail"]) $lig["date_mail"]="jamais";
if(!$lig["date_mail"]) $lig["date_mail"]="jamais";
$lig["retard"]=$ecart;
$ret[]=$lig;
$ret[]=$lig;
}
}
return $ret;
@@ -81,14 +81,16 @@ class bibliotheque
//---------------------------------------------------------------------------------
// Rend une combo avec les noms courts
//---------------------------------------------------------------------------------
public function getComboNoms($id_a_selectionner=0)
{
$bibs=$this->getAll();
public function getComboNoms($id_a_selectionner=0) {
$bibs = Class_IntBib::findAll();
usort($bibs, function($a, $b) {return $a->getLabel() > $b->getLabel();});
$combo='<select name="id_bib">';
foreach($bibs as $bib)
{
if($id_a_selectionner == $bib["id_bib"]) $selected=" selected"; else $selected="";
$combo.='<option value="'.$bib["id_bib"].'"'.$selected.'>'.stripSlashes($bib["nom_court"]).'</option>';
$selected = ($id_a_selectionner == $bib->getIdBib()) ? " selected=\"selected\"" : "";
$combo.='<option value="'.$bib->getIdBib().'"'.$selected.'>'.stripSlashes($bib->getLabel()).'</option>';
}
$combo.='</select>';
return $combo;