mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
fix category url
This commit is contained in:
parent
139ff3d7e9
commit
22523caa8e
@ -2,7 +2,7 @@
|
||||
<li class="categories-list-li category-icon category-{{ main_category.slug }}">
|
||||
{% set categoryIcon = (main_category.icon) ? main_category.icon : img('visiosoft.theme.base::images/default-categories-icon.png').url %}
|
||||
|
||||
<img src="{{ categoryIcon }}" alt="{{ main_category.name }}" class="img-responsive">
|
||||
<img src="{{ categoryIcon }}?v={{ random() }}" alt="{{ main_category.name }}" class="img-responsive">
|
||||
<a href="{{ url_route('adv_list_seo', [main_category.slug]) }}" class="main-category">
|
||||
<b>{{ main_category.name }}</b>
|
||||
{% if showAdsCount %}
|
||||
|
||||
@ -16,7 +16,7 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
|
||||
if ($this->icon === null) {
|
||||
return $this->dispatch(new MakeImageInstance('visiosoft.module.advs::images/listing/sample-cat-icon.svg', 'img'))->url();
|
||||
}
|
||||
return $this->icon;
|
||||
return $this->icon.'?v='.rand();
|
||||
}
|
||||
|
||||
public function getCat($id)
|
||||
|
||||
@ -271,7 +271,9 @@ class CategoryController extends AdminController
|
||||
|
||||
$file = $uploader->upload($file, $folder);
|
||||
|
||||
$category->setCategoryIconUrl($file->make()->url());
|
||||
$url = route('anomaly.module.files::files.view',['folder' => $folder->slug,'name' => $file->name]);
|
||||
|
||||
$category->setCategoryIconUrl($url);
|
||||
} catch (\Exception $exception) {
|
||||
$this->messages->error($exception->getMessage());
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user