Commit 61e6751e authored by Sairam Kunala's avatar Sairam Kunala

bug fix: history in commit history not working as expected for tags and branches

parent edeb20e9
...@@ -30,15 +30,15 @@ ...@@ -30,15 +30,15 @@
%th Last Update %th Last Update
%th %th
Last commit Last commit
= link_to "history", project_commits_path(@project, :path => params[:path]), :class => "right" = link_to "history", project_commits_path(@project, :path => params[:path], :branch => params[:branch],:tag => params[:tag]), :class => "right"
- if params[:path] - if params[:path]
- file = File.join(params[:path], "..") - file = File.join(params[:path], "..")
%tr{ :class => "tree-item", :url => tree_file_project_path(@project, @commit.id, file) } %tr{ :class => "tree-item", :url => tree_file_project_path(@project, @commit.id, file) }
%td.tree-item-file-name %td.tree-item-file-name
= image_tag "dir.png" = image_tag "dir.png"
= link_to "..", tree_file_project_path(@project, @commit.id, file, :branch => @branch, :tag => @tag), :remote => :true = link_to "..", tree_file_project_path(@project, @commit.id, file, :branch => @branch, :tag => @tag), :remote => :true
%td %td
%td %td
- contents.select{ |i| i.is_a?(Grit::Tree)}.each do |content| - contents.select{ |i| i.is_a?(Grit::Tree)}.each do |content|
= render :partial => "projects/tree_item", :locals => { :content => content } = render :partial => "projects/tree_item", :locals => { :content => content }
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
}); });
- if params[:path] && request.xhr? - if params[:path] && request.xhr?
:javascript :javascript
$(window).unbind('popstate'); $(window).unbind('popstate');
$(window).bind('popstate', function() { $(window).bind('popstate', function() {
if(location.pathname.search("tree") != -1) { if(location.pathname.search("tree") != -1) {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
%strong %strong
= name = name
= link_to "raw", blob_project_path(@project, :commit_id => @commit.id, :path => params[:path] ), :class => "right", :target => "_blank" = link_to "raw", blob_project_path(@project, :commit_id => @commit.id, :path => params[:path] ), :class => "right", :target => "_blank"
= link_to "history", project_commits_path(@project, :path => params[:path]), :class => "right", :style => "margin-right:10px;" = link_to "history", project_commits_path(@project, :path => params[:path], :branch => params[:branch], :tag => params[:tag] ), :class => "right", :style => "margin-right:10px;"
%br/ %br/
- if file.text? - if file.text?
.view_file_content .view_file_content
...@@ -14,6 +14,6 @@ ...@@ -14,6 +14,6 @@
.view_file_content_image .view_file_content_image
%img{ :src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"} %img{ :src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
- else - else
%p %p
%center No preview for this file type %center No preview for this file type
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment