summaryrefslogtreecommitdiff
path: root/app/views/projects/show.html.haml
blob: 7c5b11e4be060b8d3c72f4eb509c3bb6d9025fb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
= render "project_head"

.entry
  .row
    .span7
      .form-horizontal
        .input-prepend.project_clone_holder

          %span.add-on git clone
          = link_to "SSH", "#", :class => "btn small active", :"data-clone" => @project.ssh_url_to_repo
          = link_to "HTTP", "#", :class => "btn small", :"data-clone" => @project.http_url_to_repo
          = text_field_tag :project_clone, @project.url_to_repo, :class => "one_click_select span5"
    .span4.right
      .right
        - if can? current_user, :download_code, @project
          = link_to archive_project_repository_path(@project), :class => "btn small grouped" do
            %i.icon-download-alt
            Download
        - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
          = link_to new_project_merge_request_path(@project), :title => "New Merge Request", :class => "btn small grouped" do
            Merge Request
        - if @project.issues_enabled && can?(current_user, :write_issue, @project)
          = link_to new_project_issue_path(@project), :title => "New Issue", :class => "btn small grouped" do
            Issue

= render "events/event_last_push", :event => @last_push
.content_list= render @events

:javascript 
  $(function(){
    var link_sel = ".project_clone_holder a";
    $(link_sel).bind("click", function() { 
      $(link_sel).removeClass("active");
      $(this).addClass("active");
      $("#project_clone").val($(this).attr("data-clone"));
    })
  })