This repository was archived by the owner on Jan 3, 2023. It is now read-only.
File tree 3 files changed +15
-8
lines changed
3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class PagesController extends Controller
21
21
*/
22
22
public function index ()
23
23
{
24
- $ pages = Page::where ( ' title-> ' . app ()-> getLocale (), ' != ' , '' )-> get ();
24
+ $ pages = Page::get ();
25
25
26
26
return view ('SimpleMenu::pages. ' .config ('simpleMenu.framework ' ).'.pages.index ' , compact ('pages ' ));
27
27
}
Original file line number Diff line number Diff line change 20
20
'title ' => 'Title ' ,
21
21
'roles ' => 'Roles ' ,
22
22
'menus ' => 'Menus ' ,
23
- 'permissions ' => 'Permissions ' ,
23
+ 'locales ' => 'Available In ' ,
24
+ 'permissions ' => 'Permissions '
24
25
],
25
26
],
26
27
'permissions ' => [
Original file line number Diff line number Diff line change 6
6
@lang (' SimpleMenu::messages.pages.title' ) "{{ count ($pages ) } } "
7
7
<a href =" {{ route (' admin.pages.create' ) } }" class =" button is-success" >@lang (' SimpleMenu::messages.app_add_new' )</a >
8
8
</h3 >
9
-
9
+
10
10
<table class =" table is-bordered" >
11
11
<thead >
12
12
<tr >
13
13
<th >@lang (' SimpleMenu::messages.pages.fields.title' )</th >
14
14
<th >@lang (' SimpleMenu::messages.pages.fields.roles' )</th >
15
15
<th >@lang (' SimpleMenu::messages.pages.fields.permissions' )</th >
16
16
<th >@lang (' SimpleMenu::messages.pages.fields.menus' )</th >
17
+ <th >@lang (' SimpleMenu::messages.pages.fields.locales' )</th >
17
18
<th >@lang (' SimpleMenu::messages.ops' )</th >
18
19
</tr >
19
20
</thead >
20
-
21
+
21
22
<tbody >
22
23
@if (count ($pages ) > 0 )
23
24
@foreach ($pages as $page )
24
25
<tr >
25
- <td >{{ $page -> title } } </td >
26
+ <td >{{ collect ( $page -> getTranslations ( ' title' )) -> first () } } </td >
26
27
<td >
27
28
@foreach ($page -> roles ()-> pluck (' name' ) as $role )
28
29
<span class =" tag is-medium is-info" >{{ $role } } </span >
34
35
@endforeach
35
36
</td >
36
37
<td >
37
- @foreach ($page -> menuNames ()-> pluck (' name' ) as $name )
38
- <span class =" tag is-medium is-info" >{{ $name } } </span >
38
+ @foreach ($page -> menuNames ()-> pluck (' name' ) as $menu )
39
+ <span class =" tag is-medium is-info" >{{ $menu } } </span >
40
+ @endforeach
41
+ </td >
42
+ <td >
43
+ @foreach ($page -> getTranslatedLocales (' title' ) as $locale )
44
+ <span class =" tag is-medium is-warning" >{{ $locale } } </span >
39
45
@endforeach
40
46
</td >
41
47
<td >
55
61
@endif
56
62
</tbody >
57
63
</table >
58
- @stop
64
+ @stop
You can’t perform that action at this time.
0 commit comments