repo branches and tags
This commit is contained in:
parent
d8247012b5
commit
a667c71312
7 changed files with 62 additions and 5 deletions
|
@ -598,6 +598,7 @@ h4.middle-panel {
|
|||
}
|
||||
}
|
||||
}
|
||||
.merge-tabs.repository .tab span{ background: url("images.png") no-repeat -38px -77px; }
|
||||
.activities-tab span { background: url("images.png") no-repeat -161px -1px; }
|
||||
.stat-tab span,
|
||||
.team-tab span,
|
||||
|
|
|
@ -11,4 +11,12 @@ class RepositoriesController < ApplicationController
|
|||
def show
|
||||
@activities = @project.fresh_commits(20)
|
||||
end
|
||||
|
||||
def branches
|
||||
@branches = @project.repo.heads.sort_by(&:name)
|
||||
end
|
||||
|
||||
def tags
|
||||
@tags = @project.repo.tags.sort_by(&:name).reverse
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
= link_to project_repository_path(@project), :class => "activities-tab tab #{'active' if current_page?(project_repository_path(@project)) }" do
|
||||
%span
|
||||
Activities
|
||||
= link_to "#", :class => "tab" do
|
||||
= link_to branches_project_repository_path(@project), :class => "tab #{'active' if current_page?(branches_project_repository_path(@project)) }" do
|
||||
%span
|
||||
Branches
|
||||
= link_to "#", :class => "tab" do
|
||||
= link_to tags_project_repository_path(@project), :class => "tab #{'active' if current_page?(tags_project_repository_path(@project)) }" do
|
||||
%span
|
||||
Tags
|
||||
= link_to "#", :class => "tab" do
|
||||
-#= link_to "#", :class => "tab" do
|
||||
%span
|
||||
Hooks
|
||||
= link_to "#", :class => "tab" do
|
||||
-#= link_to "#", :class => "tab" do
|
||||
%span
|
||||
Deploy Keys
|
||||
|
||||
|
|
10
app/views/repositories/branches.html.haml
Normal file
10
app/views/repositories/branches.html.haml
Normal file
|
@ -0,0 +1,10 @@
|
|||
= render "head"
|
||||
- unless @branches.empty?
|
||||
%div.update-data.ui-box.ui-box-small
|
||||
.data
|
||||
- @branches.each do |branch|
|
||||
%a.update-item{:href => project_commits_path(@project, :ref => branch.name)}
|
||||
%span.update-title{:style => "margin-bottom:0px;"}
|
||||
= branch.name
|
||||
- else
|
||||
%h3 No brances
|
10
app/views/repositories/tags.html.haml
Normal file
10
app/views/repositories/tags.html.haml
Normal file
|
@ -0,0 +1,10 @@
|
|||
= render "head"
|
||||
- unless @tags.empty?
|
||||
%div.update-data.ui-box.ui-box-small
|
||||
.data
|
||||
- @tags.each do |tag|
|
||||
%a.update-item{:href => project_commits_path(@project, :ref => tag.name)}
|
||||
%span.update-title{:style => "margin-bottom:0px;"}
|
||||
= tag.name
|
||||
- else
|
||||
%h3 No tags
|
Loading…
Add table
Add a link
Reference in a new issue