Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Commit

Permalink
adding link to browse episode source code
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanb committed Aug 18, 2011
1 parent f477de0 commit 24bcaec
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
20 changes: 14 additions & 6 deletions app/views/episodes/_show_notes.html.erb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@
<div class="actions episode_actions"><%= link_to "Edit", edit_episode_path(@episode) %></div> <div class="actions episode_actions"><%= link_to "Edit", edit_episode_path(@episode) %></div>
<% end %> <% end %>


<% if @episode.asciicasts? %> <div class="extra_nav">
<p> <% if @episode.asciicasts? %>
<%= image_tag "icons/asciicasts.png", :size => "12x15", :class => "icon" %> <span class="asciicasts">
<%= link_to "Read on ASCIIcasts", "http://asciicasts.com/episodes/#{@episode.to_param}" %> <%= image_tag "icons/asciicasts.png", :size => "12x15", :class => "icon" %>
</p> <%= link_to "Read on ASCIIcasts", "http://asciicasts.com/episodes/#{@episode.to_param}" %>
<% end %> </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"> <div class="show_notes">
<%= textilize @episode.notes %> <%= textilize @episode.notes %>
Expand Down
Binary file added public/images/icons/browse_code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions public/stylesheets/application.css
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -694,6 +694,14 @@ label.check_box {
left: 320px; left: 320px;
} }


#episode .asciicasts {
padding-right: 20px;
}

#episode .browse_code img {
vertical-align: bottom;
}

#episode .show_notes ul { #episode .show_notes ul {
margin-top: -10px; /* quick hack to move resources list under headline */ margin-top: -10px; /* quick hack to move resources list under headline */
padding-top: 0; padding-top: 0;
Expand Down

0 comments on commit 24bcaec

Please sign in to comment.