File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -204,3 +204,19 @@ function removeTemporalData($uid)
204204 }
205205 }
206206}
207+
208+ if (!function_exists ('shouldShow ' )) {
209+ /**
210+ * @param string $element
211+ *
212+ * @return bool
213+ */
214+ function shouldShow ($ element )
215+ {
216+ if (Session::has ('visibilitySettings ' )) {
217+ return Session::get ('visibilitySettings ' )->{$ element } ?? true ;
218+ } else {
219+ return true ;
220+ }
221+ }
222+ }
Original file line number Diff line number Diff line change @@ -178,17 +178,18 @@ export default {
178178 }
179179 },
180180 mounted () {
181- this .arrowStyle .top = $ (" #navbar-request-button" ).offset ().top + 45 + " px" ;
182- this .arrowStyle .left =
183- $ (" #navbar-request-button" ).offset ().left + 53 + " px" ;
184-
185- window .addEventListener (" resize" , () => {
186- this .arrowStyle .top =
187- $ (" #navbar-request-button" ).offset ().top + 42 + " px" ;
181+ if ($ (" #navbar-request-button" ).length > 0 ) {
182+ this .arrowStyle .top = $ (" #navbar-request-button" ).offset ().top + 45 + " px" ;
188183 this .arrowStyle .left =
189- $ (" #navbar-request-button" ).offset ().left + 32 + " px" ;
190- });
184+ $ (" #navbar-request-button" ).offset ().left + 53 + " px" ;
191185
186+ window .addEventListener (" resize" , () => {
187+ this .arrowStyle .top =
188+ $ (" #navbar-request-button" ).offset ().top + 42 + " px" ;
189+ this .arrowStyle .left =
190+ $ (" #navbar-request-button" ).offset ().left + 32 + " px" ;
191+ });
192+ }
192193 this .updateTotalMessages ();
193194 }
194195};
Original file line number Diff line number Diff line change 8484<body >
8585<a class =" skip-navigation alert alert-info" role =" link" href =" #main" tabindex =" 1" >{{ __ (' Skip to Content' ) } } </a >
8686<div class =" d-flex w-100 mw-100 h-100 mh-100" id =" app-container" >
87+ @if (shouldShow (' leftSideBar' ) )
8788 <div id =" sidebar" class =" d-print-none" :class =" {expanded: expanded}" >
8889 @yield (' sidebar' )
8990 </div >
91+ @else
92+ <div id =" sidebar" class =" d-none invisible" >
93+ </div >
94+ @endif
9095 <div class =" d-flex flex-grow-1 flex-column overflow-hidden" >
9196 <div class =" flex-grow-1" >
9297 @include (' layouts.navbar' )
Original file line number Diff line number Diff line change 9292 </b-navbar-nav >
9393
9494 <b-navbar-nav class =" d-flex align-items-center ml-auto" >
95+ @if (shouldShow (' requestButton' ) )
9596 <component v-bind:is =" 'request-modal'" url =" {{ route (' processes.index' ) } }" v-bind:permission =" {{ \Auth:: user ()-> hasPermissionsFor (' processes' ) } }" ></component >
97+ @endif
9698
9799 @can (' view-notifications' )
98100 <notifications id =" navbar-notifications-button" v-bind:is =" 'notifications'" v-bind:messages =" messages" >
Original file line number Diff line number Diff line change @@ -252,6 +252,7 @@ class="tab-pane card card-body border-top-0 p-3">
252252 />
253253 @endcan
254254 </div >
255+ @if (shouldShow (' requestStatusContainer' ) )
255256 <div class =" ml-md-3 mt-3 mt-md-0" >
256257 <template v-if =" statusLabel" >
257258 <div class =" card" >
@@ -337,6 +338,7 @@ class="btn btn-outline-info btn-block"
337338 </div >
338339 </template >
339340 </div >
341+ @endif
340342 </div >
341343 </div >
342344
Original file line number Diff line number Diff line change 1+ @if (shouldShow (' breadcrumbTrail' ) )
12<div id =" breadcrumbs" >
23 @if (! isset ($dynamic ) )
34 <nav aria-label =" breadcrumb" >
@@ -44,3 +45,4 @@ class="btn btn-secondary btn-sm position-absolute modeler-save-button"
4445 <breadcrumbs ref =" breadcrumbs" :routes =' @json ($routes )' ></breadcrumbs >
4546 @endif
4647</div >
48+ @endif
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ class="card border-0"
8686 </div >
8787 </div >
8888 </div >
89+ @if (shouldShow (' taskStatusContainer' ) )
8990 <div class =" ml-md-3 mt-3 mt-md-0" >
9091 <div class =" card" >
9192 <div :class =" statusCard" >
@@ -199,6 +200,7 @@ class="d-inline-flex pull-left align-items-center"
199200 </ul >
200201 </div >
201202 </div >
203+ @endif
202204 </div >
203205 </div >
204206@endsection
You can’t perform that action at this time.
0 commit comments