Commit eb32abcaba33b5213a71aff3ba3079821299a13f

Added method to link file path to blob

Signed-off-by: David A. Cuadrado <krawek@gmail.com>

Commit diff

app/helpers/application_helper.rb

 
235235 text = repository.git.git.show({}, "master:#{possibilities.first}")
236236 markdown(text) rescue text.gsub("\n", "<br/>")
237237 end
238
239 def file_path(repository, filename, head = "master")
240 project_repository_blob_path(repository.project, repository, head, filename)
241 end
238242end
toggle raw diff

app/views/commits/show.html.erb

 
2525 <%= render_diffmode_selector -%>
2626 <% @diffs.each do |file| -%>
2727 <a name="<%= h(file.a_path) -%>"></a>
28 <h4><%=h(file.a_path) -%></h4>
28 <h4><%=link_to h(file.a_path), file_path(@repository, file.a_path) -%></h4>
2929 <%= render_diff(file.diff, @diffmode) -%>
3030 <% end -%>
3131<% end -%>
toggle raw diff