Skip to content

Commit 705bfb2

Browse files
committed
Update page_actions to be consistent with what we can do so far
1 parent 3a3bf2a commit 705bfb2

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Support is known for these LDAP servers:
6161
- [X] OpenLDAP
6262
- [X] OpenDJ
6363
- [ ] Microsoft Active Directory
64+
- [ ] 389 Directory Server
6465

6566
If there is an LDAP server that you have that you would like to have supported, please open an issue to request it.
6667
You might need to provide access, provide a copy or instructions to get an environment for testing. If you have enabled

app/Http/Controllers/HomeController.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,13 @@ public function frame(Request $request,?Collection $old=NULL): \Illuminate\View\
386386
'dn' => $view
387387
->with('dn',$key['dn'])
388388
->with('o',$o)
389-
->with('page_actions',collect(['edit'=>TRUE])),
389+
->with('page_actions',collect([
390+
'copy'=>FALSE,
391+
'create'=>FALSE,
392+
'delete'=>TRUE,
393+
'edit'=>TRUE,
394+
'export'=>TRUE,
395+
])),
390396

391397
'import' => $view,
392398

resources/views/frames/dn.blade.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,30 @@
99
<div class="col">
1010
<div class="action-buttons float-end">
1111
<ul class="nav">
12-
@if(isset($page_actions) && $page_actions->contains('export'))
12+
@if(isset($page_actions) && $page_actions->get('create'))
13+
<li>
14+
<button class="btn btn-outline-dark p-1 m-1" id="entry-copy-move" data-bs-toggle="tooltip" data-bs-placement="bottom" title="@lang('New Child')" disabled><i class="fas fa-fw fa-diagram-project fs-5"></i></button>
15+
</li>
16+
@endif
17+
@if(isset($page_actions) && $page_actions->get('export'))
1318
<li>
1419
<span id="entry-export" data-bs-toggle="modal" data-bs-target="#page-modal">
1520
<button class="btn btn-outline-dark p-1 m-1" data-bs-toggle="tooltip" data-bs-placement="bottom" title="@lang('Export')"><i class="fas fa-fw fa-download fs-5"></i></button>
1621
</span>
1722
</li>
1823
@endif
19-
@if(isset($page_actions) && $page_actions->contains('copy'))
24+
@if(isset($page_actions) && $page_actions->get('copy'))
2025
<li>
2126
<button class="btn btn-outline-dark p-1 m-1" id="entry-copy-move" data-bs-toggle="tooltip" data-bs-placement="bottom" title="@lang('Copy/Move')" disabled><i class="fas fa-fw fa-copy fs-5"></i></button>
2227
</li>
2328
@endif
24-
@if((isset($page_actions) && $page_actions->contains('edit')) || old())
29+
@if(isset($page_actions) && $page_actions->get('edit'))
2530
<li>
2631
<button class="btn btn-outline-dark p-1 m-1" id="entry-edit" data-bs-toggle="tooltip" data-bs-placement="bottom" title="@lang('Edit Entry')"><i class="fas fa-fw fa-edit fs-5"></i></button>
2732
</li>
2833
@endif
2934
<!-- @todo Dont offer the delete button for an entry with children -->
30-
@if(isset($page_actions) && $page_actions->contains('delete'))
35+
@if(isset($page_actions) && $page_actions->get('delete'))
3136
<li>
3237
<span id="entry-delete" data-bs-toggle="modal" data-bs-target="#page-modal">
3338
<button class="btn btn-outline-danger p-1 m-1" data-bs-custom-class="custom-tooltip-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" title="@lang('Delete Entry')"><i class="fas fa-fw fa-trash-can fs-5"></i></button>

0 commit comments

Comments
 (0)