Permalink
Browse files

Finalized job market candidates

  • Loading branch information...
1 parent 5a50a1f commit 1e1fa0ada0e67f0af29e65ae1a2c0d80182fc984 @cpeckens committed Oct 17, 2011
Showing with 37 additions and 13 deletions.
  1. +1 −1 DirectoryTemplate.php
  2. +10 −3 assets/css/classes.css
  3. +5 −6 assets/functions/widget-profiles.php
  4. +16 −0 functions.php
  5. +5 −3 single-people.php
View
@@ -147,7 +147,7 @@
<td><h4><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h4><?php if ( get_post_meta($post->ID, 'phone', true) ) : ?> <?php echo get_post_meta($post->ID, 'phone', true); ?><br><?php endif; ?>
<?php if ( get_post_meta($post->ID, 'email', true) ) : ?><a href="mailto:<?php echo get_post_meta($post->ID, 'email', true); ?>"> <?php echo get_post_meta($post->ID, 'email', true); ?></a><?php endif; ?></p></td>
- <td><p class="candidates"><?php if ( get_post_meta($post->ID, 'thesis', true) ) : ?><?php echo get_post_meta($post->ID, 'thesis', true); ?><?php endif; ?><?php if ( get_post_meta($post->ID, 'job_abstract', true) ) : ?>&nbsp;<a href="<?php echo get_post_meta($post->ID, 'job_abstract', true); ?>">Download Abstract (PDF)</a><?php endif; ?> </p></td>
+ <td><p class="candidates"><?php if ( get_post_meta($post->ID, 'thesis', true) ) : ?><?php echo get_post_meta($post->ID, 'thesis', true); ?><?php endif; ?><?php if ( get_post_meta($post->ID, 'job_abstract', true) ) : ?>&nbsp;- <a href="<?php echo get_post_meta($post->ID, 'job_abstract', true); ?>">Download Abstract (PDF)</a><?php endif; ?> </p></td>
<td><p class="candidates"><?php if ( get_post_meta($post->ID, 'fields', true) ) : ?><?php echo get_post_meta($post->ID, 'fields', true); ?><?php endif; ?></td>
View
@@ -60,6 +60,12 @@ ___________________________________________________________*/
float:right;
}
+hr {
+ color: #CCC;
+ background-color: #CCC;
+ height: 3px;
+}
+
.video-container { /* Wrap around iFrame and SWF embeds for responsive sizing */
position: relative;
padding-bottom: 56.25%;
@@ -719,10 +725,11 @@ h2.widgettitle {
#undergrad-widget .textwidget h4 {
color:#00337f;
+ text-transform: none;
font-weight: 700;
- font-size:1.3em;
- text-transform: uppercase;
- margin-bottom:0;
+ font-size: 1.25em;
+ margin-bottom: 1em;
+ padding-top:5px;
}
#undergrad-widget .textwidget {
@@ -144,20 +144,19 @@ function widget( $args, $instance ) {
global $post; ?>
- <?php $job_candidate_query = new WP_Query('post-type=people&orderby=rand&posts_per_page=1'); ?>
+ <?php $job_candidate_query = new WP_Query('post-type=people&role=job-market-candidate&orderby=rand&posts_per_page=1'); ?>
<?php while ($job_candidate_query->have_posts()) : $job_candidate_query->the_post(); ?>
<div class="profile_box">
- <a href="<?php bloginfo('url'); ?>/people/job-market-candidates/"><img src="<?php echo get_post_meta($post->ID, 'people_photo', true); ?>" /></a>
- <h4><a href="<?php bloginfo('url'); ?>/people/job-market-candidates/"><?php the_title(); ?></a></h4>
- <p>This is the generic language for the job-candidate widget.</p>
+ <a href="http://econ.jhu.edu/directoryindex/job-market/"><img src="<?php echo get_post_meta($post->ID, 'people_photo', true); ?>" /></a>
+ <h4><a href="http://econ.jhu.edu/directoryindex/job-market/"><?php the_title(); ?></a></h4>
+ <p><strong>Thesis:</strong> <?php echo get_post_meta($post->ID, 'thesis', true); ?></p>
+ <p><a href="http://econ.jhu.edu/directoryindex/job-market/">Click here</a> to view all of our 2011-2012 job market candidates.</p>
</div>
<?php endwhile; ?>
-
-
<?php echo $after_widget;
}
View
@@ -227,6 +227,22 @@ function iframe_embed_shortcode($atts, $content = null) {
}
add_shortcode('iframe', 'iframe_embed_shortcode');
}
+
+// Add conditional statement for people type
+ function has_role( $Role, $_post = null ) {
+ if ( empty( $Role ) )
+ return false;
+ if ( $_post )
+ $_post = get_post( $_post );
+ else
+ $_post =& $GLOBALS['post'];
+ if ( !$_post )
+ return false;
+ $r = is_object_in_term( $_post->ID, 'Role', $Role );
+ if ( is_wp_error( $r ) )
+ return false;
+ return $r;
+}
// include People Directory and Profiles functionality
include_once (TEMPLATEPATH . '/assets/functions/people-directory.php');
View
@@ -19,7 +19,9 @@
<?php echo $children; ?>
</ul>
<?php } ?> <!--End subnav -->
-<!--Begin Jump to faculty code -->
+<!--Begin Jump to faculty code -->
+
+<?php if ( has_role( 'faculty' ) ) : ?>
<?php
$args=array(
'post_type' => 'people',
@@ -52,7 +54,7 @@
<?php
wp_reset_query();
?>
-
+<?php endif; ?>
<!--End jump-menu -->
<!--End Subpage Navigation code -->
@@ -120,7 +122,7 @@
<?php if ( get_post_meta($post->ID, 'extra_tab', true) ) : ?><li id="extra"><?php echo get_post_meta($post->ID, 'extra_tab', true); ?></li><?php endif; ?>
<?php if ( get_post_meta($post->ID, 'job_research', true) ) : ?><li class="active" id="job_research">
- <p><strong>Thesis Title:</strong>&nbsp;<?php echo get_post_meta($post->ID, 'thesis', true); ?>&nbsp;<?php if ( get_post_meta($post->ID, 'job_abstract', true) ) : ?><a href="<?php echo get_post_meta($post->ID, 'job_abstract', true); ?>">Download Abstract</a> (PDF)<?php endif; ?></p>
+ <p><strong>Thesis Title:</strong>&nbsp;<?php if ( get_post_meta($post->ID, 'thesis', true) ) : ?><?php echo get_post_meta($post->ID, 'thesis', true); ?><?php endif; ?>&nbsp;<?php if ( get_post_meta($post->ID, 'job_abstract', true) ) : ?>- <a href="<?php echo get_post_meta($post->ID, 'job_abstract', true); ?>">Download Abstract</a> (PDF)<?php endif; ?></p>
<p><strong>Fields:</strong>&nbsp;<?php echo get_post_meta($post->ID, 'fields', true); ?></p>
<?php echo get_post_meta($post->ID, 'job_research', true); ?></li><?php endif; ?>

0 comments on commit 1e1fa0a

Please sign in to comment.