Merge lp:~maxiberta/canonical-identity-provider/highlight-sshkeys-menuitem into lp:canonical-identity-provider/release

Proposed by Maximiliano Bertacchini
Status: Merged
Approved by: Maximiliano Bertacchini
Approved revision: no longer in the source branch.
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: lp:~maxiberta/canonical-identity-provider/highlight-sshkeys-menuitem
Merge into: lp:canonical-identity-provider/release
Diff against target: 28 lines (+6/-1)
2 files modified
src/webui/templates/vanilla/widgets/personal-menu.html (+5/-1)
src/webui/views/account.py (+1/-0)
To merge this branch: bzr merge lp:~maxiberta/canonical-identity-provider/highlight-sshkeys-menuitem
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Review via email: mp+379476@code.launchpad.net

Commit message

Highlight the SSH Keys menu item when selected.

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/webui/templates/vanilla/widgets/personal-menu.html'
2--- src/webui/templates/vanilla/widgets/personal-menu.html 2019-11-08 14:47:08 +0000
3+++ src/webui/templates/vanilla/widgets/personal-menu.html 2020-02-19 15:12:36 +0000
4@@ -35,7 +35,11 @@
5 {% endif %}
6 {% ifswitch SSH_KEY_INTEGRATION %}
7 {% url 'ssh_keys' as ssh_url %}
8- {% menu_item "ssh_keys" _("SSH keys") ssh_url None "p-list__item" %}
9+ {% if current_section == 'ssh_keys' %}
10+ {% menu_item "ssh_keys" _("SSH keys") ssh_url None "p-list__item is-active" %}
11+ {% else %}
12+ {% menu_item "ssh_keys" _("SSH keys") ssh_url None "p-list__item" %}
13+ {% endif %}
14 {% endifswitch %}
15 {% url 'auth_log' as auth_log_url %}
16 {% if current_section == 'auth_log' %}
17
18=== modified file 'src/webui/views/account.py'
19--- src/webui/views/account.py 2018-12-13 14:47:48 +0000
20+++ src/webui/views/account.py 2020-02-19 15:12:36 +0000
21@@ -534,6 +534,7 @@
22 messages.error(
23 request, render_to_string('ssh_messages/username_unset.html'))
24 context = {
25+ 'current_section': 'ssh_keys',
26 'delete_key_form': delete_keys_form,
27 'import_key_form': import_key_form,
28 }