Merge pull request #115 from openclassify/vedat

add png field type for favicon upload types
This commit is contained in:
Fatih Alp 2019-10-22 13:25:25 +03:00 committed by GitHub
commit c134c55a8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 15 deletions

View File

@ -70,7 +70,7 @@
],
"default_district" => [
"name" =>"Varsayılan İlan Bölgesi",
F
],
"default_neighborhood" => [
"name" =>"Varsayılan İlan Mahalle",

View File

@ -6,7 +6,7 @@ use Anomaly\Streams\Platform\Application\Application;
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel;
use Anomaly\Streams\Platform\Model\Cats\CatsCategoryEntryModel;
use Anomaly\Streams\Platform\Model\Users\UsersUsersEntryModel;
use Anomaly\UsersModule\User\UserModel;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Http\Request;
use Visiosoft\AdvsModule\Adv\Table\Filter\CategoryFilterQuery;
@ -72,9 +72,8 @@ class AdvsController extends AdminController
]
]);
if($this->model->is_enabled('recommendedads'))
{
$table->addButton('add_recommended',[
if ($this->model->is_enabled('recommendedads')) {
$table->addButton('add_recommended', [
'type' => 'default',
'icon' => 'fa fa-gg',
'text' => 'Add Recommended',
@ -96,15 +95,17 @@ class AdvsController extends AdminController
'class' => 'advs-country',
],
'created_by' => [
'value' => function (EntryInterface $entry) {
$user = UsersUsersEntryModel::query()->where('users_users.id', $entry->created_by_id)->first();
return $user->first_name . " " . $user->last_name;
'value' => function (EntryInterface $entry, UserModel $userModel) {
$user = $userModel->find($entry->created_by_id);
if (!is_null($user))
return $user->first_name . " " . $user->last_name;
}
],
'category' => [
'value' => function (EntryInterface $entry) {
$category = CategoryModel::query()->where('cats_category.id', $entry->cat1)->first();
return $category->name;
'value' => function (EntryInterface $entry, CategoryModel $categoryModel) {
$category = $categoryModel->getCat($entry->cat1);
if (!is_null($category))
return $category->name;
}
],
]);

View File

@ -96,7 +96,8 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
$join->on('cats_category.id', '=', 'cats_category_translations.entry_id');
$join->where('cats_category_translations.locale', '=', Request()->session()->get('_locale'));
});
$cats = $cats->orderBy('cats_category_translations.id', 'DESC')
$cats = $cats->select('cats_category.*','cats_category_translations.name as name');
$cats = $cats->orderBy('id', 'DESC')
->get();
foreach ($cats as $cat) {
$link = '';
@ -112,7 +113,6 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
$data[] = array(
'id' => $cat->id,
'name' => $cat->name,
'locale' => $cat->locale,
'parents' => $link
);
}

View File

@ -9,7 +9,7 @@
class="img-responsive">
{% endif %}
<font>{{ main_category.name }}</font>
<span>Konut, İşyeri, Arsa, Projeler, Bina, Devremülk, Turistik Tesis</span></a>
{# <span>Konut, İşyeri, Arsa, Projeler, Bina, Devremülk, Turistik Tesis</span></a>#}
</li>
{% endfor %}
</ul>

View File

@ -72,7 +72,7 @@ class ProfileModuleSeeder extends Seeder
'slug' => 'favicon',
'disk' => $disk,
'allowed_types' => [
'ico'
'ico','png'
],
]
);