Skip to content

Commit 0aca325

Browse files
authored
Change username nav item (#311)
* Changed user nav item's text from "My User" to user's full name; moved item to beginning of navbar.
1 parent cd74a56 commit 0aca325

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed

devops/dev_bootstrap.sh

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash
22

3+
python_exec=python
4+
pip_exec=pip
5+
36
set -x
47

58
SCRIPT_FILE_PATH=$(readlink -f "${0}")
@@ -12,18 +15,6 @@ CONFIG_FILE_PATH="${LMSWEB_FOLDER}/config.py"
1215
CONFIG_EXAMPLE_FILE_PATH="${LMSWEB_FOLDER}/config.py.example"
1316
DB_BOOTSTRAP_FILE_PATH="${LMSAPP_FOLDER}/lmsdb/bootstrap.py"
1417

15-
if (command -v pip); then
16-
pip_exec=pip
17-
else
18-
pip_exec=pip3
19-
fi
20-
21-
if (command -v python); then
22-
python_exec=python
23-
else
24-
python_exec=python3
25-
fi
26-
2718
if ! (test -f "${CONFIG_FILE_PATH}"); then
2819
echo "Creating config from template"
2920
cp "${CONFIG_EXAMPLE_FILE_PATH}" "${CONFIG_FILE_PATH}"

lms/templates/navbar.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,19 @@
99
</a>
1010
<div class="collapse navbar-collapse" id="navbarNavDropdown">
1111
<ul class="navbar-nav">
12+
<li class="nav-item">
13+
<a href="/user/{{ current_user.id }}" class="nav-link">
14+
<i class="fa fa-user" aria-hidden="true"></i>
15+
{{ current_user.fullname | e }}
16+
</a>
17+
</li>
1218
<li class="nav-item dropdown">
1319
<a id="notifications-icon" href="#" class="nav-link" aria-expanded="false" aria-haspopup="true" aria-label="Notifications" role="button" data-toggle="dropdown">
1420
<i class="fa fa-bell" aria-hidden="true"></i>
1521
{{ _('הודעות') }}
1622
<span id="notification-count" class="badge bg-secondary">0</span>
1723
</a>
18-
<div id="notifications-list" aria-labelledby="navbarDropdown" class="dropdown-menu
24+
<div id="notifications-list" aria-labelledby="navbarDropdown" class="dropdown-menu
1925
{%- if direction == 'rtl' %}
2026
dropdown-menu-right
2127
{%- else %}
@@ -59,14 +65,8 @@
5965
</a>
6066
</li>
6167
{% endif -%}
62-
<li class="nav-item">
63-
<a href="/user/{{ current_user.id }}" class="nav-link">
64-
<i class="fa fa-user" aria-hidden="true"></i>
65-
{{ _('המשתמש שלי') }}
66-
</a>
67-
</li>
6868
</ul>
69-
<ul class="navbar-nav
69+
<ul class="navbar-nav
7070
{%- if direction == 'rtl' %}
7171
mr-auto
7272
{%- else %}

0 commit comments

Comments
 (0)