summaryrefslogtreecommitdiff
path: root/app/views/projects/repositories
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-16 22:19:07 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-16 22:19:07 +0300
commit7a167cf1f74b4e74c4ba9de715585a1251165c5b (patch)
tree99ee4ea2b292d7bcfa0adecb711572daf516c44c /app/views/projects/repositories
parenta466b2175adc6021a75f31baabbaa42b14203d44 (diff)
downloadgitlab-ce-7a167cf1f74b4e74c4ba9de715585a1251165c5b.tar.gz
Move branches list to own controller with pagination. Ability to remove branches from UI
Diffstat (limited to 'app/views/projects/repositories')
-rw-r--r--app/views/projects/repositories/_branch.html.haml26
-rw-r--r--app/views/projects/repositories/_filter.html.haml4
-rw-r--r--app/views/projects/repositories/branches.html.haml15
-rw-r--r--app/views/projects/repositories/show.html.haml9
4 files changed, 4 insertions, 50 deletions
diff --git a/app/views/projects/repositories/_branch.html.haml b/app/views/projects/repositories/_branch.html.haml
deleted file mode 100644
index 2115f3c427f..00000000000
--- a/app/views/projects/repositories/_branch.html.haml
+++ /dev/null
@@ -1,26 +0,0 @@
-- 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", alt: ''
- %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
-
diff --git a/app/views/projects/repositories/_filter.html.haml b/app/views/projects/repositories/_filter.html.haml
index e718d48190a..f42493ea4a0 100644
--- a/app/views/projects/repositories/_filter.html.haml
+++ b/app/views/projects/repositories/_filter.html.haml
@@ -5,5 +5,5 @@
= link_to project_protected_branches_path(@project) do
Protected
%i.icon-lock
- = nav_link(path: 'repositories#branches') do
- = link_to 'All branches', branches_project_repository_path(@project)
+ = nav_link(path: 'branches#index') do
+ = link_to 'All branches', project_branches_path(@project)
diff --git a/app/views/projects/repositories/branches.html.haml b/app/views/projects/repositories/branches.html.haml
deleted file mode 100644
index 2bdd304cdac..00000000000
--- a/app/views/projects/repositories/branches.html.haml
+++ /dev/null
@@ -1,15 +0,0 @@
-= render "projects/commits/head"
-.row
- .span3
- = render "filter"
- .span9
- - unless @branches.empty?
- %table
- %thead
- %tr
- %th Name
- %th Last commit
- %th
- %tbody
- - @branches.each do |branch|
- = render "projects/repositories/branch", branch: branch
diff --git a/app/views/projects/repositories/show.html.haml b/app/views/projects/repositories/show.html.haml
index 84a32e62426..611d0eddc4c 100644
--- a/app/views/projects/repositories/show.html.haml
+++ b/app/views/projects/repositories/show.html.haml
@@ -3,12 +3,7 @@
.span3
= render "filter"
.span9
- %table
- %thead
- %tr
- %th Name
- %th Last commit
- %th
+ %ul.bordered-list
- @activities.each do |update|
- = render "branch", branch: update.head
+ = render "projects/branches/branch", branch: update.head