card.client.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <div class="client-card">
  2. <div class="top-part">
  3. <div class="header-top">
  4. <div class="icon">
  5. <img class="avatar-rounded logo" src="<?php echo $client->logo(); ?>" alt="Logo du client">
  6. </div>
  7. <div>
  8. <h3 class="label"><a title="Plus de détails" href="index.php?module=client&page=client.detail&id=<?php echo $client->id; ?>" target="_blank">
  9. <?php echo $client->label; ?></a>
  10. </h3>
  11. <small class="mail text-muted">Créé par <?php echo $client->creator; ?> le <?php echo date('d-m-Y',$client->created); ?></small>
  12. <?php if($client->siret!=''): ?>
  13. <br><small class="text-box"> N° SIRET <a href="https://www.societe.com/cgi-bin/search?champs=<?php echo $client->label; ?>"><?php echo $client->siret; ?></a></small>
  14. <?php endif; ?>
  15. </div>
  16. </div>
  17. <div class="content-block">
  18. <?php
  19. $addresses = $client->addresses();
  20. if(count($addresses)!=0):
  21. foreach ($addresses as $address) :
  22. ?>
  23. <div class="mt-2">
  24. <div class="font-weight-bold">Adresse [<?php echo Address::types($address->type)['label']; ?>]: </div>
  25. <div class="text-box"><?php echo $address->fullName(); ?></div>
  26. </div>
  27. <?php endforeach; ?>
  28. <?php endif; ?>
  29. <div class="clear"></div>
  30. </div>
  31. </div>
  32. <?php $contacts = ContactPerson::staticQuery('SELECT * FROM {{table}} co WHERE scope="client" AND uid = ? LIMIT 5',array($client->id),true);
  33. if(count($contacts)>0): ?>
  34. <hr>
  35. <div class="bottom-part pb-2 ">
  36. <small class="font-weight-bold text-uppercase text-muted">Contacts : </small>
  37. <ul class="client-card-contacts">
  38. <?php
  39. foreach($contacts as $contact): ?>
  40. <li>
  41. <?php echo $contact->fullName(); ?><br>
  42. <?php if($contact->mail!=''): ?>
  43. <a class="contact-mail" href="mailto:<?php echo $contact->mail; ?>"><i class="far fa-envelope-open"></i> <?php echo $contact->mail; ?></a>
  44. <?php endif; ?>
  45. <?php if($contact->phone!=''): ?>
  46. <a class="contact-phone" href="tel:<?php echo $contact->phone; ?>"><i class="fas fa-mobile-alt"></i> <?php echo $contact->phone; ?></a>
  47. <?php endif; ?>
  48. </li>
  49. <?php endforeach; ?>
  50. </ul>
  51. </div>
  52. <?php endif; ?>
  53. </div>