Skip to content
Browse files

Only show books if you are logged in.

  • Loading branch information...
1 parent 4d3fe6b commit fe8535c32bc2d535c09952120560856470bc3f77 @andmej committed
Showing with 9 additions and 7 deletions.
  1. +9 −7 app/views/contests/index.html.erb
View
16 app/views/contests/index.html.erb
@@ -29,11 +29,13 @@
<ul>
<li><%= link_to "COCI", "http://hsin.hr/coci/" %></li>
</ul>
- <h3>Books</h3>
- <ul>
- <li><%= link_to "Introduction to Algorithms", "http://s3.amazonaws.com/andmej/cormen.pdf" %></li>
- <li><%= link_to "Introduction to Algorithms (Instructor's manual)", "http://s3.amazonaws.com/andmej/cormen_instructor_manual.pdf" %></li>
- <li><%= link_to "The Algorithm Design Manual", "http://www.cs.sysu.edu.cn/~lxm/DSA/textbook/Skiena.-.TheAlgorithmDesignManual.pdf" %></li>
- <li><%= link_to "Programming Challenges", "http://s3.amazonaws.com/andmej/programming-challenges.pdf" %></li>
- </ul>
+ <% if logged_in? %>
+ <h3>Books</h3>
+ <ul>
+ <li><%= link_to "Introduction to Algorithms", "http://s3.amazonaws.com/andmej/cormen.pdf" %></li>
+ <li><%= link_to "Introduction to Algorithms (Instructor's manual)", "http://s3.amazonaws.com/andmej/cormen_instructor_manual.pdf" %></li>
+ <li><%= link_to "The Algorithm Design Manual", "http://www.cs.sysu.edu.cn/~lxm/DSA/textbook/Skiena.-.TheAlgorithmDesignManual.pdf" %></li>
+ <li><%= link_to "Programming Challenges", "http://s3.amazonaws.com/andmej/programming-challenges.pdf" %></li>
+ </ul>
+ <% end %>
</p>

0 comments on commit fe8535c

Please sign in to comment.
Something went wrong with that request. Please try again.