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"'; $off = $hesk_settings['kb_enable'] ? '' : 'checked="checked"';
$only = $hesk_settings['kb_enable'] == 2 ? 'checked="checked"' : ''; $only = $hesk_settings['kb_enable'] == 2 ? 'checked="checked"' : '';
echo ' 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="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>&nbsp;&nbsp;&nbsp; <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 class="radio"><label><input type="radio" name="s_kb_enable" value="0" '.$off.' /> '.$hesklang['ekb_n'].'</label></div>';
?> ?>
</div> </div>

View File

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

View File

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

View File

@ -1596,7 +1596,67 @@ function manage_category() {
<?php <?php
$result = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` WHERE `catid`='{$catid}' ORDER BY `sticky` DESC, `art_order` ASC"); $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); $num = hesk_dbNumRows($result);
$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">
<div class="panel-heading"><?php echo $hesklang['catset']; ?></div>
<div class="panel-body">
<form action="manage_knowledgebase.php" method="post" role="form" name="form1" onsubmit="Javascript:return hesk_deleteIfSelected('dodelete','<?php echo hesk_makeJsString($hesklang['kb_delcat']); ?>')">
<div class="form-group">
<label for="title" class="control-label"><?php echo $hesklang['kb_cat_title']; ?></label>
<input type="text" class="form-control" name="title" size="70" maxlength="255" value="<?php echo $this_cat['name']; ?>" />
</div>
<div class="form-group">
<label for="parent" class="control-label"><?php echo $hesklang['kb_cat_parent']; ?></label>
<select name="parent" class="form-control"><?php $listBox->printMenu(); ?></select>
</div>
<div class="form-group">
<label for="type" class="control-label"><?php echo $hesklang['kb_type']; ?></label>
<div class="radio">
<label><input type="radio" name="type" value="0" <?php if (!$this_cat['type']) {echo 'checked="checked"';} ?> /> <b><i><?php echo $hesklang['kb_published']; ?></i></b></label>
<p class="form-static-content"><?php echo $hesklang['kb_cat_published']; ?></p>
</div>
<div class="radio">
<label><input type="radio" name="type" value="1" <?php if ($this_cat['type']) {echo 'checked="checked"';} ?> /> <b><i><?php echo $hesklang['kb_private']; ?></i></b></label>
<p class="form-static-content"><?php echo $hesklang['kb_cat_private']; ?></p>
</div>
</div>
<div class="form-group">
<label for="dodelete" class="control-label"><?php echo $hesklang['opt']; ?></label>
<div class="checkbox">
<label><input type="checkbox" name="dodelete" id="dodelete" value="Y" onclick="Javascript:hesk_toggleLayerDisplay('deleteoptions')" /><?php echo $hesklang['delcat']; ?></label>
</div>
</div>
<div id="deleteoptions" style="display: none;">
<div class="form-group">
<div class="radio">
<label><input type="radio" name="movearticles" value="Y" checked="checked" /> <?php echo $hesklang['move1']; ?></label>
</div>
<div class="radio">
<label><input type="radio" name="movearticles" value="N" /> <?php echo $hesklang['move2']; ?></label>
</div>
</div>
</div>
<div class="form-group" style="text-align:center">
<input type="hidden" name="a" value="edit_category" />
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
<input type="hidden" name="catid" value="<?php echo $catid; ?>" />
<input type="submit" value="<?php echo $hesklang['save_changes']; ?>" class="btn btn-default" />
<a class="btn btn-default" href="manage_knowledgebase.php?a=add_category&amp;parent='.$catid.'"><?php echo $hesklang['kb_i_cat2']; ?></a>
</div>
</form>
</div>
</div>
</div>
</div>
<?php endif; ?>
<div class="<?php echo $secondCol; ?>" style="<?php echo $secondStyle; ?>">
<?php
if ($num == 0) 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>'; 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>';
@ -1610,63 +1670,6 @@ function manage_category() {
$num_nosticky = $num - $num_sticky; $num_nosticky = $num - $num_sticky;
?> ?>
<div class="row">
<div class="col-md-4">
<div style="margin-left:25px">
<div class="panel panel-default">
<div class="panel-heading"><?php echo $hesklang['catset']; ?></div>
<div class="panel-body">
<form action="manage_knowledgebase.php" method="post" role="form" name="form1" onsubmit="Javascript:return hesk_deleteIfSelected('dodelete','<?php echo hesk_makeJsString($hesklang['kb_delcat']); ?>')">
<div class="form-group">
<label for="title" class="control-label"><?php echo $hesklang['kb_cat_title']; ?></label>
<input type="text" class="form-control" name="title" size="70" maxlength="255" value="<?php echo $this_cat['name']; ?>" />
</div>
<div class="form-group">
<label for="parent" class="control-label"><?php echo $hesklang['kb_cat_parent']; ?></label>
<select name="parent" class="form-control"><?php $listBox->printMenu(); ?></select>
</div>
<div class="form-group">
<label for="type" class="control-label"><?php echo $hesklang['kb_type']; ?></label>
<div class="radio">
<label><input type="radio" name="type" value="0" <?php if (!$this_cat['type']) {echo 'checked="checked"';} ?> /> <b><i><?php echo $hesklang['kb_published']; ?></i></b></label>
<p class="form-static-content"><?php echo $hesklang['kb_cat_published']; ?></p>
</div>
<div class="radio">
<label><input type="radio" name="type" value="1" <?php if ($this_cat['type']) {echo 'checked="checked"';} ?> /> <b><i><?php echo $hesklang['kb_private']; ?></i></b></label>
<p class="form-static-content"><?php echo $hesklang['kb_cat_private']; ?></p>
</div>
</div>
<div class="form-group">
<label for="dodelete" class="control-label"><?php echo $hesklang['opt']; ?></label>
<div class="checkbox">
<label><input type="checkbox" name="dodelete" id="dodelete" value="Y" onclick="Javascript:hesk_toggleLayerDisplay('deleteoptions')" /><?php echo $hesklang['delcat']; ?></label>
</div>
</div>
<div id="deleteoptions" style="display: none;">
<div class="form-group">
<div class="radio">
<label><input type="radio" name="movearticles" value="Y" checked="checked" /> <?php echo $hesklang['move1']; ?></label>
</div>
<div class="radio">
<label><input type="radio" name="movearticles" value="N" /> <?php echo $hesklang['move2']; ?></label>
</div>
</div>
</div>
<div class="form-group" style="text-align:center">
<input type="hidden" name="a" value="edit_category" />
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
<input type="hidden" name="catid" value="<?php echo $catid; ?>" />
<input type="submit" value="<?php echo $hesklang['save_changes']; ?>" class="btn btn-default" />
<a class="btn btn-default" href="manage_knowledgebase.php?a=add_category&amp;parent='.$catid.'"><?php echo $hesklang['kb_i_cat2']; ?></a>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="col-md-8" style="padding-right:40px">
<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> <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> <div class="footerWithBorder blankSpace"></div>
@ -1793,35 +1796,15 @@ function manage_category() {
} // End while } // End while
?> ?>
</table> </table>
</div>
</div>
<?php <?php
} } ?>
} // END if hide article list
/* Manage Category (except the default one) */ </div>
if ($catid != 1) </div>
{
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <?php } // END if hide article list
<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
echo '&nbsp;<br />&nbsp;'; echo '&nbsp;<br />&nbsp;';

View File

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

View File

@ -339,9 +339,6 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
hesk_ticketsByDay(); hesk_ticketsByDay();
} }
require_once(HESK_PATH . 'inc/footer.inc.php');
exit();
/*** START FUNCTIONS ***/ /*** START FUNCTIONS ***/
@ -949,4 +946,8 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
} // END hesk_ticketsByDay } // END hesk_ticketsByDay
?> ?>
</div> </div>
</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"> <table border="0" width="100%" class="table table-striped table-fixed">
<thead> <thead>
<tr> <tr>
<th class="col-xs-8 col-sm-9">&nbsp;</th>
<?php <?php
/* Get list of articles from the database */ /* 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` $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? */ /* Show number of views? */
if ($hesk_settings['kb_views'] && hesk_dbNumRows($res) != 0) 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>'; 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"'; $colspan = 'colspan="2"';
} }
echo '<tr><td '.$colspan.'><i>'.$hesklang['noa'].'</i></td></tr>'; echo '<tr><td '.$colspan.'><i>'.$hesklang['noa'].'</i></td></tr>';
return true;
} }
/* We have some results, print them out */ /* We have some results, print them out */
@ -155,6 +154,8 @@ function hesk_kbTopArticles($how_many, $index = 1)
</table> </table>
</div> </div>
<?php <?php
return true;
} // END hesk_kbTopArticles() } // END hesk_kbTopArticles()
@ -239,7 +240,6 @@ function hesk_kbLatestArticles($how_many, $index = 1)
$colspan = 'colspan="2"'; $colspan = 'colspan="2"';
} }
echo '<td '.$colspan.'><i>'.$hesklang['noa'].'</i></td>'; echo '<td '.$colspan.'><i>'.$hesklang['noa'].'</i></td>';
return true;
} }
/* We have some results, print them out */ /* We have some results, print them out */
@ -261,6 +261,8 @@ function hesk_kbLatestArticles($how_many, $index = 1)
</div> </div>
<?php <?php
return true;
} // END hesk_kbLatestArticles() } // END hesk_kbLatestArticles()

View File

@ -1019,6 +1019,7 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
</form> </form>
</div> </div>
</div>
<!-- END FORM --> <!-- 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']); ?>"/> <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>
<div class="checkbox"> <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> </div>
<?php <?php
} }
@ -1118,10 +1121,10 @@ function print_start()
<a href="index.php?a=add"> <a href="index.php?a=add">
<div class="block"> <div class="block">
<div class="upper"> <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>
<div class="lower"> <div class="lower">
<p><?php echo $hesklang['sub_support']; ?></p> <p><?php echo $hesklang['sub_ticket']; ?></p>
</div> </div>
</div> </div>
</a> </a>