gitlab-org--gitlab-foss/app/views/projects/_home_panel.html.haml

37 lines
1.8 KiB
Plaintext
Raw Normal View History

- empty_repo = @project.empty_repo?
.project-home-panel{:class => ("empty-project" if empty_repo)}
.project-identicon-holder
2015-02-18 08:16:42 +00:00
= project_icon(@project, alt: '', class: 'avatar project-avatar')
.project-home-row
.project-home-desc
- if @project.description.present?
= escaped_autolink(@project.description)
- if can?(current_user, :admin_project, @project)
–
= link_to 'Edit', edit_namespace_project_path
- elsif !@project.empty_repo? && @repository.readme
- readme = @repository.readme
–
= link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)) do
= readme.name
2015-03-26 19:38:20 +00:00
%span.star.pull-right.prepend-left-10.js-toggler-container{class: @show_star ? 'on' : ''}
- if current_user
= link_to_toggle_star('Star this project.', false, true)
= link_to_toggle_star('Unstar this project.', true, true)
.pull-right.prepend-left-10
- unless @project.empty_repo?
.fork-buttons
- if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace
- if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2
2015-03-27 07:06:38 +00:00
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork', class: 'btn btn-default' do
2014-09-21 21:26:18 +00:00
= link_to_toggle_fork
- else
2015-03-27 07:06:38 +00:00
= link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project", class: 'btn btn-default' do
2014-09-21 21:26:18 +00:00
= link_to_toggle_fork
.project-home-row.hidden-xs
- if current_user && !empty_repo
.project-home-dropdown
= render "dropdown"
= render "shared/clone_panel"