示例#1
0
    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 
    }
示例#2
0
if (c('Vanilla.Discussions.Layout') == 'table') {
    if (!function_exists('WriteDiscussionHeading')) {
        require_once $this->fetchViewLocation('table_functions');
    }
    ?>
    <div class="DataTableWrap">
        <table class="DataTable DiscussionsTable">
            <thead>
            <?php 
    WriteDiscussionHeading();
    ?>
            </thead>
            <tbody>
            <?php 
    foreach ($this->DiscussionData->result() as $Discussion) {
        WriteDiscussionRow($Discussion, $this, Gdn::session(), false);
    }
    ?>
            </tbody>
        </table>
    </div>
<?php 
} else {
    ?>
    <ul class="DataList Discussions">
        <?php 
    include $this->fetchViewLocation('discussions');
    ?>
    </ul>
<?php 
}
示例#3
0
<?php

if (!defined('APPLICATION')) {
    exit;
}
$Session = Gdn::Session();
include_once $this->FetchViewLocation('helper_functions', 'discussions', 'vanilla');
include_once $this->FetchViewLocation('table_functions', 'discussions', 'vanilla');
$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);
}
示例#4
0
if (C('Vanilla.Discussions.Layout') == 'table') {
    if (!function_exists('WriteDiscussionHeading')) {
        require_once $this->FetchViewLocation('table_functions');
    }
    ?>
   <div class="DataTableWrap">
   <table class="DataTable DiscussionsTable">
      <thead>
         <?php 
    WriteDiscussionHeading();
    ?>
      </thead>
      <tbody>
      <?php 
    foreach ($this->DiscussionData->Result() as $Discussion) {
        WriteDiscussionRow($Discussion, $this, Gdn::Session(), FALSE);
    }
    ?>
      </tbody>
   </table>
   </div>
   <?php 
} else {
    ?>
   <ul class="DataList Discussions">
      <?php 
    include $this->FetchViewLocation('discussions');
    ?>
   </ul>
   <?php 
}