rosa-build/app/views/projects/base/_submenu.html.haml

30 lines
1.6 KiB
Plaintext
Raw Normal View History

- content_for :submenu do
- act = action_name.to_sym; contr = controller_name.to_sym
2012-03-23 17:36:37 +00:00
.left
.table-sort-left=image_tag visibility_icon(@project.visibility)
.table-sort-right=@project.name
2012-02-15 16:32:26 +00:00
%nav
%ul
%li= link_to t("project_menu.project"), project_path(@project), :class => (act.in?([:show, :edit]) && contr.in?([:trees, :blobs]) ? 'active' : nil)
%li= link_to t("project_menu.commits"), commits_path(@project), :class => (act.in?([:index, :show]) && contr == :commits ? 'active' : nil)
- if @project.is_rpm and can?(:read, @project => BuildList)
%li= link_to t("project_menu.builds"), project_build_lists_path(@project), :class => (contr == :build_lists ? 'active' : nil)
- if @project.has_issues
2012-03-05 14:00:49 +00:00
%li= link_to t("project_menu.tracker"), project_issues_path(@project), :class => (contr == :issues ? 'active' : nil)
- if @project.has_wiki
%li= link_to t("project_menu.wiki"), project_wiki_index_path(@project), :class => (contr == :wiki ? 'active' : nil)
2012-02-15 16:32:26 +00:00
%li= link_to t("project_menu.readme"), "#" #pending
- if can? :update, @project
%li= link_to t("project_menu.settings"), edit_project_path(@project), :class => (act == :edit && contr == :projects ? 'active' : nil)
2012-05-10 17:57:59 +01:00
%li=link_to t("project_menu.pull_requests"), '#', :class => (contr == :pull_requests ? 'active' : nil), :id => 'send_pull_request'
=form_for PullRequest.new, :url => new_project_pull_requests_path, :html => { :method => :post, :class => :form } do |f|
=hidden_field_tag :ref, @treeish
:javascript
$(function () {
$('#send_pull_request').click(function(){
$('#new_pull_request').submit();
});
})