Skip to content

Commit 7ac4113

Browse files
committed
All links on header menu open in new tabs now
1 parent 16540f6 commit 7ac4113

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

app/assets/javascripts/layout.js.coffee

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ $(document).ready ->
22
$(".user_menu_link").click (e)->
33
e.preventDefault()
44
$(".user_menu").toggle()
5-
false
5+
false
6+
7+
$(".user_menu a").click (e)->
8+
$(".user_menu").toggle()

app/views/layouts/application.html.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
<%= yield :header_content %>
3535
</div>
3636
<div class="user_menu">
37-
<%= link_to 'Admin console', admin_root_path if current_user.is_admin? %>
38-
<%= link_to 'Edit Account', users_edit_path, @users_edit %><br />
37+
<%= link_to 'Admin console', admin_root_path, :target => "_blank" if current_user.is_admin? %>
38+
<%= link_to 'Edit Account', users_edit_path, :target => "_blank" %><br />
3939
<%= link_to 'Logout', destroy_user_session_path, :method => :delete %><br />
4040
<hr>
4141
<%= link_to 'About Kandan', about_path, :target => "_blank" %>

0 commit comments

Comments
 (0)