Skip to content

Commit

Permalink
Icon updates / .less path fix (#4730)
Browse files Browse the repository at this point in the history
  • Loading branch information
betteryouthanme authored and 810 committed Oct 8, 2016
1 parent aead11b commit 30cbf17
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 57 deletions.
Expand Up @@ -105,8 +105,9 @@
</legend>
<div id="searchatdate">
<div class="input-append date">
<input type="text" name="searchatdate" data-date-format="mm/dd/yyyy" value="<?php echo JFactory::getDate()->format('m/d/Y'); ?>"> <span class="add-on"><i class="icon-grid-view-2 "></i></span>
</div>
<input type="text" name="searchatdate" data-date-format="mm/dd/yyyy" value="<?php echo JFactory::getDate()->format('m/d/Y'); ?>">
<span class="input-group-addon"><?php echo KunenaIcons::calendar();?></span>
</div>
</div>
</fieldset>
</div>
Expand Down Expand Up @@ -164,10 +165,10 @@

<div class="center">
<button type="submit" class="btn btn-primary">
<i class="icon-search icon-white"></i><?php echo(' ' . JText::_('COM_KUNENA_SEARCH_SEND') . ' '); ?>
<?php echo KunenaIcons::search();?><?php echo(' ' . JText::_('COM_KUNENA_SEARCH_SEND') . ' '); ?>
</button>
<button type="reset" class="btn" onclick="window.history.back();">
<i class="icon-cancel"></i><?php echo(' ' . JText::_('COM_KUNENA_CANCEL') . ' '); ?>
<?php echo KunenaIcons::cancel();?><?php echo(' ' . JText::_('COM_KUNENA_CANCEL') . ' '); ?>
</button>
</div>
</div>
Expand Down
Expand Up @@ -37,30 +37,32 @@

<div class="btn-toolbar pull-right">
<div class="btn-group">
<button class="btn btn-default btn-small <?php echo KunenaIcons::collapse();?>" type="button" data-toggle="collapse" data-target="#search" aria-expanded="false" aria-controls="search"></button>
<button class="btn btn-default btn-sm <?php echo KunenaIcons::collapse();?>" type="button" data-toggle="collapse" data-target="#search" aria-expanded="false" aria-controls="search"></button>
</div>
</div>
<h1>
<?php echo JText::_('COM_KUNENA_SEARCH_ADVSEARCH'); ?>
</h1>

<div class="collapse in" id="search">
<div class="well">
<div class="well">
<div class="row">
<fieldset class="col-md-6">
<legend>
<?php echo JText::_('COM_KUNENA_SEARCH_SEARCHBY_KEYWORD'); ?>
</legend>

<div class="col-md-6">
<label>
<?php echo JText::_('COM_KUNENA_SEARCH_KEYWORDS'); ?>:
<input type="text" name="query" class="form-control"
value="<?php echo $this->escape($this->state->get('searchwords')); ?>" />
</label>
<div class="form-group">
<input type="text" name="query" class="form-control"
value="<?php echo $this->escape($this->state->get('searchwords')); ?>" placeholder="<?php echo JText::_('COM_KUNENA_SEARCH_KEYWORDS'); ?>" />
</div>
</div>

<div class="col-md-6">
<br>
<?php $this->displayModeList('mode'); ?>
<div class="form-group">
<?php $this->displayModeList('mode'); ?>
</div>
</div>
</fieldset>

Expand All @@ -69,38 +71,38 @@
<legend>
<?php echo JText::_('COM_KUNENA_SEARCH_SEARCHBY_USER'); ?>
</legend>
<label>
<?php echo JText::_('COM_KUNENA_SEARCH_UNAME'); ?>:
<input id="kusersearch" type="text" name="searchuser" class="form-control"
value="<?php echo $this->escape($this->state->get('query.searchuser')); ?>" />
</label>
<br>
<label>
<?php echo JText::_('COM_KUNENA_SEARCH_EXACT'); ?>:
<input type="checkbox" name="exactname" value="1"
<?php if ($this->state->get('query.exactname')) { echo $this->checked; } ?> />
</label>

<div class="form-group">
<input id="kusersearch" type="text" name="searchuser" class="form-control"
value="<?php echo $this->escape($this->state->get('query.searchuser')); ?>" placeholder="<?php echo JText::_('COM_KUNENA_SEARCH_UNAME'); ?>" />
<div class="checkbox">
<label>
<input type="checkbox" name="exactname" value="1"
<?php if ($this->state->get('query.exactname')) { echo $this->checked; } ?> />
<?php echo JText::_('COM_KUNENA_SEARCH_EXACT'); ?>
</label>
</div>
</div>
</fieldset>
<?php endif; ?>
</div>
</div>

<button type="button" class="btn btn-default btn-small pull-right <?php echo KunenaIcons::collapse();?>" data-toggle="collapse" data-target="#search-options" aria-expanded="false" aria-controls="search-options"></button>
<h2>
<?php echo JText::_('COM_KUNENA_SEARCH_OPTIONS'); ?>
</h2>
<button type="button" class="btn btn-default btn-sm pull-right <?php echo KunenaIcons::collapse();?>" data-toggle="collapse" data-target="#search-options" aria-expanded="false" aria-controls="search-options"></button>
<h2>
<?php echo JText::_('COM_KUNENA_SEARCH_OPTIONS'); ?>
</h2>

<div class="collapse in" id="search-options">
<div class="well">
<div class="row">

<fieldset class="col-md-6">
<legend>
<?php echo JText::_('COM_KUNENA_SEARCH_FIND_POSTS'); ?>
</legend>
<div class="col-md-6">
<div class="form-group">
<?php $this->displayDateList('date'); ?>
</div>
<div class="col-md-6">
<?php $this->displayBeforeAfterList('beforeafter'); ?>
</div>
</fieldset>
Expand All @@ -109,10 +111,8 @@
<legend>
<?php echo JText::_('COM_KUNENA_SEARCH_SORTBY'); ?>
</legend>
<div class="col-md-6">
<div class="form-group">
<?php $this->displaySortByList('sort'); ?>
</div>
<div class="col-md-6">
<?php $this->displayOrderList('order'); ?>
</div>
</fieldset>
Expand All @@ -121,20 +121,25 @@
<legend>
<?php echo JText::_('COM_KUNENA_SEARCH_AT_A_SPECIFIC_DATE'); ?>
</legend>
<div class="col-md-6" id="searchatdate">
<div class="input-group date">
<input class="form-control" type="text" name="searchatdate" data-date-format="mm/dd/yyyy" value="<?php echo JFactory::getDate()->format('m/d/Y'); ?>"> <span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
<div class="col-md-6">
<div class="form-group" id="searchatdate">
<div class="input-group date">
<input class="form-control" type="text" name="searchatdate" data-date-format="mm/dd/yyyy"
value="<?php echo JFactory::getDate()->format('m/d/Y'); ?>">
<span class="input-group-addon"><?php echo KunenaIcons::calendar();?></span>
</div>
</div>
</div>
</fieldset>
</div>

<div class="row">
<div class="col-md-6">
<fieldset>
<fieldset class="form-group">
<legend>
<?php echo JText::_('COM_KUNENA_SEARCH_START'); ?>
</legend>

<div class="col-md-6">
<input type="text" name="limitstart" class="form-control"
value="<?php echo $this->escape($this->state->get('list.start')); ?>" size="5" />
Expand All @@ -149,24 +154,32 @@
<legend>
<?php echo JText::_('COM_KUNENA_SEARCH_SHOW'); ?>
</legend>
<label class="radio">
<input type="radio" name="show" value="0"
<?php if ($this->state->get('query.show') == 0) { echo 'checked="checked"'; } ?> />
<?php echo JText::_('COM_KUNENA_SEARCH_SHOW_NORMAL'); ?>
</label>
<label class="radio">
<input type="radio" name="show" value="1"
<?php if ($this->state->get('query.show') == 1) { echo 'checked="checked"'; } ?> />
<?php echo JText::_('COM_KUNENA_SEARCH_SHOW_UNAPPROVED'); ?>
</label>
<label class="radio">
<input type="radio" name="show" value="2"
<?php if ($this->state->get('query.show') == 2) { echo 'checked="checked"'; } ?> />
<?php echo JText::_('COM_KUNENA_SEARCH_SHOW_TRASHED'); ?>
</label>

<div class="radio">
<label>
<input type="radio" name="show" value="0"
<?php if ($this->state->get('query.show') == 0) { echo 'checked="checked"'; } ?> />
<?php echo JText::_('COM_KUNENA_SEARCH_SHOW_NORMAL'); ?>
</label>
</div>

<div class="radio">
<label>
<input type="radio" name="show" value="1"
<?php if ($this->state->get('query.show') == 1) { echo 'checked="checked"'; } ?> />
<?php echo JText::_('COM_KUNENA_SEARCH_SHOW_UNAPPROVED'); ?>
</label>
</div>

<div class="radio">
<label>
<input type="radio" name="show" value="2"
<?php if ($this->state->get('query.show') == 2) { echo 'checked="checked"'; } ?> />
<?php echo JText::_('COM_KUNENA_SEARCH_SHOW_TRASHED'); ?>
</label>
</div>
</fieldset>
<?php endif; ?>

</div>

<fieldset class="col-md-6">
Expand All @@ -184,7 +197,7 @@
</div>
</div>

<div class="center">
<div class="text-center">
<button type="submit" class="btn btn-primary">
<?php echo KunenaIcons::search();?><?php echo(' ' . JText::_('COM_KUNENA_SEARCH_SEND') . ' '); ?>
</button>
Expand All @@ -195,3 +208,4 @@
</div>
</form>
<div class="clearfix"></div>

2 changes: 1 addition & 1 deletion src/components/com_kunena/template/crypsisb3/template.php
Expand Up @@ -97,7 +97,7 @@ public function initialize()
$this->compileLess('assets/less/crypsisb3.less', 'kunena.css');
$this->addStyleSheet('kunena.css');

$filenameless = JPATH_SITE . '/components/com_kunena/template/crypsis/assets/less/custom.less';
$filenameless = JPATH_SITE . '/components/com_kunena/template/crypsisb3/assets/less/custom.less';

if (file_exists($filenameless) && 0 != filesize($filenameless))
{
Expand Down
32 changes: 31 additions & 1 deletion src/libraries/kunena/icons/icons.php
Expand Up @@ -1127,6 +1127,36 @@ static public function home()
{
return '<span class="icon icon-home hasTooltip"></span>';
}
}
}

/**
* Return the calendar icon
*
* @return string
*
* @since K5.0
*/
static public function calendar()
{
$ktemplate = KunenaFactory::getTemplate();
$topicicontype = $ktemplate->params->get('topicicontype');

if ($topicicontype == 'fa')
{
return '<i class="fa fa-calendar"></i>';
}
elseif ($topicicontype == 'B2')
{
return '<i class="icon icon-calendar"></i>';
}
elseif ($topicicontype == 'B3')
{
return '<span class="glyphicon glyphicon-calendar"></span>';
}
else
{
return '<i class="icon icon-calendar"></i>';
}
}

}

0 comments on commit 30cbf17

Please sign in to comment.