Commit 866b9f6d919c90bf402a05780677a5cdd283d582
1 parent
536eb8e8
Exists in
master
and in
4 other branches
Make history link for trees look like action links for blobs
Showing
5 changed files
with
11 additions
and
7 deletions
Show diff stats
app/assets/stylesheets/sections/tree.scss
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
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 |