BigW Consortium Gitlab

_home_panel.html.haml 2.3 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
  .project-home-desc
6
    %h1= @project.name
7 8 9
    - if @project.description.present?
      = markdown(@project.description, pipeline: :description)

10 11 12 13 14
    - if forked_from_project = @project.forked_from_project
      %p
        Forked from
        = link_to project_path(forked_from_project) do
          = forked_from_project.namespace.try(:name)
15
  .cover-controls.left
16 17
    .visibility-level-label.has_tooltip{title: project_visibility_level_description(@project.visibility_level), data: { container: 'body' } }
      = visibility_level_icon(@project.visibility_level, fw: false)
18
      = visibility_level_label(@project.visibility_level)
19

20 21 22 23
  .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')
24 25 26 27
      - 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 committed
28
          %a.dropdown-new.btn.btn-gray#project-settings-button{href: '#', 'data-toggle' => 'dropdown'}
29 30 31 32 33 34 35 36 37 38 39
            = 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 committed
40
                  Leave Project
41

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

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

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

56
      = render 'projects/buttons/notifications'
57

58 59
:javascript
  new Star();