From 1e9e867f5921962904a3e061eb1a35137ffa0fe3 Mon Sep 17 00:00:00 2001 From: Andrew Widdersheim Date: Mon, 4 May 2015 18:19:34 -0400 Subject: [PATCH 1/3] Fix branch labels being underlined as links When hovering over the branch labels they are underlined since they are part of the link to the branch. This does not look very good. Removed branch labels as being part of the link to the branch. --- app/views/projects/branches/_branch.html.haml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 4e7415be4aa..9ceca2c8102 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -1,14 +1,13 @@ - commit = @repository.commit(branch.target) %li(class="js-branch-#{branch.name}") %h4 - = link_to namespace_project_tree_path(@project.namespace, @project, branch.name) do - %strong.str-truncated= branch.name - - if branch.name == @repository.root_ref - %span.label.label-info default - - if @project.protected_branch? branch.name - %span.label.label-success - %i.fa.fa-lock - protected + %strong= link_to branch.name, namespace_project_tree_path(@project.namespace, @project, branch.name), class: 'str-truncated' + - if branch.name == @repository.root_ref + %span.label.label-info default + - if @project.protected_branch? branch.name + %span.label.label-success + %i.fa.fa-lock + protected .pull-right - if can?(current_user, :download_code, @project) = render 'projects/repositories/download_archive', ref: branch.name, btn_class: 'btn-grouped btn-group-xs' -- GitLab From e0594d0ad2aa2c5c2f575582591742e16d19f2bf Mon Sep 17 00:00:00 2001 From: Andrew Widdersheim Date: Mon, 4 May 2015 19:06:48 -0400 Subject: [PATCH 2/3] Fix class for branch name --- app/views/projects/branches/_branch.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 9ceca2c8102..805fcc42726 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -1,7 +1,7 @@ - commit = @repository.commit(branch.target) %li(class="js-branch-#{branch.name}") %h4 - %strong= link_to branch.name, namespace_project_tree_path(@project.namespace, @project, branch.name), class: 'str-truncated' + %strong.str-truncated= link_to branch.name, namespace_project_tree_path(@project.namespace, @project, branch.name) - if branch.name == @repository.root_ref %span.label.label-info default - if @project.protected_branch? branch.name -- GitLab From bccce2fe339ed811ef35f81fe58d5b84713d69ce Mon Sep 17 00:00:00 2001 From: Andrew Widdersheim Date: Mon, 4 May 2015 23:26:33 -0400 Subject: [PATCH 3/3] Use haml whitespace removal --- app/views/projects/branches/_branch.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 805fcc42726..fca50501949 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -1,7 +1,8 @@ - commit = @repository.commit(branch.target) %li(class="js-branch-#{branch.name}") %h4 - %strong.str-truncated= link_to branch.name, namespace_project_tree_path(@project.namespace, @project, branch.name) + = link_to namespace_project_tree_path(@project.namespace, @project, branch.name) do + %strong.str-truncated>= branch.name - if branch.name == @repository.root_ref %span.label.label-info default - if @project.protected_branch? branch.name -- GitLab