-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#27] Fixed issue with voting not redirecting when not logged in.
- Loading branch information
1 parent
80b9b39
commit 4788af0
Showing
5 changed files
with
63 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
<!-- app/views/articles/index.html.erb --> | ||
|
||
<tr style="height:10px"></tr> | ||
<tr> | ||
<td> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,56 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> | ||
|
||
<head> | ||
<title>Haxxor News</title> | ||
<%= csrf_meta_tags %> | ||
<%= csp_meta_tag %> | ||
<%= csp_meta_tag %> | ||
<%= stylesheet_link_tag 'application', media: 'all' %> | ||
<%= javascript_include_tag 'application' %> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"> | ||
<%= stylesheet_link_tag 'application', media: 'all' %> | ||
<%= javascript_include_tag 'application' %> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"> | ||
</head> | ||
<body> | ||
<center> | ||
<table border="0" cellpadding="0" cellspacing="0" width="85%" style="padding:2px" bgcolor="#f6f6ef"> | ||
<tbody> | ||
<tr> | ||
<td bgcolor="#ff6600"> | ||
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding:2px"> | ||
<tbody> | ||
<tr> | ||
<td style="line-height:12pt; height:10px;"> | ||
<span class="pagetop"> | ||
<b class="hnname"> | ||
<%= link_to 'Haxxor News', root_path %> | ||
</b> | ||
<%= link_to 'new', new_article_path %> | ||
</td> | ||
</span> | ||
<td style="text-align:right; padding-right:4px;"> | ||
<div style="display: flex; justify-content: flex-end; gap: 5px;"> | ||
<body> | ||
<center> | ||
<table border="0" cellpadding="0" cellspacing="0" width="85%" style="padding:2px" bgcolor="#f6f6ef"> | ||
<tbody> | ||
<tr> | ||
<td bgcolor="#ff6600"> | ||
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding:2px"> | ||
<tbody> | ||
<tr> | ||
<td style="line-height:12pt; height:10px;"> | ||
<span class="pagetop"> | ||
<% if logged_in? %> | ||
<%= link_to current_user.name, user_path(current_user), class: "user-link" %> | ||
| | ||
<%= link_to "logout", logout_path, method: :delete, class: "logout-link" %> | ||
<% else %> | ||
<%= link_to "login", login_path, method: :get %> | ||
| | ||
<%= link_to "signup", signup_path, method: :get %> | ||
<% end %> | ||
<b class="hnname"> | ||
<%= link_to 'Haxxor News', root_path %> | ||
</b> | ||
<%= link_to 'new', new_article_path %> | ||
</span> | ||
</div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</td> | ||
</tr> | ||
<%=yield%> | ||
</td> | ||
<td style="text-align:right; padding-right:4px;"> | ||
<div style="display: flex; justify-content: flex-end; gap: 5px;"> | ||
<span class="pagetop"> | ||
<% if logged_in? %> | ||
<%= link_to current_user.name, user_path(current_user), class: "user-link" %> | ||
| | ||
<%= link_to "logout", logout_path, method: :delete, class: "logout-link" %> | ||
<% else %> | ||
<%= link_to "login", login_path, method: :get %> | ||
| | ||
<%= link_to "signup", signup_path, method: :get %> | ||
<% end %> | ||
</span> | ||
</div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</td> | ||
</tr> | ||
<%= yield %> | ||
</tbody> | ||
</table> | ||
</center> | ||
</body> | ||
</table> | ||
</center> | ||
</body> | ||
</html> | ||
|