function WriteDiscussionTable() { $c = Gdn::Controller(); ?> <div class="DataTableWrap"> <table class="DataTable DiscussionsTable"> <thead> <?php WriteDiscussionHeading(); ?> </thead> <tbody> <?php $Session = Gdn::Session(); $Alt = ''; $Announcements = $c->Data('Announcements'); if (is_a($Announcements, 'Gdn_DataSet')) { foreach ($Announcements->Result() as $Discussion) { $Alt = $Alt == ' Alt' ? '' : ' Alt'; WriteDiscussionRow($Discussion, $c, $Session, $Alt); } } $Alt = ''; $Discussions = $c->Data('Discussions'); if (is_a($Discussions, 'Gdn_DataSet')) { foreach ($Discussions->Result() as $Discussion) { $Alt = $Alt == ' Alt' ? '' : ' Alt'; // var_dump($Discussion); WriteDiscussionRow($Discussion, $c, $Session, $Alt); } } ?> </tbody> </table> </div> <?php }
/** * Write the discussion table wrapper. */ function writeDiscussionTable() { $c = Gdn::controller(); ?> <div class="DataTableWrap"> <table class="DataTable DiscussionsTable"> <thead> <?php WriteDiscussionHeading(); ?> </thead> <tbody> <?php $Session = Gdn::session(); $Announcements = $c->data('Announcements'); if (is_a($Announcements, 'Gdn_DataSet')) { foreach ($Announcements->result() as $Discussion) { writeDiscussionRow($Discussion, $c, $Session); } } $Discussions = $c->data('Discussions'); if (is_a($Discussions, 'Gdn_DataSet')) { foreach ($Discussions->result() as $Discussion) { // var_dump($Discussion); writeDiscussionRow($Discussion, $c, $Session); } } ?> </tbody> </table> </div> <?php }
$Description = $this->data('Category.Description', $this->Description()); echo wrapIf(Gdn_Format::htmlFilter($Description), 'div', array('class' => 'P PageDescription')); $this->fireEvent('AfterDescription'); include $this->fetchViewLocation('Subtree', 'Categories', 'Vanilla'); echo '<div class="PageControls Top">'; PagerModule::write($PagerOptions); echo Gdn_Theme::Module('NewDiscussionModule', $this->data('_NewDiscussionProperties', array('CssClass' => 'Button Action Primary'))); $this->fireEvent('PageControls'); echo '</div>'; if ($this->DiscussionData->numRows() > 0 || isset($this->AnnounceData) && is_object($this->AnnounceData) && $this->AnnounceData->numRows() > 0) { ?> <div class="DataTableWrap"> <table class="DataTable DiscussionsTable"> <thead> <?php WriteDiscussionHeading(); ?> </thead> <tbody> <?php $Alt = ''; if (property_exists($this, 'AnnounceData') && is_object($this->AnnounceData)) { foreach ($this->AnnounceData->result() as $Discussion) { $Alt = $Alt == ' Alt' ? '' : ' Alt'; WriteDiscussionRow($Discussion, $this, $Session, $Alt); } } $Alt = ''; foreach ($this->DiscussionData->result() as $Discussion) { $Alt = $Alt == ' Alt' ? '' : ' Alt'; WriteDiscussionRow($Discussion, $this, $Session, $Alt);