Commit 1c9351abf015ef3fc1375511cd0138d2759ca8f5

Authored by Dmitriy Zaporozhets
1 parent b4708d00

Restyle branches list. Remove unneccesary styles from tree avatar

app/assets/stylesheets/sections/tree.scss
@@ -57,10 +57,7 @@ @@ -57,10 +57,7 @@
57 padding-right: 8px; 57 padding-right: 8px;
58 58
59 img.avatar { 59 img.avatar {
60 - border: 0 none;  
61 - float: none;  
62 - margin-right: 0;  
63 - padding: 0; 60 + margin-top: 0;
64 width: 16px; 61 width: 16px;
65 } 62 }
66 } 63 }
app/views/repositories/_branch.html.haml
@@ -3,19 +3,25 @@ @@ -3,19 +3,25 @@
3 %tr 3 %tr
4 %td 4 %td
5 = link_to project_commits_path(@project, branch.name) do 5 = link_to project_commits_path(@project, branch.name) do
  6 + - if @project.protected_branch? branch.name
  7 + %i.icon-lock
  8 + - else
  9 + %i.icon-unlock
6 %strong= truncate(branch.name, length: 60) 10 %strong= truncate(branch.name, length: 60)
7 - if branch.name == @project.root_ref 11 - if branch.name == @project.root_ref
8 %span.label default 12 %span.label default
9 %td 13 %td
10 - = link_to project_commit_path(@project, commit) do  
11 - %code= commit.short_id  
12 -  
13 - = image_tag gravatar_icon(commit.author_email), class: "", width: 16  
14 - = gfm escape_once(truncate(commit.title, length: 40))  
15 - %span.update-author.right 14 + = link_to project_commit_path(@project, commit.id), class: 'commit_short_id' do
  15 + = commit.short_id
  16 + = image_tag gravatar_icon(commit.author_email), class: "avatar s16"
  17 + %span.light
  18 + = gfm escape_once(truncate(commit.title, length: 40))
  19 + %span
16 = time_ago_in_words(commit.committed_date) 20 = time_ago_in_words(commit.committed_date)
17 ago 21 ago
18 %td 22 %td
19 - if can? current_user, :download_code, @project 23 - if can? current_user, :download_code, @project
20 - = link_to "Download", archive_project_repository_path(@project, ref: branch.name), class: "visible_link download_repo_link" 24 + = link_to archive_project_repository_path(@project, ref: branch.name) do
  25 + %i.icon-download
  26 + Download
21 27
app/views/repositories/_branches_head.html.haml
@@ -3,6 +3,8 @@ @@ -3,6 +3,8 @@
3 = nav_link(path: 'repositories#show') do 3 = nav_link(path: 'repositories#show') do
4 = link_to 'Recent', project_repository_path(@project) 4 = link_to 'Recent', project_repository_path(@project)
5 = nav_link(path: 'protected_branches#index') do 5 = nav_link(path: 'protected_branches#index') do
6 - = link_to 'Protected', project_protected_branches_path(@project) 6 + = link_to project_protected_branches_path(@project) do
  7 + %i.icon-lock
  8 + Protected
7 = nav_link(path: 'repositories#branches') do 9 = nav_link(path: 'repositories#branches') do
8 = link_to 'All', branches_project_repository_path(@project) 10 = link_to 'All', branches_project_repository_path(@project)