diff options
Diffstat (limited to 'app/views/projects/repositories/_branch.html.haml')
-rw-r--r-- | app/views/projects/repositories/_branch.html.haml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app/views/projects/repositories/_branch.html.haml b/app/views/projects/repositories/_branch.html.haml new file mode 100644 index 00000000000..dd91e14b66b --- /dev/null +++ b/app/views/projects/repositories/_branch.html.haml @@ -0,0 +1,26 @@ +- commit = Commit.new(Gitlab::Git::Commit.new(branch.commit)) +%tr + %td + = link_to project_commits_path(@project, branch.name) do + - if @project.protected_branch? branch.name + %i.icon-lock + - else + %i.icon-unlock + %strong= truncate(branch.name, length: 60) + - if branch.name == @repository.root_ref + %span.label default + %td + = link_to project_commit_path(@project, commit.id), class: 'commit_short_id' do + = commit.short_id + = image_tag gravatar_icon(commit.author_email), class: "avatar s16" + %span.light + = gfm escape_once(truncate(commit.title, length: 40)) + %span + = time_ago_in_words(commit.committed_date) + ago + %td + - if can? current_user, :download_code, @project + = link_to archive_project_repository_path(@project, ref: branch.name) do + %i.icon-download-alt + Download + |