); } $the_query = new WP_Query( $args ); ?> <main class="reporting-dashboard"> <div class="hero"> <h1><?php echo get_userdata($current_user->ID)->data->display_name; ?>'s Dashboard</h1> </div> <div class="page-container"> <?php the_partial('report-section-title', array('title' => 'Reports')); ?> <?php if ( $the_query->have_posts() ) : ?> <?php while ( $the_query->have_posts() ) : $the_query->the_post(); $report = new Report_View_Model( $post );?> <a href="<?php echo $report->get_permalink();?>" class="report-card report__item"> <div class="report-card__header"> <div class="report-card__header-group"> <h2 class="report-card__title"><?php echo $report->get_title(); ?></h2> </div> <div class="report-card__header-group"> <p class="report-card__date"><?php echo $report->report_date; ?></p> <?php if ( $report->label ) : ?> <p class="report-card__label"><?php echo $report->label; ?></p> <?php endif; ?> </div> </div>
endforeach; ?> </div> <?php endif; ?> <?php if( $news_recap ): ?> <div class="report" id="news"> <?php the_partial('report-section-title', array('title' => 'News') ); ?> <?php foreach( $news_recap as $i => $row ) : $media_outlet = new Report_View_Model ( $row['post'] ); the_partial('report-section', array( 'type' => 'news', 'name' => $row['post']->post_title, 'outlet_type' => $media_outlet->outlet_type, 'links' => $row['links'], 'report_status' => $row['status'] )); endforeach; ?> </div> <?php endif; ?> </div>