Merge pull request #241 from mkoch227/alignment-issues

Alignment issues
This commit is contained in:
Mike Koch 2015-05-11 19:40:41 -04:00
commit f3e00678d1
8 changed files with 89 additions and 96 deletions

View File

@ -1155,8 +1155,8 @@ if ( defined('HESK_DEMO') )
$off = $hesk_settings['kb_enable'] ? '' : 'checked="checked"';
$only = $hesk_settings['kb_enable'] == 2 ? 'checked="checked"' : '';
echo '
<div class="radio"><label><input type="radio" name="s_kb_enable" value="1" '.$on.' /> '.$hesklang['enable'].'</label></div>&nbsp;&nbsp;&nbsp;
<div class="radio"><label><input type="radio" name="s_kb_enable" value="2" '.$only.' /> '.$hesklang['ekb_o'].'</label></div>&nbsp;&nbsp;&nbsp;
<div class="radio"><label><input type="radio" name="s_kb_enable" value="1" '.$on.' /> '.$hesklang['ekb_y'].'</label></div><br>
<div class="radio"><label><input type="radio" name="s_kb_enable" value="2" '.$only.' /> '.$hesklang['ekb_o'].'</label></div><br>
<div class="radio"><label><input type="radio" name="s_kb_enable" value="0" '.$off.' /> '.$hesklang['ekb_n'].'</label></div>';
?>
</div>

View File

@ -101,7 +101,7 @@ else
{
hesk_show_kb_category($catid);
}
?> </div> <?php
require_once(HESK_PATH . 'inc/footer.inc.php');
exit();

View File

@ -177,7 +177,10 @@ show_new_form();
/* Clean unneeded session variables */
hesk_cleanSessionVars('hide');
hesk_cleanSessionVars('mail');
?>
</div>
</div>
<?php
require_once(HESK_PATH . 'inc/footer.inc.php');
exit();

View File

@ -1596,23 +1596,11 @@ function manage_category() {
<?php
$result = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` WHERE `catid`='{$catid}' ORDER BY `sticky` DESC, `art_order` ASC");
$num = hesk_dbNumRows($result);
if ($num == 0)
{
echo '<p>'.$hesklang['kb_no_art'].' &nbsp; <a href="manage_knowledgebase.php?a=add_article&amp;catid='.$catid.'"><i class="fa fa-plus" style="color: green;font-size:16px"></i></a> <a href="manage_knowledgebase.php?a=add_article&amp;catid='.$catid.'"><b>'.$hesklang['kb_i_art2'].'</b></a></p>';
}
else
{
/* Get number of sticky articles */
$res2 = hesk_dbQuery("SELECT COUNT(*) FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` WHERE `catid`='{$catid}' AND `sticky` = '1' ");
$num_sticky = hesk_dbResult($res2);
$num_nosticky = $num - $num_sticky;
$secondCol = $catid == 1 ? 'col-md-12' : 'col-md-8';
$secondStyle = $catid == 1 ? 'margin-left: 25px' : 'padding-right: 40px';
?>
<div class="row">
<?php if ($catid != 1): ?>
<div class="col-md-4">
<div style="margin-left:25px">
<div class="panel panel-default">
@ -1666,7 +1654,22 @@ function manage_category() {
</div>
</div>
</div>
<div class="col-md-8" style="padding-right:40px">
<?php endif; ?>
<div class="<?php echo $secondCol; ?>" style="<?php echo $secondStyle; ?>">
<?php
if ($num == 0)
{
echo '<p>'.$hesklang['kb_no_art'].' &nbsp; <a href="manage_knowledgebase.php?a=add_article&amp;catid='.$catid.'"><i class="fa fa-plus" style="color: green;font-size:16px"></i></a> <a href="manage_knowledgebase.php?a=add_article&amp;catid='.$catid.'"><b>'.$hesklang['kb_i_art2'].'</b></a></p>';
}
else
{
/* Get number of sticky articles */
$res2 = hesk_dbQuery("SELECT COUNT(*) FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` WHERE `catid`='{$catid}' AND `sticky` = '1' ");
$num_sticky = hesk_dbResult($res2);
$num_nosticky = $num - $num_sticky;
?>
<h3><?php echo $hesklang['kb_cat_art']; ?> <small style="float:right"><?php echo '<a href="manage_knowledgebase.php?a=add_article&amp;catid='.$catid.'"><i class="fa fa-plus"></i></a> <a href="manage_knowledgebase.php?a=add_article&amp;catid='.$catid.'"><b>'.$hesklang['kb_i_art2'].'</b></a>'; ?></small></h3>
<div class="footerWithBorder blankSpace"></div>
@ -1793,35 +1796,15 @@ function manage_category() {
} // End while
?>
</table>
<?php
} ?>
</div>
</div>
<?php
}
} // END if hide article list
/* Manage Category (except the default one) */
if ($catid != 1)
{
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
</td>
<td class="roundcornersright">&nbsp;</td>
</tr>
<tr>
<td><img src="../img/roundcornerslb.jpg" width="7" height="7" alt="" /></td>
<td class="roundcornersbottom"></td>
<td width="7" height="7"><img src="../img/roundcornersrb.jpg" width="7" height="7" alt="" /></td>
</tr>
</table>
<?php
} // END if $catid != 1
<?php } // END if hide article list
echo '&nbsp;<br />&nbsp;';

