Merge pull request #200 from ullbergm/Add-option-to-open-links-in-current-window-or-new-tab

WIP: Add option to open links in current window or new tab
This commit is contained in:
KodeStar
2018-06-10 09:01:25 +01:00
committed by GitHub
3 changed files with 30 additions and 3 deletions

View File

@@ -169,10 +169,12 @@ class Item extends Model
public function getLinkTargetAttribute()
{
if((int)$this->type === 1) {
$target = Setting::fetch('window_target');
if((int)$this->type === 1 || $target === 'current') {
return '';
} else {
return ' target="heimdallapp"';
return ' target="' . $target . '"';
}
}