index.html.haml 2.42 KB
Newer Older
1
- if current_user.require_ssh_key?
2
  .alert-message.block-message.error
3 4 5 6 7 8 9 10
    %p  
      You wont be able to pull/push project code unless you  
      = link_to new_key_path, :class => "vlink" do 
        add new key
      to your profile

%div.dashboard_category
  %h3
11
    %span.ico.projects
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
12
    = link_to "Projects" , "#projects", :id => "projects"
13
    %small
14
      (most recent)
15 16 17 18 19

  %strong.right
    = link_to projects_path do 
      Projects list → 
  %hr
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
  .dashboard_block
    .row
      .span4.right
        %div.lborder.ipadded
          %h3
            = pluralize current_user.projects.count, "project", "projects"
          - if current_user.can_create_project?
            %hr
            %div
              You can create up to
              = current_user.projects_limit
              projects. Click on button below to add a new one
              .link_holder
                %br
                = link_to new_project_path, :class => "btn" do 
                  New Project » 
          - else 
            %hr
            %div
              You've reached project limit for your account. 
              You cannot create new projects.
              .link_holder
                %br
                = link_to profile_path, :class => "btn" do 
                  Your Profile » 
randx's avatar
randx committed
45
      .span8.left= render "dashboard/projects_feed", :projects => @active_projects
46 47 48 49 50
    - if @last_push && @last_push.valid_push?
      .padded.prepend-top-20
        %h5
          %small Latest push was to the #{@last_push.ref_name} #{@last_push.ref_type} of #{@last_push.project.name}:
        %ul.unstyled= render @last_push
51

52
- if @merge_requests.any?
53 54
  %div.dashboard_category
    %h3
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
55 56
      = link_to "Merge Requests" , "#merge_requests", :id => "merge_requests"
      
57
      %small (authored or assigned to you)
58 59
    %strong.right
      = link_to dashboard_merge_requests_path do 
60
        Visit merge requests page → 
61
    %hr
62
    .dashboard_block= render "dashboard/merge_requests_feed"
63

64
- if @issues.any?
65 66
  %div.dashboard_category
    %h3
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
67
      = link_to "Issues" , "#issues", :id => "issues"
68
      %small (assigned to you)
69
    %strong.right
70
      = link_to dashboard_issues_path do 
71
        Visit issues page → 
72
    %hr
73
    .dashboard_block= render "dashboard/issues_feed"
74

75
- if @events.any?
76 77
  %div.dashboard_category
    %h3
78
      %span.ico.activities
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
79
      = link_to "Activities" , "#activities", :id => "activities"
80 81

    %hr
82
    .dashboard_block= render @events