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

19 lines
1.4 KiB
Plaintext

- content_for :submenu do
- act = action_name.to_sym; contr = controller_name.to_sym; treeish = @project.default_head(params[:treeish])
.left
.table-sort-left=image_tag visibility_icon(@project.visibility)
.table-sort-right=@project.name
%nav
%ul
%li= link_to t("project_menu.code"), tree_path(@project, treeish), :class => (act.in?([:show, :edit, :branches, :tags]) && contr.in?([:trees, :blobs]) || contr == :commits ? 'active' : nil)
- if @project.is_package 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
%li= link_to t("project_menu.tracker", :count => @opened_issues_count), project_issues_path(@project), :class => (contr == :issues ? 'active' : nil)
%li=link_to t("project_menu.pull_requests", :count => @opened_pull_requests_count), project_pull_requests_path(@project), :class => (contr == :pull_requests ? 'active' : nil)
- if @project.has_wiki
%li= link_to t("project_menu.wiki"), project_wiki_index_path(@project), :class => (contr == :wiki ? 'active' : nil)
%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)