Skip to content
Snippets Groups Projects
Commit e975d681 authored by Jared Hancock's avatar Jared Hancock
Browse files

kb: New concept for landing page and FAQ view

Move the attachments to the sidebar, add the concept of language-specific
attachments. Add a sidebar to the front page. De-emphasize the "open new
ticket" button. Add a knowledge base search feature to front page and also
add the concept of "featured" articles and categories on the front page.
parent c9379583
Branches
Tags
No related merge requests found
...@@ -238,13 +238,13 @@ h2, .subject { ...@@ -238,13 +238,13 @@ h2, .subject {
.button, .button,
.button:visited { .button:visited {
background: #222; background: #222;
border: none;
display: inline-block; display: inline-block;
font-size: 16px; font-size: 16px;
padding: 8px 16px 6px 16px; padding: 4px 16px 4px 16px;
max-width: 220px; max-width: 220px;
text-align: center; text-align: center;
color: #fff; color: #fff;
font-weight: bold;
text-decoration: none; text-decoration: none;
border-radius: 5px; border-radius: 5px;
-moz-border-radius: 5px; -moz-border-radius: 5px;
...@@ -401,13 +401,15 @@ body { ...@@ -401,13 +401,15 @@ body {
} }
.front-page-button { .front-page-button {
} }
#landing_page .welcome {
width: 560px;
}
#landing_page #new_ticket { #landing_page #new_ticket {
margin-top: 40px; margin-top: 40px;
background: url('../images/new_ticket_icon.png') top left no-repeat; background: url('../images/new_ticket_icon.png') top left no-repeat;
} }
#landing_page #new_ticket, #landing_page #new_ticket,
#landing_page #check_status, #landing_page #check_status {
.front-page-button {
width: 295px; width: 295px;
padding-left: 75px; padding-left: 75px;
} }
...@@ -415,12 +417,8 @@ body { ...@@ -415,12 +417,8 @@ body {
margin-top: 40px; margin-top: 40px;
background: url('../images/check_status_icon.png') top left no-repeat; background: url('../images/check_status_icon.png') top left no-repeat;
} }
.rtl #landing_page #new_ticket, #landing_page h1, #landing_page h2, #landing_page h3 {
.rtl #landing_page #check_status, margin-bottom: 10px;
.rtl .front-page-button {
padding-left: 0;
padding-right: 75px;
background-position: top right;
} }
/* Landing page FAQ not yet implemented. */ /* Landing page FAQ not yet implemented. */
#faq { #faq {
...@@ -470,10 +468,7 @@ body { ...@@ -470,10 +468,7 @@ body {
margin: 0; margin: 0;
background: url(../images/kb_category_bg.png) bottom left repeat-x; background: url(../images/kb_category_bg.png) bottom left repeat-x;
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
} display: block;
#kb > li h4 {
padding-bottom: 3px;
margin-bottom: 3px;
} }
#kb > li h4 span { #kb > li h4 span {
color: #666; color: #666;
...@@ -489,6 +484,43 @@ body { ...@@ -489,6 +484,43 @@ body {
margin-right: 6px; margin-right: 6px;
background: url(../images/kb_large_folder.png) top left no-repeat; background: url(../images/kb_large_folder.png) top left no-repeat;
} }
.featured-category {
margin-top: 10px;
width: 49.7%;
display: inline-block;
box-sizing: border-box;
}
.category-name {
display: inline-block;
font-weight: 400;
font-size: 120%;
}
.featured-category i {
color: rgba(0,174,239, 0.8);
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
display: inline-block;
vertical-align: middle;
}
.article-headline {
margin-left: 34px;
}
.rtl .article-headline {
margin-left: 0;
margin-right: 34px;
}
.article-teaser {
font-size: 90%;
line-height: 1.5em;
height: 3em;
overflow: hidden;
}
.article-title {
font-weight: 400;
}
.faq-content .article-title {
font-size: 16pt;
margin-top: 15px;
}
#kb-search { #kb-search {
padding: 10px 0; padding: 10px 0;
overflow: hidden; overflow: hidden;
...@@ -935,3 +967,58 @@ img.sign-in-image { ...@@ -935,3 +967,58 @@ img.sign-in-image {
.flush-left { .flush-left {
text-align: left; text-align: left;
} }
.sidebar {
margin-bottom: 20px;
margin-left: 20px;
}
#landing_page .sidebar {
width: 220px;
}
.rtl .sidebar {
margin-left: 0;
margin-right: 20px;
}
.sidebar .content {
padding: 10px; border: 1px solid #C8DDFA; background: #F7FBFE;
}
.sidebar section .header {
font-weight: bold;
}
.sidebar section + section {
margin-top: 15px;
}
.search-form {
padding: 12px 0px 20px 0;
}
.searchbar .search,
.search-form .search {
display: inline-block;
width: 400px;
border-radius: 5px;
border: 1px solid #ccc;
padding: 5px 10px;
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
}
.searchbar .search {
width: 100%;
box-sizing: border-box;
margin-bottom: 10px;
}
.bleed {
margin: 0 !important;
padding: 0 !important;
}
.row {
}
.span4 {
display: inline-block;
width: 31%;
margin: 0 1%;
}
.span8 {
display: inline-block;
width: 65%;
margin: 0 1%;
}
...@@ -38,6 +38,13 @@ class Category extends VerySimpleModel { ...@@ -38,6 +38,13 @@ class Category extends VerySimpleModel {
function isPublic() { return $this->ispublic; } function isPublic() { return $this->ispublic; }
function getHashtable() { return $this->ht; } function getHashtable() { return $this->ht; }
function getTopArticles() {
return $this->faqs
->filter(Q::not(array('ispublished'=>0)))
->order_by('-ispublished', '-views')
->limit(5);
}
/* ------------------> Setter methods <--------------------- */ /* ------------------> Setter methods <--------------------- */
function setName($name) { $this->name=$name; } function setName($name) { $this->name=$name; }
function setNotes($notes) { $this->notes=$notes; } function setNotes($notes) { $this->notes=$notes; }
...@@ -97,7 +104,7 @@ class Category extends VerySimpleModel { ...@@ -97,7 +104,7 @@ class Category extends VerySimpleModel {
function save($refetch=false) { function save($refetch=false) {
if ($this->dirty) if ($this->dirty)
$this->updated = SqlFunction::NOW(); $this->updated = SqlFunction::NOW();
return parent::save($refetch); return parent::save($refetch || $this->dirty);
} }
/* ------------------> Static methods <--------------------- */ /* ------------------> Static methods <--------------------- */
...@@ -117,7 +124,13 @@ class Category extends VerySimpleModel { ...@@ -117,7 +124,13 @@ class Category extends VerySimpleModel {
))->one(); ))->one();
} }
static function create($vars) { static function getFeatured() {
return self::objects()->filter(array(
'ispublic'=>2
));
}
static function create($vars=false) {
$category = parent::create($vars); $category = parent::create($vars);
$category->created = SqlFunction::NOW(); $category->created = SqlFunction::NOW();
return $category; return $category;
......
...@@ -44,7 +44,7 @@ class Draft extends VerySimpleModel { ...@@ -44,7 +44,7 @@ class Draft extends VerySimpleModel {
$attrs[] = sprintf('data-draft-object-id="%s"', Format::htmlchars($id)); $attrs[] = sprintf('data-draft-object-id="%s"', Format::htmlchars($id));
$criteria['namespace'] .= '.' . $id; $criteria['namespace'] .= '.' . $id;
} }
if ($draft = static::lookup($criteria)) { if ($draft = static::objects()->filter($criteria)->first()) {
$attrs[] = sprintf('data-draft-id="%s"', $draft->getId()); $attrs[] = sprintf('data-draft-id="%s"', $draft->getId());
$draft_body = $draft->getBody(); $draft_body = $draft->getBody();
} }
......
...@@ -21,6 +21,7 @@ class FAQ extends VerySimpleModel { ...@@ -21,6 +21,7 @@ class FAQ extends VerySimpleModel {
'table' => FAQ_TABLE, 'table' => FAQ_TABLE,
'pk' => array('faq_id'), 'pk' => array('faq_id'),
'ordering' => array('question'), 'ordering' => array('question'),
'defer' => array('answer'),
'joins' => array( 'joins' => array(
'category' => array( 'category' => array(
'constraint' => array( 'constraint' => array(
...@@ -49,6 +50,9 @@ class FAQ extends VerySimpleModel { ...@@ -49,6 +50,9 @@ class FAQ extends VerySimpleModel {
function getAnswerWithImages() { function getAnswerWithImages() {
return Format::viewableImages($this->answer, ROOT_PATH.'image.php'); return Format::viewableImages($this->answer, ROOT_PATH.'image.php');
} }
function getTeaser() {
return Format::truncate(Format::striptags($this->answer), 150);
}
function getSearchableAnswer() { function getSearchableAnswer() {
return ThreadBody::fromFormattedText($this->answer, 'html') return ThreadBody::fromFormattedText($this->answer, 'html')
->getSearchable(); ->getSearchable();
...@@ -71,6 +75,13 @@ class FAQ extends VerySimpleModel { ...@@ -71,6 +75,13 @@ class FAQ extends VerySimpleModel {
return $ids; return $ids;
} }
function getHelpTopicNames() {
$names = array();
foreach ($this->getHelpTopics() as $topic)
$names[] = $topic->getFullName();
return $names;
}
function getHelpTopics() { function getHelpTopics() {
//XXX: change it to obj (when needed)! //XXX: change it to obj (when needed)!
...@@ -105,6 +116,11 @@ class FAQ extends VerySimpleModel { ...@@ -105,6 +116,11 @@ class FAQ extends VerySimpleModel {
return $this->save(); return $this->save();
} }
function logView() {
$this->views++;
$this->save();
}
function printPdf() { function printPdf() {
global $thisstaff; global $thisstaff;
require_once(INCLUDE_DIR.'mpdf/mpdf.php'); require_once(INCLUDE_DIR.'mpdf/mpdf.php');
...@@ -306,10 +322,20 @@ class FAQ extends VerySimpleModel { ...@@ -306,10 +322,20 @@ class FAQ extends VerySimpleModel {
} }
static function countPublishedFAQs() { static function countPublishedFAQs() {
return self::objects()->filter(array( static $count;
'category__ispublic' => true, if (!isset($count)) {
'ispublished'=> true $count = self::objects()->filter(array(
))->count(); 'category__ispublic__gt' => 0,
'ispublished__gt'=> 0
))->count();
}
return $count;
}
static function getFeatured() {
return self::objects()
->filter(array('ispublished__in'=>array(1,2), 'category__ispublic'=>1))
->order_by('-ispublished','-views');
} }
static function findIdByQuestion($question) { static function findIdByQuestion($question) {
...@@ -355,7 +381,7 @@ class FAQ extends VerySimpleModel { ...@@ -355,7 +381,7 @@ class FAQ extends VerySimpleModel {
$this->category = $category; $this->category = $category;
$this->ispublished = !!$vars['ispublished']; $this->ispublished = !!$vars['ispublished'];
$this->notes = Format::sanitize($vars['notes']); $this->notes = Format::sanitize($vars['notes']);
$this->keywords = ''; $this->keywords = ' ';
if (!$this->save()) if (!$this->save())
return false; return false;
......
...@@ -240,7 +240,7 @@ class Internationalization { ...@@ -240,7 +240,7 @@ class Internationalization {
); );
} }
} }
uasort($installed, function($a, $b) { return strcasecmp($a['code'], $b['code']); }); ksort($installed);
return $cache = $installed; return $cache = $installed;
} }
......
...@@ -4,29 +4,64 @@ if(!defined('OSTCLIENTINC') || !$faq || !$faq->isPublished()) die('Access Denie ...@@ -4,29 +4,64 @@ if(!defined('OSTCLIENTINC') || !$faq || !$faq->isPublished()) die('Access Denie
$category=$faq->getCategory(); $category=$faq->getCategory();
?> ?>
<div class="row">
<div class="span8">
<h1><?php echo __('Frequently Asked Questions');?></h1> <h1><?php echo __('Frequently Asked Questions');?></h1>
<div id="breadcrumbs"> <div id="breadcrumbs">
<a href="index.php"><?php echo __('All Categories');?></a> <a href="index.php"><?php echo __('All Categories');?></a>
&raquo; <a href="faq.php?cid=<?php echo $category->getId(); ?>"><?php echo $category->getName(); ?></a> &raquo; <a href="faq.php?cid=<?php echo $category->getId(); ?>"><?php echo $category->getName(); ?></a>
</div> </div>
<div style="width:700px;padding-top:2px;" class="pull-left">
<strong style="font-size:16px;"><?php echo $faq->getLocalQuestion() ?></strong> <div class="faq-content">
<div class="article-title flush-left">
<?php echo $faq->getLocalQuestion() ?>
</div> </div>
<div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;"></div> <div class="faded"><?php echo __('Last updated').' '.Format::db_daydatetime($category->getUpdateDate()); ?></div>
<div class="clear"></div> <br/>
<p> <div class="thread-body bleed">
<?php echo Format::safe_html($faq->getLocalAnswerWithImages()); ?> <?php echo Format::safe_html($faq->getLocalAnswerWithImages()); ?>
</p> </div>
<p> </div>
<?php </div>
if($faq->getNumAttachments()) { ?>
<div><span class="faded"><b><?php echo __('Attachments');?>:</b></span> <?php echo $faq->getAttachmentsLinks(); ?></div>
<?php
} ?>
<div class="article-meta"><span class="faded"><b><?php echo __('Help Topics');?>:</b></span> <div class="span4 pull-right">
<?php echo ($topics=$faq->getHelpTopics())?implode(', ',$topics):' '; ?> <div class="sidebar">
<div class="searchbar">
<form method="get" action="faq.php">
<input type="hidden" name="a" value="search"/>
<input type="text" name="q" class="search" placeholder="<?php
echo __('Search our knowledge base'); ?>"/>
<input type="submit" style="display:none" value="search"/>
</form>
</div> </div>
</p> <div class="content">
<hr> <?php if ($attachments = $faq->getVisibleAttachments()) { ?>
<div class="faded">&nbsp;<?php echo __('Last updated').' '.Format::db_daydatetime($category->getUpdateDate()); ?></div> <section>
<strong><?php echo __('Attachments');?>:</strong>
<?php foreach ($attachments as $att) { ?>
<div>
<a href="file.php?h=<?php echo $att['download']; ?>" class="no-pjax">
<i class="icon-file"></i>
<?php echo Format::htmlchars($att['name']); ?>
</a>
</div>
<?php } ?>
</section>
<?php } ?>
<?php if ($faq->getHelpTopics()->count()) { ?>
<section>
<strong><?php echo __('Help Topics'); ?></strong>
<?php foreach ($faq->getHelpTopics() as $topic) { ?>
<div><?php echo $topic->getFullName(); ?></div>
<?php } ?>
</section>
<?php } ?>
</div>
</div>
</div>
</div>
<?php $faq->logView(); ?>
...@@ -6,47 +6,21 @@ if(!defined('OSTCLIENTINC')) die('Access Denied'); ...@@ -6,47 +6,21 @@ if(!defined('OSTCLIENTINC')) die('Access Denied');
<form action="index.php" method="get" id="kb-search"> <form action="index.php" method="get" id="kb-search">
<input type="hidden" name="a" value="search"> <input type="hidden" name="a" value="search">
<div> <div>
<input id="query" type="text" size="20" name="q" value="<?php echo Format::htmlchars($_REQUEST['q']); ?>"> <input id="query" type="text" size="20" name="q" value="<?php echo Format::htmlchars($_REQUEST['q']); ?>">
<select name="cid" id="cid">
<option value="">&mdash; <?php echo __('All Categories');?> &mdash;</option>
<?php
$sql='SELECT category_id, name, count(faq.category_id) as faqs '
.' FROM '.FAQ_CATEGORY_TABLE.' cat '
.' LEFT JOIN '.FAQ_TABLE.' faq USING(category_id) '
.' WHERE cat.ispublic=1 AND faq.ispublished=1 '
.' GROUP BY cat.category_id '
.' HAVING faqs>0 '
.' ORDER BY cat.name DESC ';
if(($res=db_query($sql)) && db_num_rows($res)) {
while($row=db_fetch_array($res))
echo sprintf('<option value="%d" %s>%s (%d)</option>',
$row['category_id'],
($_REQUEST['cid'] && $row['category_id']==$_REQUEST['cid']?'selected="selected"':''),
$row['name'],
$row['faqs']);
}
?>
</select>
<input id="searchSubmit" type="submit" value="<?php echo __('Search');?>"> <input id="searchSubmit" type="submit" value="<?php echo __('Search');?>">
</div> </div>
<div> <div class="sidebar">
<select name="topicId" id="topic-id"> <select name="topicId" id="topic-id">
<option value="">&mdash; <?php echo __('All Help Topics');?> &mdash;</option> <option value="">&mdash; <?php echo __('All Help Topics');?> &mdash;</option>
<?php <?php
$sql='SELECT ht.topic_id, CONCAT_WS(" / ", pht.topic, ht.topic) as helptopic, count(faq.topic_id) as faqs ' foreach (Topic::objects()
.' FROM '.TOPIC_TABLE.' ht ' ->annotate(array('faqs_count'=>Aggregate::count('faqs')))
.' LEFT JOIN '.TOPIC_TABLE.' pht ON (pht.topic_id=ht.topic_pid) ' ->filter(array('faqs_count__gt'=>0))
.' LEFT JOIN '.FAQ_TOPIC_TABLE.' faq ON(faq.topic_id=ht.topic_id) ' as $t) {
.' WHERE ht.ispublic=1 ' echo sprintf('<option value="%d" %s>%s</option>',
.' GROUP BY ht.topic_id ' $t->getId(),
.' HAVING faqs>0 ' ($_REQUEST['topicId'] && $t->getId() == $_REQUEST['topicId']?'selected="selected"':''),
.' ORDER BY helptopic '; $t->getFullName());
if(($res=db_query($sql)) && db_num_rows($res)) {
while($row=db_fetch_array($res))
echo sprintf('<option value="%d" %s>%s (%d)</option>',
$row['topic_id'],
($_REQUEST['topicId'] && $row['topic_id']==$_REQUEST['topicId']?'selected="selected"':''),
$row['helptopic'], $row['faqs']);
} }
?> ?>
</select> </select>
...@@ -94,28 +68,26 @@ if($_REQUEST['q'] || $_REQUEST['cid'] || $_REQUEST['topicId']) { //Search. ...@@ -94,28 +68,26 @@ if($_REQUEST['q'] || $_REQUEST['cid'] || $_REQUEST['topicId']) { //Search.
echo '<strong class="faded">'.__('The search did not match any FAQs.').'</strong>'; echo '<strong class="faded">'.__('The search did not match any FAQs.').'</strong>';
} }
} else { //Category Listing. } else { //Category Listing.
$sql='SELECT cat.category_id, cat.name, cat.description, cat.ispublic, count(faq.faq_id) as faqs ' $categories = Category::objects()
.' FROM '.FAQ_CATEGORY_TABLE.' cat ' ->filter(array('ispublic'=>true, 'faqs__ispublished'=>true))
.' LEFT JOIN '.FAQ_TABLE.' faq ON(faq.category_id=cat.category_id AND faq.ispublished=1) ' ->annotate(array('faq_count'=>Aggregate::count('faqs')))
.' WHERE cat.ispublic=1 ' ->filter(array('faq_count__gt'=>0));
.' GROUP BY cat.category_id ' if ($categories->all()) {
.' HAVING faqs>0 '
.' ORDER BY cat.name';
if(($res=db_query($sql)) && db_num_rows($res)) {
echo '<div>'.__('Click on the category to browse FAQs.').'</div> echo '<div>'.__('Click on the category to browse FAQs.').'</div>
<ul id="kb">'; <ul id="kb">';
while($row=db_fetch_array($res)) {
echo sprintf(' foreach ($categories as $C) { ?>
<li> <li><i></i>
<i></i> <h4><?php echo sprintf('<a href="faq.php?cid=%d">%s (%d)</a>',
<h4><a href="faq.php?cid=%d">%s (%d)</a></h4> $C->getId(), Format::htmlchars($C->name), $C->faq_count); ?></h4>
%s <?php echo Format::safe_html($C->description); ?>
</li>',$row['category_id'], <?php foreach ($C->faqs->order_by('-view')->limit(5) as $F) { ?>
Format::htmlchars($row['name']),$row['faqs'], <div class="popular-faq"><?php echo $F->question; ?></div>
Format::safe_html($row['description'])); <?php } ?>
} </li>
echo '</ul>'; <?php } ?>
</ul>
<?php
} else { } else {
echo __('NO FAQs found'); echo __('NO FAQs found');
} }
......
...@@ -11,7 +11,7 @@ $category=$faq->getCategory(); ...@@ -11,7 +11,7 @@ $category=$faq->getCategory();
<span class="faded">(<?php echo $category->isPublic()?__('Public'):__('Internal'); ?>)</span> <span class="faded">(<?php echo $category->isPublic()?__('Public'):__('Internal'); ?>)</span>
</div> </div>
<div class="pull-right faq-meta"> <div class="pull-right sidebar faq-meta">
<?php if ($attachments = $faq->getVisibleAttachments()) { ?> <?php if ($attachments = $faq->getVisibleAttachments()) { ?>
<section> <section>
<strong><?php echo __('Attachments');?>:</strong> <strong><?php echo __('Attachments');?>:</strong>
......
...@@ -36,7 +36,7 @@ if(!defined('OSTSCPINC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access D ...@@ -36,7 +36,7 @@ if(!defined('OSTSCPINC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access D
</form> </form>
</div> </div>
</div> </div>
<div id="sidebar"> <div class="sidebar pull-right">
<h3><?php echo __('Upgrade Tips');?></h3> <h3><?php echo __('Upgrade Tips');?></h3>
<p>1. <?php echo __('Remember to back up your osTicket database');?></p> <p>1. <?php echo __('Remember to back up your osTicket database');?></p>
<p>2. <?php echo sprintf(__('Refer to %1$s Upgrade Guide %2$s for the latest tips'), '<a href="http://osticket.com/wiki/Upgrade_and_Migration" target="_blank">', '</a>');?></p> <p>2. <?php echo sprintf(__('Refer to %1$s Upgrade Guide %2$s for the latest tips'), '<a href="http://osticket.com/wiki/Upgrade_and_Migration" target="_blank">', '</a>');?></p>
......
...@@ -14,51 +14,98 @@ ...@@ -14,51 +14,98 @@
vim: expandtab sw=4 ts=4 sts=4: vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/ **********************************************************************/
require('client.inc.php'); require('client.inc.php');
require_once INCLUDE_DIR . 'class.page.php';
$section = 'home'; $section = 'home';
require(CLIENTINC_DIR.'header.inc.php'); require(CLIENTINC_DIR.'header.inc.php');
?> ?>
<div id="landing_page"> <div id="landing_page">
<?php <div class="sidebar pull-right">
<div class="front-page-button flush-right">
<p>
<a href="open.php" style="display:block" class="blue button"><?php
echo __('Open a New Ticket');?></a>
</p>
</div>
<div class="content">
<?php
$faqs = FAQ::getFeatured()->select_related('category')->limit(5);
if ($faqs->all()) { ?>
<section><div class="header"><?php echo __('Featured Questions'); ?></div>
<?php foreach ($faqs as $F) { ?>
<div><a href="<?php echo ROOT_PATH; ?>/kb/faq.php?id=<?php
echo urlencode($F->getId());
?>"><?php echo $F->getLocalQuestion(); ?></a></div>
<?php } ?>
</section>
<?php
}
$resources = Page::getActivePages()->filter(array('type'=>'other'));
if ($resources->all()) { ?>
<section><div class="header"><?php echo __('Other Resources'); ?></div>
<?php foreach ($resources as $page) { ?>
<a href="<?php echo ROOT_PATH; ?>pages/<?php echo $page->getNameAsSlug();
?>"><?php echo $page->getLocalName(); ?></a>
<?php } ?>
</section>
<?php
} ?>
</div>
</div>
<div class="welcome">
<?php
if ($cfg && $cfg->isKnowledgebaseEnabled()) { ?>
<div class="search-form">
<form method="get" action="kb/faq.php">
<input type="hidden" name="a" value="search"/>
<input type="text" name="q" class="search" placeholder="Search our knowledge base"/>
<button type="submit" class="green button">Search</button>
</form>
</div>
<?php
}
if($cfg && ($page = $cfg->getLandingPage())) if($cfg && ($page = $cfg->getLandingPage()))
echo $page->getBodyWithImages(); echo $page->getBodyWithImages();
else else
echo '<h1>'.__('Welcome to the Support Center').'</h1>'; echo '<h1>'.__('Welcome to the Support Center').'</h1>';
?> ?>
<div id="new_ticket" class="pull-left">
<h3><?php echo __('Open a New Ticket');?></h3>
<br>
<div><?php echo __('Please provide as much detail as possible so we can best assist you. To update a previously submitted ticket, please login.');?></div>
</div>
<div id="check_status" class="pull-right">
<h3><?php echo __('Check Ticket Status');?></h3>
<br>
<div><?php echo __('We provide archives and history of all your current and past support requests complete with responses.');?></div>
</div>
<div class="clear"></div>
<div class="front-page-button pull-left">
<p>
<a href="open.php" class="green button"><?php echo __('Open a New Ticket');?></a>
</p>
</div>
<div class="front-page-button pull-right">
<p>
<a href="view.php" class="blue button"><?php echo __('Check Ticket Status');?></a>
</p>
</div>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
<div>
<?php <?php
if($cfg && $cfg->isKnowledgebaseEnabled()){ if($cfg && $cfg->isKnowledgebaseEnabled()){
//FIXME: provide ability to feature or select random FAQs ?? //FIXME: provide ability to feature or select random FAQs ??
?> ?>
<p><?php echo sprintf( <br/><br/>
__('Be sure to browse our %s before opening a ticket'), <?php
sprintf('<a href="kb/index.php">%s</a>', $cats = Category::getFeatured();
__('Frequently Asked Questions (FAQs)') if ($cats->all()) { ?>
)); ?></p> <h1>Featured Knowledge Base Articles</h1>
</div> <?php
}
foreach ($cats as $C) { ?>
<div class="featured-category front-page">
<i class="icon-folder-open icon-2x"></i>
<div class="category-name">
<?php echo $C->getName(); ?>
</div>
<?php foreach ($C->getTopArticles() as $F) { ?>
<div class="article-headline">
<div class="article-title"><a href="<?php echo ROOT_PATH;
?>kb/faq.php?id=<?php echo $F->getId(); ?>"><?php
echo $F->getQuestion(); ?></a></div>
<div class="article-teaser"><?php echo $F->getTeaser(); ?></div>
</div>
<?php } ?>
</div>
<?php <?php
} ?> }
}
?>
</div>
</div>
<?php require(CLIENTINC_DIR.'footer.inc.php'); ?> <?php require(CLIENTINC_DIR.'footer.inc.php'); ?>
...@@ -1641,8 +1641,8 @@ time { ...@@ -1641,8 +1641,8 @@ time {
/* Upgrader */ /* Upgrader */
#upgrader { width: 100%; height: auto; clear: both;} #upgrader { width: 100%; height: auto; clear: both;}
#upgrader #sidebar { width: 220px; padding: 10px; border: 1px solid #C8DDFA; float: right; background: #F7FBFE; } .sidebar { width: 220px; padding: 10px; border: 1px solid #C8DDFA; float: right; background: #F7FBFE; }
#upgrader #sidebar h3 { font-size: 10pt; margin: 0 0 5px 0; padding: 0; text-indent: 32px; background: url('../images/cog.png?1312913866') top left no-repeat; line-height: 24px; color: #2a67ac; } .sidebar h3 { font-size: 10pt; margin: 0 0 5px 0; padding: 0; text-indent: 32px; background: url('../images/cog.png?1312913866') top left no-repeat; line-height: 24px; color: #2a67ac; }
#upgrader #main { width: 680px; float: left;} #upgrader #main { width: 680px; float: left;}
#upgrader #main h1 { margin: 0; padding: 0; font-size: 21pt; font-weight: normal; } #upgrader #main h1 { margin: 0; padding: 0; font-size: 21pt; font-weight: normal; }
...@@ -1987,13 +1987,6 @@ table.custom-info td { ...@@ -1987,13 +1987,6 @@ table.custom-info td {
width: 670px; width: 670px;
margin: 0 15px; margin: 0 15px;
} }
.faq-meta {
border: 1px solid #888;
padding: 10px;
width: 200px;
background-color: #ddd;
background-color: rgba(0, 0, 0, 0.1);
}
.faq-meta section + section { .faq-meta section + section {
margin-top: 15px; margin-top: 15px;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment