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 43 }
44 44  
45 45 .tree-table {
  46 + th .btn {
  47 + margin: -2px -1px;
  48 + padding: 2px 10px;
  49 + }
46 50 td {
47 51 background:#fafafa;
48 52 }
... ...
app/views/tree/_submodule_item.html.haml
... ... @@ -7,5 +7,5 @@
7 7 %strong= truncate(name, length: 40)
8 8 %td
9 9 %code= submodule_item.id[0..10]
10   - %td
  10 + %td{ colspan: 2 }
11 11 = link_to truncate(url, length: 40), url
... ...
app/views/tree/_tree.html.haml
... ... @@ -18,9 +18,8 @@
18 18 %thead
19 19 %th Name
20 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 24 - if tree.up_dir?
26 25 %tr.tree-item
... ... @@ -29,6 +28,7 @@
29 28 = link_to "..", tree.up_dir_path
30 29 %td
31 30 %td
  31 + %td
32 32  
33 33 = render_tree(tree.contents)
34 34  
... ...
app/views/tree/_tree_item.html.haml
... ... @@ -6,4 +6,4 @@
6 6 %span.log_loading.hide
7 7 Loading commit data...
8 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 5  
6 6 Then 'I should see files from repository' do
7 7 page.should have_content "app"
8   - page.should have_content "History"
  8 + page.should have_content "history"
9 9 page.should have_content "Gemfile"
10 10 end
11 11  
12 12 Then 'I should see files from repository for "8470d70"' do
13 13 current_path.should == project_tree_path(@project, "8470d70")
14 14 page.should have_content "app"
15   - page.should have_content "History"
  15 + page.should have_content "history"
16 16 page.should have_content "Gemfile"
17 17 end
18 18  
... ...