This repository has been archived by the owner. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from jmr06005/master
UC People Update
- Loading branch information
Showing
6 changed files
with
121 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<table class="table"> | ||
<legend class="sr-only">Contact Information</legend> | ||
<?php | ||
function displayField($field){ | ||
if (get_field($field)){ | ||
|
||
$field_key = 'field_'.$field; | ||
$field_obj = get_field_object($field_key); | ||
$field_value = $field_obj['value']; | ||
$field_label = $field_obj['label']; | ||
echo '<tr>'; | ||
if ($field == 'file'){ | ||
echo '<th>'.get_field('filelabel').'</th>'; | ||
} else { | ||
echo '<th>'.$field_label.'</th>'; | ||
} | ||
echo '<td class="person-'.$field.'">'; | ||
if ($field == 'email'){ | ||
echo '<a href="mailto:'.$field_value.'">'; | ||
the_field($field); | ||
echo '</a>'; | ||
} else if ($field == 'file'){ | ||
$file = get_field($field); | ||
$url= $file['url']; | ||
echo '<a href="'.$url.'"><span class="glyphicon glyphicon-save-file"></span> '; | ||
echo $file['title']; | ||
echo '</a>'; | ||
} else if ($field == 'mailing_address'){ | ||
echo str_replace(';','<br>',get_field('mailing_address')); | ||
} else { | ||
the_field($field); | ||
} | ||
echo '</td></tr>'; | ||
} | ||
} | ||
displayField('email'); | ||
displayField('phone'); | ||
displayField('phone_(alternate)'); | ||
displayField('fax'); | ||
displayField('file'); | ||
displayField('mailing_address'); | ||
displayField('office_location'); | ||
displayField('campus'); | ||
displayField('office_hours'); | ||
displayField('courses'); | ||
displayField('url'); | ||
?> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
<?php | ||
/** | ||
* Used for displaying the 'person' post type. | ||
*/ | ||
|
||
get_header(); ?> | ||
<?php include('inc/sidebar-check.php')?> | ||
<div id="page-page"> | ||
<?php if (have_posts()) : while ( have_posts() ) : the_post(); ?> | ||
<?php include('inc/submenu-check.php') ?> | ||
<div class="row"> | ||
<div class="col-sm-<?php echo (is_active_sidebar( $sidebar )?9:12); ?>"> | ||
<div id="primary" class="content-area subpage"> | ||
<main id="main" class="site-main" role="main"> | ||
<div class="row"> | ||
<?php | ||
$about = get_field('about'); | ||
if (strlen($about) > 0){ | ||
include('inc/person-with-about.php'); | ||
} else { | ||
include('inc/person-no-about.php'); | ||
} | ||
?> | ||
</div> | ||
</main> | ||
</div> | ||
</div> | ||
<?php include('inc/sidebar-if-active.php')?> | ||
</div> | ||
<?php include('inc/submenu-closing-tags.php')?> | ||
<?php endwhile; endif; // end of the loop. ?> | ||
</div> | ||
<?php get_footer(); ?> | ||
<?php | ||
/** | ||
* Used for displaying the 'person' post type. | ||
*/ | ||
|
||
get_header(); ?> | ||
<?php include('inc/sidebar-check.php')?> | ||
<div id="page-page"> | ||
<?php if (have_posts()) : while ( have_posts() ) : the_post(); ?> | ||
<?php include('inc/submenu-check.php') ?> | ||
<div class="row"> | ||
<div class="col-sm-<?php echo (is_active_sidebar( $sidebar )?9:12); ?>"> | ||
<div id="primary" class="content-area subpage"> | ||
<main id="main" class="site-main" role="main"> | ||
<div class="row"> | ||
<?php | ||
$about = get_field('about'); | ||
if (strlen($about) > 0){ | ||
include('inc/person-with-about.php'); | ||
} else { | ||
include('inc/person-no-about.php'); | ||
} | ||
?> | ||
</div> | ||
</main> | ||
</div> | ||
</div> | ||
<?php include('inc/sidebar-if-active.php')?> | ||
</div> | ||
<?php include('inc/submenu-closing-tags.php')?> | ||
<?php endwhile; endif; // end of the loop. ?> | ||
</div> | ||
<?php get_footer(); ?> |