fix search tab behaviour and tag link in subfolder
This commit is contained in:
parent
7966f07fdb
commit
8e1615ac5f
3 changed files with 15 additions and 3 deletions
|
@ -35,6 +35,18 @@ function title_color($hex)
|
|||
}
|
||||
}
|
||||
|
||||
function getLinkTargetAttribute()
|
||||
{
|
||||
$target = \App\Setting::fetch('window_target');
|
||||
|
||||
if($target === 'current') {
|
||||
return '';
|
||||
} else {
|
||||
return ' target="' . $target . '"';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function className($name)
|
||||
{
|
||||
|
|
|
@ -125,7 +125,7 @@ abstract class Search
|
|||
$provider = self::providerDetails($user_search_provider);
|
||||
|
||||
$output .= '<div class="searchform">';
|
||||
$output .= Form::open(['url' => 'search', 'method' => 'get']);
|
||||
$output .= '<form action="'.url('search').'"'.getLinkTargetAttribute().' method="get">';
|
||||
$output .= '<div id="search-container" class="input-container">';
|
||||
$output .= '<select name="provider">';
|
||||
foreach(self::providers() as $key => $searchprovider) {
|
||||
|
@ -136,7 +136,7 @@ abstract class Search
|
|||
$output .= Form::text('q', null, ['class' => 'homesearch', 'autofocus' => 'autofocus', 'placeholder' => __('app.settings.search').'...']);
|
||||
$output .= '<button type="submit">'.ucwords(__('app.settings.search')).'</button>';
|
||||
$output .= '</div>';
|
||||
$output .= Form::close();
|
||||
$output .= '</form>';
|
||||
$output .= '</div>';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<div data-id="{{ $app->id }}" data-dataonly="{{ $app->getconfig()->dataonly ?? '0' }}" class="livestats-container{{ title_color($app->colour) }}"></div>
|
||||
@endif
|
||||
</div>
|
||||
<a title="{{ App\Item::getApplicationDescription($app->class) }}" class="link{{ title_color($app->colour) }}"{!! $app->link_target !!} href="{{ $app->link }}"><i class="fas {{ $app->link_icon }}"></i></a>
|
||||
<a title="{{ App\Item::getApplicationDescription($app->class) }}" class="link{{ title_color($app->colour) }}"{!! $app->link_target !!} href="{{ url($app->link) }}"><i class="fas {{ $app->link_icon }}"></i></a>
|
||||
</div>
|
||||
<a class="item-edit" href="{{ route($app->link_type.'.edit', [ $app->id ]) }}"><i class="fas fa-pencil"></i></a>
|
||||
|
||||
|
|
Loading…
Reference in a new issue