Skip to content

Commit

Permalink
area More then one display #185
Browse files Browse the repository at this point in the history
  • Loading branch information
schefbi committed Aug 28, 2024
1 parent c70a230 commit 1735abf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/framework/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function isInitialized() {
}

// group events by areaOfEducation, EventCategory and Id
let eventsByArea = { areas: {}, areaKeys: [] };
let eventsByArea = { areas: {}, areaKeys: [], moreOneAreaKeys: true };
let eventsById = [];

/**
Expand Down Expand Up @@ -92,6 +92,7 @@ export function init() {

// sort areaKeys
eventsByArea.areaKeys = Object.keys(eventsByArea.areas).sort();
eventsByArea.moreOneAreaKeys = eventsByArea.areaKeys.length === 1 && settings.eventCategoryDropdown === false ? false : true;

// sort categoryKeys
eventsByArea.areaKeys.forEach(area =>
Expand Down
2 changes: 2 additions & 0 deletions app/templates/application.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

{{! NAVIGATION }}
<nav class="uk-navbar-container uk-margin-top" data-uk-navbar>
{{#if this.model.moreOneAreaKeys}}
<div class="uk-navbar-left">
<ul class="uk-navbar-nav">
{{#each this.model.areaKeys as |areaKey|}}
Expand All @@ -20,6 +21,7 @@
{{/each}}
</ul>
</div>
{{/if}}
<div class="uk-navbar-right">
<ul class="uk-navbar-nav">
<li>
Expand Down

0 comments on commit 1735abf

Please sign in to comment.