Skip to content

Commit b7ca768

Browse files
committed
Enable creation of new branch. Closes #312
1 parent a61f5e9 commit b7ca768

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

app/Http/Controllers/HomeController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ public function frame(Request $request,?Collection $old=NULL): \Illuminate\View\
393393
->with('o',$o)
394394
->with('page_actions',collect([
395395
'copy'=>FALSE,
396-
'create'=>FALSE,
396+
'create'=>TRUE,
397397
'delete'=>TRUE,
398398
'edit'=>TRUE,
399399
'export'=>TRUE,

resources/views/frames/dn.blade.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<ul class="nav">
2020
@if(isset($page_actions) && $page_actions->get('create'))
2121
<li>
22-
<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>
22+
<button class="btn btn-outline-dark p-1 m-1" id="entry-create" data-bs-toggle="tooltip" data-bs-placement="bottom" title="@lang('Create Child Entry')"><i class="fas fa-fw fa-diagram-project fs-5"></i></button>
2323
</li>
2424
@endif
2525
@if(isset($page_actions) && $page_actions->get('export'))
@@ -210,6 +210,11 @@ function editmode() {
210210
}
211211
212212
$(document).ready(function() {
213+
$('button[id=entry-create]').on('click',function(item) {
214+
location.replace('/#{{ Crypt::encryptString(sprintf('*%s|%s','create',$dn)) }}');
215+
location.reload();
216+
});
217+
213218
$('button[id=entry-edit]').on('click',function(item) {
214219
item.preventDefault();
215220

0 commit comments

Comments
 (0)