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" => [ "default_district" => [
"name" =>"Varsayılan İlan Bölgesi", "name" =>"Varsayılan İlan Bölgesi",
F
], ],
"default_neighborhood" => [ "default_neighborhood" => [
"name" =>"Varsayılan İlan Mahalle", "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\Entry\Contract\EntryInterface;
use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel; use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel;
use Anomaly\Streams\Platform\Model\Cats\CatsCategoryEntryModel; 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\Filesystem\Filesystem;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Visiosoft\AdvsModule\Adv\Table\Filter\CategoryFilterQuery; use Visiosoft\AdvsModule\Adv\Table\Filter\CategoryFilterQuery;
@ -72,9 +72,8 @@ class AdvsController extends AdminController
] ]
]); ]);
if($this->model->is_enabled('recommendedads')) if ($this->model->is_enabled('recommendedads')) {
{ $table->addButton('add_recommended', [
$table->addButton('add_recommended',[
'type' => 'default', 'type' => 'default',
'icon' => 'fa fa-gg', 'icon' => 'fa fa-gg',
'text' => 'Add Recommended', 'text' => 'Add Recommended',
@ -96,15 +95,17 @@ class AdvsController extends AdminController
'class' => 'advs-country', 'class' => 'advs-country',
], ],
'created_by' => [ 'created_by' => [
'value' => function (EntryInterface $entry) { 'value' => function (EntryInterface $entry, UserModel $userModel) {
$user = UsersUsersEntryModel::query()->where('users_users.id', $entry->created_by_id)->first(); $user = $userModel->find($entry->created_by_id);
return $user->first_name . " " . $user->last_name; if (!is_null($user))
return $user->first_name . " " . $user->last_name;
} }
], ],
'category' => [ 'category' => [
'value' => function (EntryInterface $entry) { 'value' => function (EntryInterface $entry, CategoryModel $categoryModel) {
$category = CategoryModel::query()->where('cats_category.id', $entry->cat1)->first(); $category = $categoryModel->getCat($entry->cat1);
return $category->name; 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->on('cats_category.id', '=', 'cats_category_translations.entry_id');
$join->where('cats_category_translations.locale', '=', Request()->session()->get('_locale')); $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(); ->get();
foreach ($cats as $cat) { foreach ($cats as $cat) {
$link = ''; $link = '';
@ -112,7 +113,6 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
$data[] = array( $data[] = array(
'id' => $cat->id, 'id' => $cat->id,
'name' => $cat->name, 'name' => $cat->name,
'locale' => $cat->locale,
'parents' => $link 'parents' => $link
); );
} }

View File

@ -9,7 +9,7 @@
class="img-responsive"> class="img-responsive">
{% endif %} {% endif %}
<font>{{ main_category.name }}</font> <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> </li>
{% endfor %} {% endfor %}
</ul> </ul>

View File

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