mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Merge pull request #245 from openclassify/vedat
update column name && add background color
This commit is contained in:
commit
e3e0fd96b7
@ -2,9 +2,10 @@
|
||||
{% for adv in advs %}
|
||||
<div class="col-md-12 mb-2 list-classified">
|
||||
<a href="{{ adv.detail_url }}" class="text-dark">
|
||||
<div class="row bg-light">
|
||||
<div class="col-md-2 justify-content-center align-self-center border-right border-white">
|
||||
<img class="img-thumbnail" src="{{ adv.cover_photo }}" alt="{{ adv.name }}">
|
||||
<div class="row bg-light{% if adv.doping != null %} doping_type4 {% endif %}">
|
||||
<div class="col-md-2 justify-content-center align-self-center text-center border-right border-white">
|
||||
<img class="img-thumbnail" src="{{ adv.cover_photo }}" alt="{{ adv.name }}"
|
||||
style="max-height:80px;">
|
||||
</div>
|
||||
<div class="col-md-7 justify-content-center align-self-center border-right border-white">
|
||||
<div class="row">
|
||||
|
||||
@ -20,8 +20,9 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ addBlock('ad-list/partials/table',{'featured_advs':featured_advs})|raw }}
|
||||
{% for adv in advs %}
|
||||
<tr class="text-center clickable-row" data-href='{{ adv.detail_url }}'>
|
||||
<tr class="text-center clickable-row{% if adv.doping != null %} doping_type4 {% endif %}" data-href='{{ adv.detail_url }}'>
|
||||
<td class="justify-content-center align-middle text-center td-image">
|
||||
<a href="">
|
||||
<img class="img-thumbnail" src="{{ adv.cover_photo }}" alt="{{ adv.name }}">
|
||||
|
||||
@ -199,8 +199,6 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
||||
$join->on('advs_advs.id', '=', 'dopings_dopings.adv_name_id');
|
||||
$join->where('dopings_dopings.doping_type_id', '=', 4);
|
||||
});
|
||||
|
||||
$query = $query->select('advs_advs.*', 'dopings_dopings.id as doping');
|
||||
}
|
||||
if (!empty($param['sort_by'])) {
|
||||
switch ($param['sort_by']) {
|
||||
@ -216,7 +214,13 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
||||
}
|
||||
} else {
|
||||
$query = $query->orderBy('advs_advs.created_at', 'desc');
|
||||
$query = $query->select('advs_advs.*', 'advs_advs_translations.name as name', 'advs_advs_translations.advs_desc as advs_desc');
|
||||
if ($isActiveDopings) {
|
||||
$query = $query->select('advs_advs.*', 'advs_advs_translations.name as name',
|
||||
'advs_advs_translations.advs_desc as advs_desc', 'dopings_dopings.id as doping');
|
||||
} else {
|
||||
$query = $query->select('advs_advs.*', 'advs_advs_translations.name as name',
|
||||
'advs_advs_translations.advs_desc as advs_desc');
|
||||
}
|
||||
}
|
||||
|
||||
if ($type == "list") {
|
||||
|
||||
@ -21,7 +21,8 @@ return [
|
||||
],
|
||||
'icon' => [
|
||||
'name' => 'Icon'
|
||||
],
|
||||
],
|
||||
|
||||
'please_wait' => 'Please wait.Deleting Sub Categories',
|
||||
'category_selection' => 'Category Selection',
|
||||
];
|
||||
|
||||
@ -21,7 +21,8 @@ return [
|
||||
],
|
||||
'icon' => [
|
||||
'name' => 'Icon'
|
||||
],
|
||||
|
||||
],
|
||||
'please_wait' => 'Lütfen bekleyin. Alt Kategoriler Siliniyor',
|
||||
'category_selection' => 'Kategori Seçimi',
|
||||
|
||||
];
|
||||
|
||||
@ -14,7 +14,7 @@ class VisiosoftModuleProfileCreateProfileFields extends Migration
|
||||
*/
|
||||
protected $fields = [
|
||||
'name' => 'anomaly.field_type.text',
|
||||
'user_no' => [
|
||||
'user' => [
|
||||
'type' => 'anomaly.field_type.relationship',
|
||||
'config' => [
|
||||
'related' => UserModel::class,
|
||||
|
||||
@ -25,7 +25,7 @@ class VisiosoftModuleProfileCreateProfileStream extends Migration
|
||||
* @var array
|
||||
*/
|
||||
protected $assignments = [
|
||||
'user_no',
|
||||
'user',
|
||||
'file',
|
||||
'email' => [
|
||||
'required' => true
|
||||
|
||||
@ -25,7 +25,7 @@ class VisiosoftModuleProfileCreateAdressStream extends Migration
|
||||
* @var array
|
||||
*/
|
||||
protected $assignments = [
|
||||
'user_no',
|
||||
'user',
|
||||
'adress_name' => [
|
||||
'required' => true,
|
||||
],
|
||||
|
||||
@ -100,7 +100,7 @@ return [
|
||||
'messages' => [
|
||||
'name' => 'رسائل'
|
||||
],
|
||||
'user_no' => [
|
||||
'user' => [
|
||||
'name' => 'المستعمل'
|
||||
],
|
||||
|
||||
|
||||
@ -133,7 +133,7 @@
|
||||
"name" =>"Mitteilungen",
|
||||
|
||||
],
|
||||
"user_no" => [
|
||||
"user" => [
|
||||
"name" =>"Nutzer",
|
||||
|
||||
],
|
||||
|
||||
@ -133,7 +133,7 @@
|
||||
"name" =>"Μηνύματα",
|
||||
|
||||
],
|
||||
"user_no" => [
|
||||
"user" => [
|
||||
"name" =>"Χρήστης",
|
||||
|
||||
],
|
||||
|
||||
@ -100,7 +100,7 @@ return [
|
||||
'messages' => [
|
||||
'name' => 'Messages'
|
||||
],
|
||||
'user_no' => [
|
||||
'user' => [
|
||||
'name' => 'User'
|
||||
],
|
||||
|
||||
|
||||
@ -133,7 +133,7 @@
|
||||
"name" =>"Mensajes",
|
||||
|
||||
],
|
||||
"user_no" => [
|
||||
"user" => [
|
||||
"name" =>"Usuario",
|
||||
|
||||
],
|
||||
|
||||
@ -133,7 +133,7 @@
|
||||
"name" =>"پیام ها",
|
||||
|
||||
],
|
||||
"user_no" => [
|
||||
"user" => [
|
||||
"name" =>"کاربر",
|
||||
|
||||
],
|
||||
|
||||
@ -133,7 +133,7 @@
|
||||
"name" =>"messages",
|
||||
|
||||
],
|
||||
"user_no" => [
|
||||
"user" => [
|
||||
"name" =>"Utilisateur",
|
||||
|
||||
],
|
||||
|
||||
@ -133,7 +133,7 @@
|
||||
"name" =>"messaggi",
|
||||
|
||||
],
|
||||
"user_no" => [
|
||||
"user" => [
|
||||
"name" =>"Utente",
|
||||
|
||||
],
|
||||
|
||||
@ -133,7 +133,7 @@
|
||||
"name" =>"berichten",
|
||||
|
||||
],
|
||||
"user_no" => [
|
||||
"user" => [
|
||||
"name" =>"Gebruiker",
|
||||
|
||||
],
|
||||
|
||||
@ -133,7 +133,7 @@
|
||||
"name" =>"Mensagens",
|
||||
|
||||
],
|
||||
"user_no" => [
|
||||
"user" => [
|
||||
"name" =>"Do utilizador",
|
||||
|
||||
],
|
||||
|
||||
@ -133,7 +133,7 @@
|
||||
"name" =>"Сообщения",
|
||||
|
||||
],
|
||||
"user_no" => [
|
||||
"user" => [
|
||||
"name" =>"пользователь",
|
||||
|
||||
],
|
||||
|
||||
@ -100,7 +100,7 @@ return [
|
||||
'messages' => [
|
||||
'name' => 'Mesajlar'
|
||||
],
|
||||
'user_no' => [
|
||||
'user' => [
|
||||
'name' => 'Kullanıcı'
|
||||
],
|
||||
|
||||
|
||||
@ -22,9 +22,9 @@ class AdressModel extends ProfileAdressEntryModel implements AdressInterface
|
||||
{
|
||||
if($id != null)
|
||||
{
|
||||
return $this->query()->where('user_no_id',$id)->get();
|
||||
return $this->query()->where('user_id',$id)->get();
|
||||
}
|
||||
return $this->query()->where('user_no_id',Auth::id())->get();
|
||||
return $this->query()->where('user_id',Auth::id())->get();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ class AdressTableBuilder extends TableBuilder
|
||||
'search' => [
|
||||
'filter' => 'search',
|
||||
'fields' => [
|
||||
'user_no',
|
||||
'user',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@ -52,7 +52,7 @@ class AdressController extends AdminController
|
||||
|
||||
public function adresList(AdressTableBuilder $table, $id)
|
||||
{
|
||||
$table->setColumns(['adress_name','user_no']);
|
||||
$table->setColumns(['adress_name','user']);
|
||||
$table->setButtons(['edit' => [
|
||||
'href' => '/admin/profile/adress/editAdress/{entry.id}',
|
||||
],]);
|
||||
|
||||
@ -35,14 +35,14 @@ class ProfileController extends AdminController
|
||||
public function edit(ProfileFormBuilder $form,$id)
|
||||
{
|
||||
$users = UsersUsersEntryModel::find($id);
|
||||
$profiles = ProfileModel::query()->where('user_no_id',$id)->orderBy("id")->first();
|
||||
$profiles = ProfileModel::query()->where('user_id',$id)->orderBy("id")->first();
|
||||
if($profiles == null)
|
||||
{
|
||||
$newProfile = [];
|
||||
$newProfile ['user_no_id'] = $id;
|
||||
$newProfile ['user_id'] = $id;
|
||||
$newProfile ['country_id'] = null;
|
||||
ProfileModel::query()->create($newProfile);
|
||||
$profiles = ProfileModel::query()->where('user_no_id',$id)->orderBy("id")->first();
|
||||
$profiles = ProfileModel::query()->where('user_id',$id)->orderBy("id")->first();
|
||||
}
|
||||
$country = CountryModel::all();
|
||||
return $this->view->make('visiosoft.module.profile::admin.profile.edit',compact('users','profiles','country','form'));
|
||||
@ -81,7 +81,7 @@ class ProfileController extends AdminController
|
||||
$all['file_id'] = $all['file'];
|
||||
unset($all['file']);
|
||||
unset($all['_token'],$all['action']);
|
||||
ProfileModel::query()->where('user_no_id',$id)->update($all);
|
||||
ProfileModel::query()->where('user_id',$id)->update($all);
|
||||
$message = [];
|
||||
$message[] = trans('visiosoft.module.profile::message.success_update');
|
||||
return redirect('admin/profile')->with('success', $message);
|
||||
|
||||
@ -75,7 +75,7 @@ class MyProfileController extends PublicController
|
||||
|
||||
if ($profiles == null) {
|
||||
$newProfile = [];
|
||||
$newProfile ['user_no_id'] = Auth::id();
|
||||
$newProfile ['user_id'] = Auth::id();
|
||||
|
||||
$profileModel->getProfile()->create($newProfile);
|
||||
|
||||
@ -163,7 +163,7 @@ class MyProfileController extends PublicController
|
||||
{
|
||||
$adressModel = new AdressModel();
|
||||
$adress = $adressModel->getAdressFirst($id);
|
||||
if ($adress->getAttribute('user_no_id') == Auth::id()) {
|
||||
if ($adress->getAttribute('user_id') == Auth::id()) {
|
||||
$country = CountryModel::all();
|
||||
return $this->view->make('visiosoft.module.profile::address/edit', compact('adress', 'country'));
|
||||
}
|
||||
@ -179,7 +179,7 @@ class MyProfileController extends PublicController
|
||||
$adressModel = new AdressModel();
|
||||
$adress = $adressModel->getAdressFirst($id);
|
||||
|
||||
if ($adress->getAttribute('user_no_id') == Auth::id()) {
|
||||
if ($adress->getAttribute('user_id') == Auth::id()) {
|
||||
|
||||
$New_value = $request->all();
|
||||
$New_value['country_id'] = $New_value['country'];
|
||||
@ -201,7 +201,7 @@ class MyProfileController extends PublicController
|
||||
}
|
||||
$new_adress = $request->request->all();
|
||||
unset($new_adress['action'], $new_adress['_to*ken']);
|
||||
$new_adress['user_no_id'] = Auth::id();
|
||||
$new_adress['user_id'] = Auth::id();
|
||||
|
||||
$adressModel = new AdressModel();
|
||||
$adressModel->getAdress()->create($new_adress);
|
||||
@ -226,7 +226,7 @@ class MyProfileController extends PublicController
|
||||
}
|
||||
$new_adress = $request->request->all();
|
||||
unset($new_adress['action'], $new_adress['_token']);
|
||||
$new_adress['user_no_id'] = Auth::id();
|
||||
$new_adress['user_id'] = Auth::id();
|
||||
|
||||
$adressModel = new AdressModel();
|
||||
$address = $adressModel->getAdress()->create($new_adress);
|
||||
|
||||
@ -96,7 +96,7 @@ class UserAuthenticator
|
||||
if (isset($credentials['username'])) {
|
||||
$profile = $profileRepository->findProfileForLogin('gsm_phone', $credentials['username']);
|
||||
if ($profile != null) {
|
||||
$find_user = $profileRepository->findUserForLogin('id', $profile->user_no_id);
|
||||
$find_user = $profileRepository->findUserForLogin('id', $profile->user_id);
|
||||
$credentials['username'] = $find_user->username;
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ class ProfileFormHandler
|
||||
$parameters['file_id'] = $builder->getPostValue('file');
|
||||
|
||||
|
||||
$profileModel->where('user_no_id', Auth::id())
|
||||
$profileModel->where('user_id', Auth::id())
|
||||
->update($parameters);
|
||||
|
||||
$messages->success(trans('visiosoft.module.profile::message.success_update'));
|
||||
|
||||
@ -10,7 +10,7 @@ class ProfileModel extends ProfileProfileEntryModel implements ProfileInterface
|
||||
{
|
||||
if($id != null)
|
||||
{
|
||||
return $this->query()->where('user_no_id',$id);
|
||||
return $this->query()->where('user_id',$id);
|
||||
}
|
||||
return $this->query();
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ class ProfileRepository extends EntryRepository implements ProfileRepositoryInte
|
||||
|
||||
public function getProfile($id)
|
||||
{
|
||||
return ProfileModel::query()->where('user_no_id', $id)->first();
|
||||
return ProfileModel::query()->where('user_id', $id)->first();
|
||||
}
|
||||
|
||||
public function findUserForLogin($field, $val)
|
||||
@ -50,7 +50,7 @@ class ProfileRepository extends EntryRepository implements ProfileRepositoryInte
|
||||
if ($user == null) {
|
||||
$profile = $this->findProfileForLogin('gsm_phone', $val);
|
||||
if ($profile != null) {
|
||||
$user = UserModel::query()->find($profile->user_no_id);
|
||||
$user = UserModel::query()->find($profile->user_id);
|
||||
}
|
||||
}
|
||||
return $user;
|
||||
@ -127,14 +127,14 @@ class ProfileRepository extends EntryRepository implements ProfileRepositoryInte
|
||||
|
||||
public function findByUserID($id)
|
||||
{
|
||||
return $this->model->where('user_no_id', $id)->first();
|
||||
return $this->model->where('user_id', $id)->first();
|
||||
}
|
||||
|
||||
public function CheckPhoneNumber($phoneNumber)
|
||||
{
|
||||
return $this->model
|
||||
->where('gsm_phone', $phoneNumber)
|
||||
->where('user_no_id','!=', Auth::id())
|
||||
->where('user_id','!=', Auth::id())
|
||||
->first();
|
||||
}
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ class Register2FormHandler
|
||||
|
||||
/* @var UserInterface $user */
|
||||
$user = $builder->getFormEntry();
|
||||
$profile_parameters['user_no_id'] = $user->getId();
|
||||
$profile_parameters['user_id'] = $user->getId();
|
||||
ProfileModel::query()->create($profile_parameters);
|
||||
|
||||
$activator->start($user);
|
||||
|
||||
@ -39,7 +39,7 @@ class ValidateCredentials
|
||||
//Is email or phone number
|
||||
if (!filter_var($credentials['email'], FILTER_VALIDATE_EMAIL)) {
|
||||
if ($profile = $this->profile->findPhoneNumber($credentials['email'])) {
|
||||
if ($user = $this->repository->find($profile->user_no_id)) {
|
||||
if ($user = $this->repository->find($profile->user_id)) {
|
||||
$credentials['email'] = $user->email;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user