Permalink
Browse files

adding link to browse episode source code

  • Loading branch information...
1 parent f477de0 commit 24bcaec737ff8de10f209370f537ab610d99271d @ryanb committed Aug 18, 2011
@@ -2,12 +2,20 @@
<div class="actions episode_actions"><%= link_to "Edit", edit_episode_path(@episode) %></div>
<% end %>
-<% if @episode.asciicasts? %>
- <p>
- <%= image_tag "icons/asciicasts.png", :size => "12x15", :class => "icon" %>
- <%= link_to "Read on ASCIIcasts", "http://asciicasts.com/episodes/#{@episode.to_param}" %>
- </p>
-<% end %>
+<div class="extra_nav">
+ <% if @episode.asciicasts? %>
+ <span class="asciicasts">
+ <%= image_tag "icons/asciicasts.png", :size => "12x15", :class => "icon" %>
+ <%= link_to "Read on ASCIIcasts", "http://asciicasts.com/episodes/#{@episode.to_param}" %>
+ </span>
+ <% end %>
+ <% if @episode.file_sizes && @episode.file_sizes["zip"] %>
+ <span class="browse_code">
+ <%= image_tag "icons/browse_code.png", :size => "22x21", :class => "icon" %>
+ <%= link_to "Browse Source Code", "http://github.com/railscasts/episode-#{@episode.position}" %>
+ </span>
+ <% end %>
+</div>
<div class="show_notes">
<%= textilize @episode.notes %>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -694,6 +694,14 @@ label.check_box {
left: 320px;
}
+#episode .asciicasts {
+ padding-right: 20px;
+}
+
+#episode .browse_code img {
+ vertical-align: bottom;
+}
+
#episode .show_notes ul {
margin-top: -10px; /* quick hack to move resources list under headline */
padding-top: 0;

0 comments on commit 24bcaec

Please sign in to comment.