mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 07:16:06 -06:00
Merge pull request #1212 from openclassify/dia
#4751 [coupon-module] Improve UX
This commit is contained in:
commit
93b8667b37
@ -129,4 +129,15 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
|
|||||||
{
|
{
|
||||||
return $this->where('parent_category_id', $this->getId())->get();
|
return $this->where('parent_category_id', $this->getId())->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function scopeWithTrans($query)
|
||||||
|
{
|
||||||
|
return $query
|
||||||
|
->leftJoin('cats_category_translations as cats_trans', function ($join) {
|
||||||
|
$join->on('cats_category.id', '=', 'cats_trans.entry_id');
|
||||||
|
$join->whereIn(
|
||||||
|
'locale', [config('app.locale'), setting_value('streams::default_locale'), 'en']
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,4 +19,6 @@ interface CategoryInterface extends EntryInterface
|
|||||||
public function setCategoryIconUrl($url);
|
public function setCategoryIconUrl($url);
|
||||||
|
|
||||||
public function getSubCategories();
|
public function getSubCategories();
|
||||||
|
|
||||||
|
public function scopeWithTrans($query);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class CacheController extends PublicController
|
|||||||
$profile_img = $user ? $this->dispatch(
|
$profile_img = $user ? $this->dispatch(
|
||||||
new MakeImageInstance($user->file ?: 'theme::images/no_profile.svg', 'img')
|
new MakeImageInstance($user->file ?: 'theme::images/no_profile.svg', 'img')
|
||||||
)->url() : $user;
|
)->url() : $user;
|
||||||
$user = $user ? $user->first_name . ' ' . $user->last_name : $user;
|
$user = $user ? $user->name() : $user;
|
||||||
|
|
||||||
$getAddBlockHtml = new addBlock('navigation/dropdown', []);
|
$getAddBlockHtml = new addBlock('navigation/dropdown', []);
|
||||||
$addBlockHtml = $getAddBlockHtml->handle();
|
$addBlockHtml = $getAddBlockHtml->handle();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user