OSDN Git Service

d2ced59f2c696b758b55c83c1a4ef42a09086ea7
[wvm/gitlab.git] / app / views / projects / show.html.haml
1 = render "home_panel"
2
3 .row
4   .span9
5     = render "events/event_last_push", event: @last_push
6     = render 'shared/event_filter'
7     .content_list
8     .loading.hide
9   .span3.project-side
10     .clearfix
11       - if @project.archived?
12         .alert
13           %h5
14             %i.icon-warning-sign
15             Archived project!
16           %p Repository is read-only
17
18
19       - if @project.forked_from_project
20         .alert.alert-success
21           %i.icon-code-fork.project-fork-icon
22           Forked from:
23           %br
24           = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
25       - unless @project.empty_repo?
26         - if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace
27           - if current_user.already_forked?(@project)
28             = link_to project_path(current_user.fork_of(@project)), class: 'btn btn-block' do
29               %i.icon-compass
30               Go to fork
31           - else
32             = link_to fork_project_path(@project), title: "Fork", class: "btn btn-block", method: "POST" do
33               %i.icon-code-fork
34               Fork repository
35
36         - if can? current_user, :download_code, @project
37           = link_to archive_project_repository_path(@project), class: "btn btn-block" do
38             %i.icon-download-alt
39             %span Download
40           = link_to project_compare_index_path(@project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-block' do
41             Compare code
42
43         - if @repository.readme
44           - readme = @repository.readme
45           = link_to project_blob_path(@project, tree_join(@repository.root_ref, readme.name)), class: 'btn btn-block' do
46             = readme.name
47
48     .prepend-top-10
49       %p
50         %span.light Created on
51         #{@project.created_at.stamp('Aug 22, 2013')}
52       %p
53         %span.light Owned by
54         - if @project.group
55           #{link_to @project.group.name, @project.group} Group
56         - else
57           #{link_to @project.owner_name, @project.owner}
58
59
60       - if @project.gitlab_ci?
61         %hr
62         = link_to @project.gitlab_ci_service.builds_path do
63           = image_tag @project.gitlab_ci_service.status_img_path, alt: "build status"