Enable creation of new branch. Closes #312

This commit is contained in:
Deon George 2025-04-20 22:51:43 +10:00
parent a61f5e9b97
commit b7ca768cc6
2 changed files with 7 additions and 2 deletions

View File

@ -393,7 +393,7 @@ class HomeController extends Controller
->with('o',$o) ->with('o',$o)
->with('page_actions',collect([ ->with('page_actions',collect([
'copy'=>FALSE, 'copy'=>FALSE,
'create'=>FALSE, 'create'=>TRUE,
'delete'=>TRUE, 'delete'=>TRUE,
'edit'=>TRUE, 'edit'=>TRUE,
'export'=>TRUE, 'export'=>TRUE,

View File

@ -19,7 +19,7 @@
<ul class="nav"> <ul class="nav">
@if(isset($page_actions) && $page_actions->get('create')) @if(isset($page_actions) && $page_actions->get('create'))
<li> <li>
<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> <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>
</li> </li>
@endif @endif
@if(isset($page_actions) && $page_actions->get('export')) @if(isset($page_actions) && $page_actions->get('export'))
@ -210,6 +210,11 @@
} }
$(document).ready(function() { $(document).ready(function() {
$('button[id=entry-create]').on('click',function(item) {
location.replace('/#{{ Crypt::encryptString(sprintf('*%s|%s','create',$dn)) }}');
location.reload();
});
$('button[id=entry-edit]').on('click',function(item) { $('button[id=entry-edit]').on('click',function(item) {
item.preventDefault(); item.preventDefault();