/**
  * Build HTML.
  *
  * @return string HTML.
  */
 public function toString()
 {
     if ($this->_UserData->numRows() == 0) {
         return '';
     }
     $String = '';
     ob_start();
     ?>
     <div class="Box BoxInThisDiscussion">
         <?php 
     echo panelHeading(t('In this Discussion'));
     ?>
         <ul class="PanelInfo PanelInThisDiscussion">
             <?php 
     foreach ($this->_UserData->Result() as $User) {
         ?>
                 <li>
                     <?php 
         echo anchor(wrap(wrap(Gdn_Format::date($User->DateLastActive, 'html')), 'span', array('class' => 'Aside')) . ' ' . wrap(wrap(val('Name', $User), 'span', array('class' => 'Username')), 'span'), userUrl($User));
         ?>
                 </li>
             <?php 
     }
     ?>
         </ul>
     </div>
     <?php 
     $String = ob_get_clean();
     return $String;
 }
 public function ToString()
 {
     if ($this->_UserData->NumRows() == 0) {
         return '';
     }
     $String = '';
     ob_start();
     ?>
   <div class="Box">
      <?php 
     echo panelHeading(T('In this Discussion'));
     ?>
      <ul class="PanelInfo">
         <?php 
     foreach ($this->_UserData->Result() as $User) {
         ?>
            <li>
               <?php 
         echo Anchor(Wrap(Wrap(Gdn_Format::Date($User->DateLastActive, 'html')), 'span', array('class' => 'Aside')) . ' ' . Wrap(Wrap(GetValue('Name', $User), 'span', array('class' => 'Username')), 'span'), UserUrl($User));
         ?>
            </li>
         <?php 
     }
     ?>
      </ul>
   </div>
   <?php 
     $String = ob_get_contents();
     @ob_end_clean();
     return $String;
 }
<?php

if (!defined('APPLICATION')) {
    exit;
}
?>
<div class="Box InThisConversation">
   <?php 
echo panelHeading(T('In this Conversation'));
?>
   <ul class="PanelInfo">
   <?php 
foreach ($this->Data->Result() as $User) {
    ?>
      <li>
         <?php 
    $Username = htmlspecialchars(GetValue('Name', $User));
    $Photo = GetValue('Photo', $User);
    if (GetValue('Deleted', $User)) {
        echo Anchor(Wrap(Img($Photo, array('class' => 'ProfilePhoto ProfilePhotoSmall')) . ' ' . Wrap($Username, 'del', array('class' => 'Username')), 'span', array('class' => 'Conversation-User')), UserUrl($User), array('title' => sprintf(T('%s has left this conversation.'), $Username)));
    } else {
        echo Anchor(Wrap(Img($Photo, array('class' => 'ProfilePhoto ProfilePhotoSmall')) . ' ' . Wrap($Username, 'span', array('class' => 'Username')), 'span', array('class' => 'Conversation-User')), UserUrl($User));
    }
    ?>
      </li>
   <?php 
}
?>
   </ul>
</div>
<?php

if (!defined('APPLICATION')) {
    exit;
}
?>
<div class="Box Moderators">
    <?php 
echo panelHeading(t('Moderators'));
?>
    <ul class="PanelInfo">
        <?php 
foreach ($this->ModeratorData[0]->Moderators as $Mod) {
    $Mod = UserBuilder($Mod);
    echo '<li>' . UserPhoto($Mod, 'Small') . ' ' . UserAnchor($Mod) . '</li>';
}
?>
    </ul>
</div>
Beispiel #5
0
<?php

if (!defined('APPLICATION')) {
    exit;
}
?>
<div class="Box BoxDrafts">
    <?php 
echo panelHeading(t('My Drafts'));
?>
    <ul class="PanelInfo PanelDiscussions">
        <?php 
foreach ($this->Data->result() as $Draft) {
    $EditUrl = !is_numeric($Draft->DiscussionID) || $Draft->DiscussionID <= 0 ? '/post/editdiscussion/0/' . $Draft->DraftID : '/post/editcomment/0/' . $Draft->DraftID;
    ?>
            <li>
                <strong><?php 
    echo anchor($Draft->Name, $EditUrl);
    ?>
</strong>
                <?php 
    echo anchor(sliceString(Gdn_Format::text($Draft->Body), 200), $EditUrl, 'DraftCommentLink');
    ?>
            </li>
        <?php 
}
?>
        <li class="ShowAll"><?php 
echo anchor(t('↳ Show All'), 'drafts');
?>
</li>
			</div><!-- /.col-lg-12 -->
		</div><!-- /.row -->
		
		<div class="row">
			<?php 
panelHeading("user", "Users", "fa-users", "panel-primary");
?>
			<?php 
panelHeading("ticket", "Open Tickets", "fa-ticket", "panel-yellow");
?>
			<?php 
panelHeading("comment", "Replies", "fa-reply-all", "panel-green");
?>
 
			<?php 
panelHeading("location", "Locations", "fa-bus", "panel-red");
?>
		</div><!-- /.row -->
		
		<div class="row">
			<div class="col-md-8">
				<div class="panel panel-default">
					<div class="panel-heading">
					Pie Chart
					</div><!-- /.panel-heading -->
					<div class="panel-body">
						<div class="flot-chart">
							<div class="flot-chart-content" id="flot-pie-chart"></div>
						</div>
					</div><!-- /.panel-body -->
				</div><!-- /.panel -->
Beispiel #7
0
    /**
     *
     *
     * @return string
     */
    public function toString()
    {
        if (!$this->_TagData) {
            $this->getData();
        }
        if ($this->_TagData->numRows() == 0) {
            return '';
        }
        $String = '';
        ob_start();
        ?>
        <div class="Box Tags">
            <?php 
        echo panelHeading(t($this->ParentID > 0 ? 'Tagged' : 'Popular Tags'));
        ?>
            <ul class="TagCloud">
                <?php 
        foreach ($this->_TagData->result() as $Tag) {
            ?>
                    <?php 
            if ($Tag['Name'] != '') {
                ?>
                        <li><?php 
                echo anchor(TagFullName($Tag) . ' ' . Wrap(number_format($Tag['CountDiscussions']), 'span', array('class' => 'Count')), TagUrl($Tag, '', '/'), array('class' => 'Tag_' . str_replace(' ', '_', $Tag['Name'])));
                ?>
</li>
                    <?php 
            }
            ?>
                <?php 
        }
        ?>
            </ul>
        </div>
        <?php 
        $String = ob_get_contents();
        @ob_end_clean();
        return $String;
    }
<?php

if (!defined('APPLICATION')) {
    exit;
}
require_once $this->fetchViewLocation('helper_functions');
if (!isset($this->Prefix)) {
    $this->Prefix = 'Discussion';
}
?>
<div class="Box BoxDiscussions">
    <?php 
echo panelHeading(t('Recent Discussions'));
?>
    <ul class="PanelInfo PanelDiscussions DataList">
        <?php 
foreach ($this->data('Discussions')->result() as $Discussion) {
    WriteModuleDiscussion($Discussion, $this->Prefix);
}
if ($this->data('Discussions')->numRows() >= $this->Limit) {
    ?>
            <li class="ShowAll"><?php 
    echo anchor(t('More…'), 'discussions');
    ?>
</li>
        <?php 
}
?>
    </ul>
</div>
Beispiel #9
0
<?php

if (!defined('APPLICATION')) {
    exit;
}
require_once $this->FetchViewLocation('helper_functions');
?>
<div class="Box BoxPromoted">
   <?php 
echo panelHeading(T('Promoted Content'));
?>
   <div class="PanelInfo DataList">
      <?php 
$Content = $this->Data('Content');
$ContentItems = sizeof($Content);
if ($Content) {
    if ($this->Group) {
        $Content = array_chunk($Content, $this->Group);
    }
    foreach ($Content as $ContentChunk) {
        if ($this->Group) {
            echo '<div class="PromotedGroup">';
            foreach ($ContentChunk as $ContentItem) {
                WritePromotedContent($ContentItem, $this);
            }
            echo '</div>';
        } else {
            WritePromotedContent($ContentChunk, $this);
        }
    }
}
Beispiel #10
0
<?php

if (!defined('APPLICATION')) {
    exit;
}
?>
<div class="Box AddPeople">
    <?php 
echo panelHeading(t('Add People to this Conversation'));
echo $this->Form->open(array('id' => 'Form_AddPeople'));
echo wrap($this->Form->textBox('AddPeople', array('MultiLine' => true, 'class' => 'MultiComplete')), 'div', array('class' => 'TextBoxWrapper'));
echo $this->Form->close('Add', '', array('class' => 'Button Action'));
?>
</div>
Beispiel #11
0
<?php

if (!defined('APPLICATION')) {
    exit;
}
$CountDiscussions = 0;
$CategoryID = isset($this->_Sender->CategoryID) ? $this->_Sender->CategoryID : '';
$OnCategories = strtolower($this->_Sender->ControllerName) == 'categoriescontroller' && !is_numeric($CategoryID);
if ($this->Data !== FALSE) {
    foreach ($this->Data->result() as $Category) {
        $CountDiscussions = $CountDiscussions + $Category->CountDiscussions;
    }
    ?>
    <div class="Box BoxCategories">
        <?php 
    echo panelHeading(t('Categories'));
    ?>
        <ul class="PanelInfo PanelCategories">
            <?php 
    echo '<li' . ($OnCategories ? ' class="Active"' : '') . '>' . anchor('<span class="Aside"><span class="Count">' . BigPlural($CountDiscussions, '%s discussion') . '</span></span> ' . t('All Categories'), '/categories', 'ItemLink') . '</li>';
    $MaxDepth = c('Vanilla.Categories.MaxDisplayDepth');
    foreach ($this->Data->result() as $Category) {
        if ($Category->CategoryID < 0 || $MaxDepth > 0 && $Category->Depth > $MaxDepth) {
            continue;
        }
        if ($Category->DisplayAs === 'Heading') {
            $CssClass = 'Heading ' . $Category->CssClass;
        } else {
            $CssClass = 'Depth' . $Category->Depth . ($CategoryID == $Category->CategoryID ? ' Active' : '') . ' ' . $Category->CssClass;
        }
        echo '<li class="ClearFix ' . $CssClass . '">';
<?php

if (!defined('APPLICATION')) {
    exit;
}
require_once Gdn::controller()->fetchViewLocation('helper_functions', 'modules', 'vanilla');
?>
<div class="Box BoxPromoted">
    <?php 
echo panelHeading(t('Announcements'));
?>
    <div class="PanelInfo DataList">
        <?php 
$Content = $this->data('Content');
$ContentItems = sizeof($Content);
if ($Content) {
    if ($this->Group) {
        $Content = array_chunk($Content, $this->Group);
    }
    foreach ($Content as $ContentChunk) {
        if ($this->Group) {
            echo '<div class="PromotedGroup">';
            foreach ($ContentChunk as $ContentItem) {
                WritePromotedContent($ContentItem, $this);
            }
            echo '</div>';
        } else {
            WritePromotedContent($ContentChunk, $this);
        }
    }
}