_home_panel.html.haml 2.25 KB
Newer Older
1
- empty_repo = @project.empty_repo?
2
.project-home-panel.cover-block.clearfix{:class => ("empty-project" if empty_repo)}
3
  .project-identicon-holder
4
    = project_icon(@project, alt: '', class: 'project-avatar avatar s90')
5
  .cover-title.project-home-desc
6 7
    %h1
      = @project.name
8
      %span.visibility-icon.has-tooltip{data: { container: 'body' }, title: visibility_icon_description(@project)}
9 10
        = visibility_level_icon(@project.visibility_level, fw: false)

11 12
  - if @project.description.present?
    .cover-desc.project-home-desc
13 14
      = markdown(@project.description, pipeline: :description)

15 16 17 18 19
  - if forked_from_project = @project.forked_from_project
    .cover-desc
      Forked from
      = link_to project_path(forked_from_project) do
        = forked_from_project.namespace.try(:name)
20

21 22 23 24
  .cover-controls
    - if current_user
      = link_to namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), class: 'btn btn-gray' do
        = icon('rss')
25 26 27 28
      - access = user_max_access_in_project(current_user.id, @project)
      - can_edit = can?(current_user, :admin_project, @project)
      - if access || can_edit
        %span.dropdown.project-settings-dropdown
Jacob Schatz's avatar
Jacob Schatz committed
29
          %a.dropdown-new.btn.btn-gray#project-settings-button{href: '#', 'data-toggle' => 'dropdown'}
30 31 32 33 34 35 36 37 38 39 40
            = icon('cog')
            = icon('angle-down')
          %ul.dropdown-menu.dropdown-menu-right
            - if can_edit
              %li
                = link_to edit_project_path(@project) do
                  Edit Project
            - if access
              %li
                = link_to leave_namespace_project_project_members_path(@project.namespace, @project),
                  data: { confirm: leave_project_message(@project) }, method: :delete, title: 'Leave project' do
Jacob Schatz's avatar
Jacob Schatz committed
41
                  Leave Project
42

43
  .project-repo-buttons
Jacob Schatz's avatar
Jacob Schatz committed
44
    .split-one.count-buttons
45
      = render 'projects/buttons/star'
46
      = render 'projects/buttons/fork'
47

48 49 50
    .clone-row
      .project-clone-holder
        = render "shared/clone_panel"
51

52 53 54 55
      .split-repo-buttons
        .btn-group.pull-left
          = render "projects/buttons/download"
          = render 'projects/buttons/dropdown'
56

57
      = render 'projects/buttons/notifications'
Jacob Schatz's avatar
Jacob Schatz committed
58

59 60
:javascript
  new Star();