protected function renderViewForAgreementWithAgmntProduct(Portlet $portlet)
 {
     if ($this->params['relationModel']->modelClassNameToBean['Agreement']->id != null) {
         $id = $this->params['relationModel']->modelClassNameToBean['Agreement']->id;
         $data = $this::getAllAgreementProducts($this->params['relationModel']->modelClassNameToBean['Agreement']->id);
         if (count($data) > 0) {
             $content = $portlet->renderContent();
             $tableCreation = '<div class="view-toolbar-container clearfix"><div class="panel"><div class="panelTitle">Agreement Products</div>';
             //$tableCreation .= '<div><table style="padding-left: 3%; text-align: right; vertical-align: top;" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="pbTitle">&nbsp;</td><td id="thePage:theTable:theSelectedBlock:j_id3" class="pbButton "><input type="submit" name="thePage:theTable:theSelectedBlock:j_id3:j_id5" value="Estimator Summary" onclick="top.location.replace(\'/apex/OpportunitProductsSummary?id=006j000000Ljedx\');return false;" class="btn"></td></tr></tbody></table></div>';
             //$tableCreation .= '<div class="form-toolbar clearfix"><a id="addProduct" name="Add Products" class="attachLoading z-button" href="/app/index.php/agreementProducts/default/AddProductsInAgreement?optId='.$id.'"><span class="z-spinner"></span><span class="z-icon"></span><span class="z-label">Add Product</span></a><div class="post-to-profile clearfix"> <a id="estimateSummary" name="Estimate Summary" class="attachLoading z-button" onclick="/" href="#"><span class="z-spinner"></span><span class="z-icon"></span><span class="z-label">Estimate Summary</span></a></div></div>';
             $tableCreation .= '<table style="padding-left: 3%; text-align: right; vertical-align: top;"  border="0" cellpadding="2" cellspacing="0" width="100%">
                     <colgroup span="5"></colgroup>';
             $tableCreation .= '<thead style="font-weight: bold; background-color:#E6E6E6; color: #999; vertical-align: inherit; padding: 5px;"><th style="font-weight: bold;">Product Code</th><th style="font-weight: bold;">Product</th><th style="font-weight: bold;">Quantity</th><th style="font-weight: bold;">Frequency</th><th style="font-weight: bold;">Unit of Measure</th></thead><tbody>';
             foreach ($data as $row) {
                 $tableCreation .= '<tr><td style="width: 20%;  padding-top: 2px; text-align: left;">' . $row['name'] . '</td><td style="width: 40%;  padding-top: 2px; text-align: left;">' . $row['name'] . '</td><td style="width: 13%;  padding-top: 2px; text-align: center;">' . $row['quantity'] . '</td><td style="width: 13%;  padding-top: 2px; text-align: center;">' . $row['frequency'] . '</td><td style="width: 14%;  padding-top: 2px; text-align: center;">' . $row['total_mhr'] . '</td></tr>';
             }
             $tableCreation .= '</tbody></table></div></div>';
             $content .= $tableCreation;
             return $content;
         } else {
             return $portlet->renderContent();
         }
     } else {
         return $portlet->renderContent();
     }
 }