43 lines
1.9 KiB
Text
43 lines
1.9 KiB
Text
- empty_repo = @project.empty_repo?
|
|
.project-home-panel{:class => ("empty-project" if empty_repo)}
|
|
.project-home-row
|
|
.project-home-desc
|
|
= project_icon(@project.to_param, alt: '', class: 'avatar s32')
|
|
- if @project.description.present?
|
|
= escaped_autolink(@project.description)
|
|
- if can?(current_user, :admin_project, @project)
|
|
–
|
|
= link_to 'Edit', edit_project_path
|
|
- elsif !@project.empty_repo? && @repository.readme
|
|
- readme = @repository.readme
|
|
–
|
|
= link_to project_blob_path(@project, tree_join(@repository.root_ref, readme.name)) do
|
|
= readme.name
|
|
.star-fork-buttons
|
|
- 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
|
|
= link_to project_path(current_user.fork_of(@project)), title: 'Go to my fork' do
|
|
= link_to_toggle_fork
|
|
- else
|
|
= link_to new_project_fork_path(@project), title: "Fork project" do
|
|
= link_to_toggle_fork
|
|
|
|
.star-buttons
|
|
%span.star.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)
|
|
- else
|
|
= link_to_toggle_star('You must sign in to star a project.', false, false)
|
|
|
|
.project-home-row.hidden-xs
|
|
- if current_user && !empty_repo
|
|
.project-home-dropdown
|
|
= render "dropdown"
|
|
- unless @project.empty_repo?
|
|
- if can? current_user, :download_code, @project
|
|
.pull-right.prepend-left-10
|
|
= render 'projects/repositories/download_archive', split_button: true
|
|
= render "shared/clone_panel"
|