Now with ability to toggle hidden and disabled sessions.

This commit is contained in:
Scott Idem
2024-08-13 18:58:56 -04:00
parent e83623526c
commit 37b2145f81
5 changed files with 181 additions and 28 deletions

View File

@@ -29,7 +29,7 @@ let ae_triggers: key_val = {};
class="flex flex-row flex-wrap gap-1 items-center justify-around w-full">
<span
class="ae_menu__navigation_options"
class="ae_menu__navigation_options flex flex-row items-center justify-around"
class:hidden={!$ae_loc.trusted_access}
>
<a
@@ -52,8 +52,33 @@ let ae_triggers: key_val = {};
</span>
<span
class="ae_menu__object_options"
class="ae_menu__object_options flex flex-row items-center justify-around"
>
<!-- Button to toggle between showing and not showing the extended options menu -->
<button
type="button"
on:click={() => {
if ($events_loc.pres_mgmt.show_menu__session_search == 'options') {
$events_loc.pres_mgmt.show_menu__session_search = null;
} else {
$events_loc.pres_mgmt.show_menu__session_search = 'options';
}
}}
class="{ae_snip.classes__events_pres_mgmt_menu__button}"
class:hidden={!$ae_loc.trusted_access}
title="Options for the presenter"
>
<span class="fas fa-cog m-1"></span>
{#if $events_loc.pres_mgmt.show_menu__session_search == 'options'}
Hide
{:else}
<span class="hidden">
Show
</span>
{/if}
Options?
</button>
<button
type="button"
on:click={() => {
@@ -89,11 +114,85 @@ let ae_triggers: key_val = {};
<!-- BEGIN: The expanded menu area for information and options -->
<div
class="flex flex-row items-center justify-around w-full bg-blue-100 hover:bg-blue-200 border border-blue-200 hover:border-blue-400 p-2 rounded-md"
class:hidden={$events_loc.pres_mgmt.show_menu__session != 'options'}
class:hidden={$events_loc.pres_mgmt.show_menu__session_search != 'options'}
>
{#if $ae_loc.authenticated_access}
<!-- Button to toggle between the showing hidden sessions -->
{#if $events_loc.pres_mgmt.qry_hidden == 'all'}
<button
type="button"
on:click={() => {
if ($events_loc.pres_mgmt.qry_hidden == 'all') {
$events_loc.pres_mgmt.qry_hidden = 'not_hidden';
} else {
$events_loc.pres_mgmt.qry_hidden = 'all';
}
}}
class="btn btn-sm variant-ghost-success"
title="Hide sessions marked as hidden?"
>
<span class="fas fa-eye-slash m-1"></span>
Hide Sessions?
</button>
{:else}
<button
type="button"
on:click={() => {
if ($events_loc.pres_mgmt.qry_hidden == 'all') {
$events_loc.pres_mgmt.qry_hidden = 'not_hidden';
} else {
$events_loc.pres_mgmt.qry_hidden = 'all';
}
}}
class="btn btn-sm variant-ghost-warning"
title="Show all (hidden) sessions?"
>
<span class="fas fa-eye m-1"></span>
Show All (Hidden) Sessions?
</button>
{/if}
{/if}
{#if $ae_loc.administrator_access}
{#if $events_loc.pres_mgmt.qry_enabled == 'all'}
<button
type="button"
on:click={() => {
if ($events_loc.pres_mgmt.qry_enabled == 'all') {
$events_loc.pres_mgmt.qry_enabled = 'enabled';
} else {
$events_loc.pres_mgmt.qry_enabled = 'all';
}
}}
class="btn btn-sm variant-ghost-success"
title="Hide disabled sessions?"
>
<span class="fas fa-eye-slash m-1"></span>
Hide Disabled Sessions?
</button>
{:else}
<button
type="button"
on:click={() => {
if ($events_loc.pres_mgmt.qry_enabled == 'all') {
$events_loc.pres_mgmt.qry_enabled = 'enabled';
} else {
$events_loc.pres_mgmt.qry_enabled = 'all';
}
}}
class="btn btn-sm variant-ghost-warning"
title="Show disabled sessions?"
>
<span class="fas fa-eye m-1"></span>
Show All (Disabled) Sessions?
</button>
{/if}
{/if}
</div> <!-- END: The expanded menu area for information and options -->
<Element_data_store
ds_code="events__pres_mgmt__session_search_help"
ds_name="Default: Events - Pres Mgmt Session Search Help"
@@ -125,4 +224,4 @@ let ae_triggers: key_val = {};
<!-- Menu? -->
</button>
</div>
</div>
</div> <!-- End of the new standard page specific menu -->