Merge branch 'main' into feature/278_membership_fee_settings
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
commit
651f518215
19 changed files with 278 additions and 156 deletions
|
|
@ -12,15 +12,18 @@ defmodule MvWeb.Layouts.Navbar do
|
|||
required: true,
|
||||
doc: "The current user - navbar is only shown when user is present"
|
||||
|
||||
def navbar(assigns) do
|
||||
club_name = get_club_name()
|
||||
attr :club_name, :string,
|
||||
default: nil,
|
||||
doc: "Optional club name - if not provided, will be loaded from database"
|
||||
|
||||
def navbar(assigns) do
|
||||
club_name = assigns[:club_name] || get_club_name()
|
||||
assigns = assign(assigns, :club_name, club_name)
|
||||
|
||||
~H"""
|
||||
<header class="navbar bg-base-100 shadow-sm">
|
||||
<div class="flex-1">
|
||||
<a class="btn btn-ghost text-xl">{@club_name}</a>
|
||||
<a href="/members" class="btn btn-ghost text-xl">{@club_name}</a>
|
||||
<ul class="menu menu-horizontal bg-base-200">
|
||||
<li><.link navigate="/members">{gettext("Members")}</.link></li>
|
||||
<li><.link navigate="/settings">{gettext("Settings")}</.link></li>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue