<commit_before><?php
$page->title($inst_name.' People Directory: Details')
     ->navbar_image('title-people')
     ->breadcrumbs('Search', 'Details');

class Item {
    public $person;

    public function __construct($person) {
        $this->person = $person;
    }

    public function display($label, $field, $href=NULL, $class=NULL, $group=False) {
        foreach($this->person[$field] as $value) {
          ?>
            <? if(!$group) { ?>  <ul class="nav">    <? } ?>
              <li>
                 <? if($href != NULL) {                   
                     echo '<a href="' . $href($value) . '" class="' . $class . '">';
                 } ?>

                 <div class="label"><?=$label?></div>
                 <div class="value"><?=$value?></div>

                 <? if($href != NULL) {                   
                       echo "</a>";
                 } ?>
              </li>
            <? if (!$group) { ?>  </ul>  <? } ?>   
          <?
        }
    }
}             
$item = new Item($person);

$page->content_begin();
?>
	<ul class="nav">
              <?  $item->display('name', 'fullname', NULL, NULL, True); ?>
              <?  $item->display('title', 'title', NULL, NULL, True); ?>
              <?  $item->display('dept', 'dept', NULL, NULL, True); ?>
	</ul>
	
        <? if (has_phone($person) && ($item->person['telephone'][0] != '000-000-0000')) { ?>
           <ul class="nav"> 
             <?  $item->display('phone', 'telephone', "phoneHREF", 'phone', True);  ?>
           </ul>
        <? } ?>

        <?
           if ($item->person['affiliation'][0] == 'facstaff') { $item->normal('address', 'address'); }             
           $item->display('email', 'email', "mailHREF", 'email');             
           $item->display('office', 'room', "mapHREF", 'map');
        ?>
<? $page->content_end(); ?>

<commit_msg>final changes for the iphone detail view of directory<commit_after><?php
$page->title($inst_name.' People Directory: Details')
     ->navbar_image('title-people')
     ->breadcrumbs('Search', 'Details');

class Item {
    public $person;

    public function __construct($person) {
        $this->person = $person;
    }

    public function display($label, $field, $href=NULL, $class=NULL, $group=False) {
        foreach($this->person[$field] as $value) {
          ?>
            <? if(!$group) { ?>  <ul class="nav">    <? } ?>
              <li>
                 <? if($href != NULL) {                   
                     echo '<a href="' . $href($value) . '" class="' . $class . '">';
                 } ?>

                 <div class="label"><?=$label?></div>
                 <div class="value"><?=$value?></div>

                 <? if($href != NULL) {                   
                       echo "</a>";
                 } ?>
              </li>
            <? if (!$group) { ?>  </ul>  <? } ?>   
          <?
        }
    }
}             
$item = new Item($person);

$page->content_begin();
?>
	<ul class="nav">
              <?  $item->display('name', 'fullname', NULL, NULL, True); ?>
              <?  $item->display('title', 'title', NULL, NULL, True); ?>
              <?  $item->display('dept', 'dept', NULL, NULL, True); ?>
	</ul>
	
        <? if (has_phone($person) && ($item->person['telephone'][0] != '000-000-0000')) { ?>
           <ul class="nav"> 
             <?  $item->display('phone', 'telephone', "phoneHREF", 'phone', True);  ?>
           </ul>
        <? } ?>

        <ul class="nav">
           <? if ($item->person['affiliation'][0] == 'facstaff') { $item->display('address', 'address',NULL, NULL,True); } ?>
        </ul>

         <?
           $item->display('email', 'email', "mailHREF", 'email');             
           $item->display('office', 'room', "mapHREF", 'map');
        ?>
<? $page->content_end(); ?>


{'fraction_non_alphanumeric': 0.22022413343758143, 'fraction_numerical': 0.006254886630179828, 'mean_word_length': 1.6560553633217994, 'pattern_counts': {'":': 0, '<': 70, '<?xml version=': 0, '>': 102, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4861170', 'n_tokens_mistral': 1162, 'n_tokens_neox': 1125, 'n_words': 210}