mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-11-03 14:32:41 +09:00
Make home tag translatable
This commit is contained in:
@@ -139,7 +139,7 @@ class ItemController extends Controller
|
|||||||
{
|
{
|
||||||
//
|
//
|
||||||
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', '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['current_tags'] = [];
|
||||||
return view('items.create', $data);
|
return view('items.create', $data);
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ class ItemController extends Controller
|
|||||||
// Get the item
|
// Get the item
|
||||||
$data['item'] = Item::find($id);
|
$data['item'] = Item::find($id);
|
||||||
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', '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']->tags();
|
||||||
//$data['current_tags'] = $data['item']->parent;
|
//$data['current_tags'] = $data['item']->parent;
|
||||||
//die(print_r($data['current_tags']));
|
//die(print_r($data['current_tags']));
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ class TagController extends Controller
|
|||||||
{
|
{
|
||||||
$trash = (bool)$request->input('trash');
|
$trash = (bool)$request->input('trash');
|
||||||
|
|
||||||
$data['apps'] = Item::ofType('tag')->orderBy('title', 'asc')->get();
|
$data['apps'] = Item::ofType('tag')->where('id', '>', 0)->orderBy('title', 'asc')->get();
|
||||||
$data['trash'] = Item::ofType('tag')->onlyTrashed()->get();
|
$data['trash'] = Item::ofType('tag')->where('id', '>', 0)->onlyTrashed()->get();
|
||||||
if($trash) {
|
if($trash) {
|
||||||
return view('tags.trash', $data);
|
return view('tags.trash', $data);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -81,9 +81,9 @@ class Item extends Model
|
|||||||
if(in_array(0, $tags)) {
|
if(in_array(0, $tags)) {
|
||||||
$details = new Item([
|
$details = new Item([
|
||||||
"id" => 0,
|
"id" => 0,
|
||||||
"title" => 'Home dashboard',
|
"title" => __('app.dashboard'),
|
||||||
"url" => '',
|
"url" => '',
|
||||||
"pinned" => 1
|
"pinned" => 0
|
||||||
]);
|
]);
|
||||||
$tagdetails->prepend($details);
|
$tagdetails->prepend($details);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,6 +79,8 @@ return [
|
|||||||
'apps.preview' => 'Preview',
|
'apps.preview' => 'Preview',
|
||||||
'apps.apptype' => 'Application Type',
|
'apps.apptype' => 'Application Type',
|
||||||
|
|
||||||
|
'dashboard' => 'Home dashboard',
|
||||||
|
|
||||||
'user.user_list' => 'Users',
|
'user.user_list' => 'Users',
|
||||||
'user.add_user' => 'Add user',
|
'user.add_user' => 'Add user',
|
||||||
'user.username' => 'Username',
|
'user.username' => 'Username',
|
||||||
|
|||||||
Reference in New Issue
Block a user