Make home tag translatable

This commit is contained in:
Kode 2019-06-13 19:07:38 +01:00
parent 21b1ef5e4b
commit fd2f7f27a6
4 changed files with 8 additions and 6 deletions

View file

@ -139,7 +139,7 @@ class ItemController extends Controller
{
//
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
$data['tags']->prepend('Home dashboard', 0);
$data['tags']->prepend(__('app.dashboard'), 0);
$data['current_tags'] = [];
return view('items.create', $data);
@ -215,7 +215,7 @@ class ItemController extends Controller
// Get the item
$data['item'] = Item::find($id);
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
$data['tags']->prepend('Home dashboard', 0);
$data['tags']->prepend(__('app.dashboard'), 0);
$data['current_tags'] = $data['item']->tags();
//$data['current_tags'] = $data['item']->parent;
//die(print_r($data['current_tags']));

View file

@ -22,8 +22,8 @@ class TagController extends Controller
{
$trash = (bool)$request->input('trash');
$data['apps'] = Item::ofType('tag')->orderBy('title', 'asc')->get();
$data['trash'] = Item::ofType('tag')->onlyTrashed()->get();
$data['apps'] = Item::ofType('tag')->where('id', '>', 0)->orderBy('title', 'asc')->get();
$data['trash'] = Item::ofType('tag')->where('id', '>', 0)->onlyTrashed()->get();
if($trash) {
return view('tags.trash', $data);
} else {

View file

@ -81,9 +81,9 @@ class Item extends Model
if(in_array(0, $tags)) {
$details = new Item([
"id" => 0,
"title" => 'Home dashboard',
"title" => __('app.dashboard'),
"url" => '',
"pinned" => 1
"pinned" => 0
]);
$tagdetails->prepend($details);
}

View file

@ -79,6 +79,8 @@ return [
'apps.preview' => 'Preview',
'apps.apptype' => 'Application Type',
'dashboard' => 'Home dashboard',
'user.user_list' => 'Users',
'user.add_user' => 'Add user',
'user.username' => 'Username',