Skip to content

Commit

Permalink
add non-js signout for assessor and judge
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDancingClown committed Aug 1, 2023
1 parent 8eda29d commit 3e626c4
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 8 deletions.
2 changes: 0 additions & 2 deletions app/assets/stylesheets/admin/header-footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,6 @@
background-color: $grey-lightest;
}
}


}

.open .dropdown-toggle {
Expand Down
19 changes: 17 additions & 2 deletions app/views/layouts/application-assessor.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,23 @@ html.no-js
= link_to "Reports", assessor_reports_path(year: @award_year.year), role: "tab"

ul.nav.navbar-nav.navbar-right
li.dropdown
a.dropdown-toggle href="#" data-toggle="dropdown" role="button" aria-expanded="false"
li
details.if-js-hide
summary My Account
ul.dropdown-menu
li
span
strong = current_subject.decorate.full_name
br
small = current_subject.email
li.divider
li
= button_to "Sign out",
destroy_assessor_session_path,
method: :delete,
class: "btn btn-link as-link"

a.dropdown-toggle.if-no-js-hide href="#" data-toggle="dropdown" role="button" aria-expanded="false"
' My account
span.caret
ul.dropdown-menu
Expand Down
19 changes: 17 additions & 2 deletions app/views/layouts/application-judge.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,23 @@ html.no-js
= link_to "Downloads", judge_case_summaries_path

ul.nav.navbar-nav.navbar-right role="navigation"
li.dropdown
a.dropdown-toggle href="#" data-toggle="dropdown" role="button" aria-expanded="false"
li
details.if-js-hide
summary My Account
ul.dropdown-menu
li
span
strong = current_subject.decorate.full_name
br
small = current_subject.email
li.divider
li
= button_to "Sign out",
destroy_judge_session_path,
method: :delete,
class: "btn btn-link as-link"

a.dropdown-toggle.if-no-js-hide href="#" data-toggle="dropdown" role="button" aria-expanded="false"
' My account
span.caret
ul.dropdown-menu
Expand Down
13 changes: 11 additions & 2 deletions app/views/layouts/twofactor.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,17 @@ html.no-js
.navbar-collapse.collapse#nav-main-collapse

ul.nav.navbar-nav.navbar-right
li.dropdown
a.dropdown-toggle href="#" data-toggle="dropdown" role="button" aria-expanded="false"
li
details.if-js-hide
summary My Account
ul.dropdown-menu
li
= button_to "Sign out",
destroy_admin_session_path,
method: :delete,
class: "btn btn-link as-link"

a.dropdown-toggle.if-no-js-hide href="#" data-toggle="dropdown" role="button" aria-expanded="false"
' My account
span.caret
ul.dropdown-menu
Expand Down

0 comments on commit 3e626c4

Please sign in to comment.