View File

@ -1002,6 +1002,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</div>
</div>
</form>
</div>
<?php

View File

@ -339,9 +339,6 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
hesk_ticketsByDay();
}
require_once(HESK_PATH . 'inc/footer.inc.php');
exit();
/*** START FUNCTIONS ***/
@ -950,3 +947,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
?>
</div>
</div>
<?php
require_once(HESK_PATH . 'inc/footer.inc.php');
exit();

View File

@ -97,7 +97,6 @@ function hesk_kbTopArticles($how_many, $index = 1)
<table border="0" width="100%" class="table table-striped table-fixed">
<thead>
<tr>
<th class="col-xs-8 col-sm-9">&nbsp;</th>
<?php
/* Get list of articles from the database */
$res = hesk_dbQuery("SELECT `t1`.`id`,`t1`.`subject`,`t1`.`views` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` AS `t1`
@ -108,6 +107,7 @@ function hesk_kbTopArticles($how_many, $index = 1)
/* Show number of views? */
if ($hesk_settings['kb_views'] && hesk_dbNumRows($res) != 0)
{
echo '<th class="col-xs-8 col-sm-9">&nbsp;</th>';
echo '<th class="col-xs-4 col-sm-3"><i>' . $hesklang['views'] . '</i></th>';
}
?>
@ -129,7 +129,6 @@ function hesk_kbTopArticles($how_many, $index = 1)
$colspan = 'colspan="2"';
}
echo '<tr><td '.$colspan.'><i>'.$hesklang['noa'].'</i></td></tr>';
return true;
}
/* We have some results, print them out */
@ -155,6 +154,8 @@ function hesk_kbTopArticles($how_many, $index = 1)
</table>
</div>
<?php
return true;
} // END hesk_kbTopArticles()
@ -239,7 +240,6 @@ function hesk_kbLatestArticles($how_many, $index = 1)
$colspan = 'colspan="2"';
}
echo '<td '.$colspan.'><i>'.$hesklang['noa'].'</i></td>';
return true;
}
/* We have some results, print them out */
@ -261,6 +261,8 @@ function hesk_kbLatestArticles($how_many, $index = 1)
</div>
<?php
return true;
} // END hesk_kbLatestArticles()

View File

@ -1018,6 +1018,7 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
< -->
</form>
</div>
</div>
<!-- END FORM -->
@ -1091,7 +1092,9 @@ function print_start()
<input type="text" class="form-control" name="e" id="emailAddress" size="35" value="<?php echo $my_email; ?>" placeholder="<?php echo htmlspecialchars($hesklang['email']); ?>"/>
</div>
<div class="checkbox">
<input type="checkbox" name="r" value="Y" <?php echo $do_remember; ?> /> <?php echo $hesklang['rem_email']; ?></label>
<label for="r">
<input type="checkbox" name="r" value="Y" /> <?php echo $hesklang['rem_email']; ?>
</label>
</div>
<?php
}
@ -1118,10 +1121,10 @@ function print_start()
<a href="index.php?a=add">
<div class="block">
<div class="upper">
<img src="img/newTicket.png" alt="<?php echo $hesklang['sub_support']; ?>" />
<img src="img/newTicket.png" alt="<?php echo $hesklang['sub_ticket']; ?>" />
</div>
<div class="lower">
<p><?php echo $hesklang['sub_support']; ?></p>
<p><?php echo $hesklang['sub_ticket']; ?></p>
</div>
</div>
</a>