Skip to content
Snippets Groups Projects
Commit 960891ca authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

add rss template

parent 47f293c7
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,8 @@ class UNL_Procurement_BidList extends ArrayIterator
{
function __construct($options = array())
{
if ($options['view'] == 'bids') {
//If the public list of bids (the bids view) is being shown, override $_GET['status'] so users can't see pending or archived bids
if (isset($options['view']) && $options['view'] == 'bids') {
$options['status'] = 'approved';
}
......
......@@ -58,14 +58,15 @@ class UNL_Procurement_Manager extends UNL_Procurement_LoginRequired
case 'pending':
case 'approved':
case 'archived':
$this->actionable[] = new UNL_Procurement_BidList(array('status' => $this->options['status']));
$this->actionable[] = new UNL_Procurement_BidList(array('status'=>$this->options['status']));
break;
}
}
function getBids($status = 'pending')
{
return new UNL_Procurement_BidList(array('status' => $status));
return new UNL_Procurement_BidList(array('status' => $status,
'view' => $this->options['view']));
}
/**
......
<?php echo $savvy->render($context->actionable); ?>
\ No newline at end of file
......@@ -25,14 +25,15 @@
<ul class="wdn_tabs disableSwitching">
<?php foreach (array('pending', 'approved', 'archived') as $status):
$class = '';
if ($context->options['status'] == $status) {
$class = ' class="selected"';
}
?>
<li <?php echo $class; ?>><a href="?view=manager&amp;status=<?php echo $status; ?>"><?php echo ucfirst($status); ?>
<sup><?php echo count($context->getBids($status)); ?></sup></a></li>
<?php foreach (array('pending', 'approved', 'archived') as $status) : ?>
<?php
$class = '';
if ($context->options['status'] == $status) {
$class = ' class="selected"';
}
?>
<li <?php echo $class; ?>><a href="?view=manager&amp;status=<?php echo $status; ?>"><?php echo ucfirst($status); ?>
<sup><?php echo count($context->getBids($status)); ?></sup></a></li>
<?php endforeach; ?>
</ul>
<?php
......
<item>
<title><?php echo $context->title; ?></title>
<link><?php echo UNL_Procurement_Controller::getURL(false).'?view=bid&amp;id='.$context->id; ?></link>
<description>
&lt;div&gt;<?php echo $context->description; ?>&lt;/div&gt;
&lt;div&gt;Date Due: <?php echo date('l, F jS g:i a T', strtotime($context->date_due)); ?>&lt;/div&gt;
</description>
<pubDate><?php echo date('r', strtotime($context->date_modified)); ?></pubDate>
<guid><?php echo UNL_Procurement_Controller::getURL(false); ?></guid>
</item>
\ No newline at end of file
<rss version="2.0">
<channel>
<title>University of Nebraska-Lincoln Procurement Services Bid Opportunities</title>
<link>http://procurement.unl.edu/</link>
<description>Featured Bid Opportunities from UNL Procurement Services</description>
<language>en-us</language>
<lastBuildDate><?php echo date("m/d/y : H:i:s", time()); ?></lastBuildDate>
<?php foreach ($context as $item) : ?>
<?php echo $savvy->render($item, 'Procurement/Bid.tpl.php'); ?>
<?php endforeach; ?>
</channel>
</rss>
\ No newline at end of file
<?php
echo $savvy->render($context->actionable);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment