ごめん…
このコミットが含まれているのは:
コミット
8b8bfd3a54
|
@ -48,18 +48,18 @@ class HomeController extends Controller {
|
|||
return $r->add($rr);
|
||||
}
|
||||
|
||||
public function addContent ($bdl) {
|
||||
public function addContent (Request $rr) {
|
||||
$r = new Content($this->valid, $this->menu, $this->user);
|
||||
return $r->add($bdl);
|
||||
return $r->add($rr);
|
||||
}
|
||||
|
||||
public function editContent ($bdl) {
|
||||
public function editContent (Request $rr) {
|
||||
$r = new Content($this->valid, $this->menu, $this->user);
|
||||
return $r->edit($bdl);
|
||||
return $r->edit($rr);
|
||||
}
|
||||
|
||||
public function delContent ($bdl) {
|
||||
public function delContent (Request $rr) {
|
||||
$r = new Content($this->valid, $this->menu, $this->user);
|
||||
return $r->delete($bdl);
|
||||
return $r->delete($rr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,8 +106,23 @@ class UserController extends Controller {
|
|||
$get = DB::table('users')->where('id', $id)->first();
|
||||
$get->profile = DB::table('usr_profile')->where('user_id', $id)->first();
|
||||
$get->profile->showname = (!empty($get->profile->display_name) && !is_null($get->profile->display_name) ? $get->profile->display_name : $get->username);
|
||||
$perm_id = DB::table('usr_perm_id')->select('perm_id')->where('user_id', $get->id)->first()->perm_id;
|
||||
$ucol = DB::table('usr_perm_module')->select('id', 'colour_m', 'colour_f', 'colour_u')->get();
|
||||
|
||||
if (!empty($get->profile->name_style)) $get->profile->name_style = $get->profile->name_style;
|
||||
else {
|
||||
foreach ($ucol as $j3) {
|
||||
if ($j3->id == $perm_id) {
|
||||
if ($get->profile->gender == 1) $get->profile->name_style = $j3->colour_m;
|
||||
else if ($get->profile->gender == 2) $get->profile->name_style = $j3->colour_f;
|
||||
else $get->profile->name_style = $j3->colour_u;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$get->perm = $valid;
|
||||
if (empty($get->avatar) || $get->avatar == '') $get->avatar = '/img/noicon.webp';
|
||||
if (empty($get->profile->avatar) || $get->profile->avatar == '') $get->profile->avatar = 'img/noicon.webp';
|
||||
$get->profile->avatar = '/'.$get->profile->avatar;
|
||||
|
||||
return $get;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ function userDetail ($id, $kero=null) {
|
|||
$log_username = $log_username->username;
|
||||
$showname = '';
|
||||
$showcol = '';
|
||||
$ucol = DB::table('usr_perm_module')->select('id', 'colour_m', 'colour_f', 'colour_u')->get();
|
||||
|
||||
if (!empty($p3->display_name)) $showname = $p3->display_name;
|
||||
else $showname = $log_username;
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="userdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
@if ($user)
|
||||
<img src="/{{ $user->profile->avatar }}" width="25px" height="25px" alt="{{ $user->profile->showname }}のアイコン" />
|
||||
<img src="{{ $user->profile->avatar }}" width="25px" height="25px" alt="{{ $user->profile->showname }}のアイコン" />
|
||||
<span style="{{ $user->profile->name_style }}">{{ $user->profile->showname }}</span>
|
||||
@else
|
||||
未入会者
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
Route::post('/api/comment/new', 'SiteController@newComment');
|
||||
Route::post('/api/comment/new', 'HomeController@newComment');
|
||||
|
|
新しいイシューから参照