Skip to content

Commit

Permalink
Display courses in tabs with content (the content is just their name.…
Browse files Browse the repository at this point in the history
….. for now).
  • Loading branch information
zachlatta committed Aug 15, 2013
1 parent e6fd527 commit 723475e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
8 changes: 0 additions & 8 deletions app/views/students/_course_nav.html.erb

This file was deleted.

20 changes: 19 additions & 1 deletion app/views/students/_course_overview.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
<%= render 'course_nav' %>
<ul class="nav nav-tabs">
<% @student.courses.each do |c| %>
<li <%= "class=active" if c == @student.courses.first %>>
<%= link_to c.name, "##{ c }", data: { toggle: "tab" } %>
</li>
<% end %>
<li>
<%= link_to "Add Course", "#add-course-modal", data: { toggle: "modal" } %>
</li>
</ul>

<div class="tab-content">
<% @student.courses.each do |c| %>
<div class="tab-pane <%= 'active' if c == @student.courses.first %>"
id="<%= c %>">
<%= c.name %>
</div>
<% end %>
</div>

0 comments on commit 723475e

Please sign in to comment.