Commit 866b9f6d919c90bf402a05780677a5cdd283d582

Authored by Riyad Preukschas
1 parent 536eb8e8

Make history link for trees look like action links for blobs

app/assets/stylesheets/sections/tree.scss
@@ -43,6 +43,10 @@ @@ -43,6 +43,10 @@
43 } 43 }
44 44
45 .tree-table { 45 .tree-table {
  46 + th .btn {
  47 + margin: -2px -1px;
  48 + padding: 2px 10px;
  49 + }
46 td { 50 td {
47 background:#fafafa; 51 background:#fafafa;
48 } 52 }
app/views/tree/_submodule_item.html.haml
@@ -7,5 +7,5 @@ @@ -7,5 +7,5 @@
7 %strong= truncate(name, length: 40) 7 %strong= truncate(name, length: 40)
8 %td 8 %td
9 %code= submodule_item.id[0..10] 9 %code= submodule_item.id[0..10]
10 - %td 10 + %td{ colspan: 2 }
11 = link_to truncate(url, length: 40), url 11 = link_to truncate(url, length: 40), url
app/views/tree/_tree.html.haml
@@ -18,9 +18,8 @@ @@ -18,9 +18,8 @@
18 %thead 18 %thead
19 %th Name 19 %th Name
20 %th Last Update 20 %th Last Update
21 - %th  
22 - Last commit  
23 - = link_to "History", tree.history_path, class: "right" 21 + %th Last Commit
  22 + %th= link_to "history", project_commits_path(@project, @id), class: "btn very_small right"
24 23
25 - if tree.up_dir? 24 - if tree.up_dir?
26 %tr.tree-item 25 %tr.tree-item
@@ -29,6 +28,7 @@ @@ -29,6 +28,7 @@
29 = link_to "..", tree.up_dir_path 28 = link_to "..", tree.up_dir_path
30 %td 29 %td
31 %td 30 %td
  31 + %td
32 32
33 = render_tree(tree.contents) 33 = render_tree(tree.contents)
34 34
app/views/tree/_tree_item.html.haml
@@ -6,4 +6,4 @@ @@ -6,4 +6,4 @@
6 %span.log_loading.hide 6 %span.log_loading.hide
7 Loading commit data... 7 Loading commit data...
8 = image_tag "ajax_loader_tree.gif", width: 14 8 = image_tag "ajax_loader_tree.gif", width: 14
9 - %td.tree_commit 9 + %td.tree_commit{ colspan: 2 }
features/steps/project/project_browse_files.rb
@@ -5,14 +5,14 @@ class ProjectBrowseFiles < Spinach::FeatureSteps @@ -5,14 +5,14 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
5 5
6 Then 'I should see files from repository' do 6 Then 'I should see files from repository' do
7 page.should have_content "app" 7 page.should have_content "app"
8 - page.should have_content "History" 8 + page.should have_content "history"
9 page.should have_content "Gemfile" 9 page.should have_content "Gemfile"
10 end 10 end
11 11
12 Then 'I should see files from repository for "8470d70"' do 12 Then 'I should see files from repository for "8470d70"' do
13 current_path.should == project_tree_path(@project, "8470d70") 13 current_path.should == project_tree_path(@project, "8470d70")
14 page.should have_content "app" 14 page.should have_content "app"
15 - page.should have_content "History" 15 + page.should have_content "history"
16 page.should have_content "Gemfile" 16 page.should have_content "Gemfile"
17 end 17 end
18 18