Skip to content
This repository has been archived by the owner. It is now read-only.

Committing Bridgets changes to review them #3

Merged
merged 1 commit into from May 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions template-class.php
Expand Up @@ -88,9 +88,7 @@ class Purchasing_Template_Plugin {

// Add your templates to this array.
$this->templates = array(
'page-purchasing.php' => __( 'Purchasing', $this->plugin_slug ),
//'page-sample2.php' => __( 'Sample2', $this->plugin_slug ),
//'page-sample3.php' => __( 'Sample3', $this->plugin_slug ),
'page-purchasing.php' => __( 'Purchasing', $this->plugin_slug )
);

// adding support for theme templates to be merged and shown in dropdown
Expand Down
41 changes: 37 additions & 4 deletions templates/page-purchasing.php
Expand Up @@ -83,18 +83,37 @@ get_header(); ?>
foreach($vc as $c){
$urlvc .= 'vc[]='.$c.'&';
}
}
}
?>
<table class="table table-striped">
<thead>
<tr style="background-color: #000e2f; color: #ffffff;"> <!-- LINK TO SORT BY COLUMN -->

<?php //Check Contract Type
$contract_type = get_post_meta( get_the_ID(), 'uc-purchasing', true );
if($contract_type == 'Construction-Awards' || $contract_type == 'Professional-Services-Awards')
{
?>
<td><strong><a href="?<?php echo $urlvc ?>&order_by_column=contract_name&search_contracts=<?php echo $search_for ?>" style="color: #ffffff;">Project Number</a></strong></td>
<td><strong><a href="?<?php echo $urlvc ?>&order_by_column=contract_number&search_contracts=<?php echo $search_for ?>" style="color: #ffffff;">Award Date</a></strong></td>
<td><strong><a href="?<?php echo $urlvc ?>&order_by_column=contract_expires&search_contracts=<?php echo $search_for ?>" style="color: #ffffff;">Project Description</a></strong></td>
<td><strong><a href="?<?php echo $urlvc ?>&order_by_column=contract_vendor_name&search_contracts=<?php echo $search_for ?>" style="color: #ffffff;">Firm Awarded</a></strong></td>
<td><strong><a href="?<?php echo $urlvc ?>&order_by_column=contract_contact_name&search_contracts=<?php echo $search_for ?>" style="color: #ffffff;">Contract Value</a></span></td>
<td><strong><a href="?<?php echo $urlvc ?>&order_by_column=contract_contact_phone&search_contracts=<?php echo $search_for ?>" style="color: #ffffff;">CPCA Contact</a></span></td>
<?php } else { ?>

<td><strong><a href="?<?php echo $urlvc ?>&order_by_column=contract_name&search_contracts=<?php echo $search_for ?>" style="color: #ffffff;">Contract Name</a></strong></td>
<td><strong><a href="?<?php echo $urlvc ?>&order_by_column=contract_number&search_contracts=<?php echo $search_for ?>" style="color: #ffffff;">Contract No.</a></strong></td>
<td><strong><a href="?<?php echo $urlvc ?>&order_by_column=contract_expires&search_contracts=<?php echo $search_for ?>" style="color: #ffffff;">Expires</a></strong></td>
<td><strong><a href="?<?php echo $urlvc ?>&order_by_column=contract_vendor_name&search_contracts=<?php echo $search_for ?>" style="color: #ffffff;">Vendor Name</a></strong></td>
<td><strong><a href="?<?php echo $urlvc ?>&order_by_column=contract_contact_name&search_contracts=<?php echo $search_for ?>" style="color: #ffffff;">Contact Name</a></span></td>
<td><strong><a href="?<?php echo $urlvc ?>&order_by_column=contract_contact_phone&search_contracts=<?php echo $search_for ?>" style="color: #ffffff;">Contact Phone</a></span></td>
<?php
};
?>

<td><strong><a href="?<?php echo $urlvc ?>&order_by_column=contract_vendor_characteristics&search_contracts=<?php echo $search_for ?>" style="color: #ffffff;">Vendor Characteristics</a></strong></td>

</tr>
</thead>

Expand Down Expand Up @@ -193,7 +212,19 @@ get_header(); ?>

<!-- Contract ROWS -->
<tr>
<td><strong><?php echo get_the_title()?></strong></td>
<?php //Check Contract Type
if($contract_type == 'Construction-Awards' || $contract_type == 'Professional-Services-Awards')
{
?>
<td><strong><?php echo get_field('cpca_project_number')?></strong></td>
<td><strong><?php echo get_field('cpca_award_date')?></strong></td>
<td><?php echo get_field('cpca_award_description')?></td>
<td><strong><?php echo get_field('cpca_firm_awarded')?></strong></td>
<td><?php echo( get_field('cpca_contract_value') ) ?></td>
<td><a href="mailto:<?php echo get_field('cpca_contact_email')?>"><?php echo get_field('cpca_contact_name')?></a><br/><?php echo get_field('cpca_contact_phone')?></td>
<?php } else { ?>

<td><strong><?php echo get_the_title()?></strong></td>
<?php if ( ! empty( $file_url ) ){ ?>
<td><strong><a href="<?php echo $file_url ?>"><?php echo get_field('contract_number')?></a></strong></td>
<?php }else{ ?>
Expand All @@ -203,8 +234,10 @@ get_header(); ?>
<td><?php echo( get_field('contract_vendor_name') ) ?></td>
<td><?php echo get_field('contract_contact_name')?></td>
<td><?php echo get_field('contract_contact_phone')?></td>
<td>

<?php }; ?>

<td>

<div>

<?php
Expand Down