%
  #--
  #   Copyright (C) 2011-2012 Gitorious AS
  #
  #   This program is free software: you can redistribute it and/or modify
  #   it under the terms of the GNU Affero General Public License as published by
  #   the Free Software Foundation, either version 3 of the License, or
  #   (at your option) any later version.
  #
  #   This program is distributed in the hope that it will be useful,
  #   but WITHOUT ANY WARRANTY; without even the implied warranty of
  #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  #   GNU Affero General Public License for more details.
  #
  #   You should have received a copy of the GNU Affero General Public License
  #   along with this program.  If not, see .
  #++
  %>
<% @page_title = t("views.graphs.title", :repo_url => h(@repository.url_path), :ref => h(@ref)) -%>
<%= breadcrumbs_from(@root) -%>
  <%= t("views.graphs.title", :repo_url => h(@repository.url_path), :ref => h(@ref)) -%>
<%= cache([[@project, @repository], :graphs, @ref, params[:type]], {:expires_in => 10.minutes}) do -%>
  "
       data-message-url="<%= "/#{@project.slug}/#{@repository.name}/commit/{{id}}" %>"
       data-capillary-url="<%= url_for(:controller => "api/graphs", :action => "show", :branch => params[:branch], :type => params[:type]) %>">
    
This page requires JavaScript
  
  <%= javascript_include_tag capillary_js_paths + ["gitorious/log-graph"], :cache => "capillary" %>
<% end -%>
<%= content_for :sidebar do -%>
  
  
    <% if params[:type] != "all" %>
      - <%= link_to t("views.graphs.type_all"),
              project_repository_graph_in_ref_path(:branch => params[:branch], :type => "all") -%>
 
    <% else %>
      - <%= link_to t("views.graphs.type_normal"),
              project_repository_graph_in_ref_path(:branch => params[:branch], :type => "") -%>
 
    <% end %>
    <%= render_download_links(@project, @repository, params[:branch], :only_list_items => true) %>
  
  <%= cache([project_repository_graph_path, :tags_and_branches],
            { :expires_in => 10.minutes }) do -%>
    
      <%= t("views.logs.branches") %>:
      <% sorted_git_heads(@git.branches).each do |branch| -%>
        - <%= link_to h(branch.name), project_repository_graph_in_ref_path(:branch => ensplat_path(branch.name)), :title => h(branch.name) -%>
 
      <% end -%>
    
    <% unless @git.tags.blank? -%>
      
        
        <% @git.tags.sort{|a, b| a.name <=> b.name }.each do |tag| -%>
          - <%= link_to h(tag.name), project_repository_graph_in_ref_path(:branch => ensplat_path(tag.commit.id)), :title => h(tag.name) -%>
 
        <% end -%>
      
    <% end -%>
  <% end -%>
<% end -%>