diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2014-08-21 10:14:31 +0200 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2014-09-01 11:49:17 +0200 |
commit | 0cbc19f9449ffc6e624c0b7e22ea837468658377 (patch) | |
tree | e48375611c09c38a14f45adecbe31309f308798b /app/views/layouts/nav | |
parent | 174c00cf2c026a3bdc61d94b45195a5e5c99202f (diff) | |
download | gitlab-ce-0cbc19f9449ffc6e624c0b7e22ea837468658377.tar.gz |
Awesome shortcuts for GitLab
Diffstat (limited to 'app/views/layouts/nav')
-rw-r--r-- | app/views/layouts/nav/_dashboard.html.haml | 8 | ||||
-rw-r--r-- | app/views/layouts/nav/_project.html.haml | 23 |
2 files changed, 15 insertions, 16 deletions
diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml index a300bbc1904..a6e9772d93f 100644 --- a/app/views/layouts/nav/_dashboard.html.haml +++ b/app/views/layouts/nav/_dashboard.html.haml @@ -1,16 +1,16 @@ %ul = nav_link(path: 'dashboard#show', html_options: {class: 'home'}) do - = link_to root_path, title: "Home" do + = link_to root_path, title: 'Home', class: 'shortcuts-activity' do Activity = nav_link(path: 'dashboard#projects') do - = link_to projects_dashboard_path do + = link_to projects_dashboard_path, class: 'shortcuts-projects' do Projects = nav_link(path: 'dashboard#issues') do - = link_to issues_dashboard_path do + = link_to issues_dashboard_path, class: 'shortcuts-issues' do Issues %span.count= current_user.assigned_issues.opened.count = nav_link(path: 'dashboard#merge_requests') do - = link_to merge_requests_dashboard_path do + = link_to merge_requests_dashboard_path, class: 'shortcuts-merge_requests' do Merge Requests %span.count= current_user.assigned_merge_requests.opened.count = nav_link(controller: :help) do diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml index 92ef7923714..b26bc797e63 100644 --- a/app/views/layouts/nav/_project.html.haml +++ b/app/views/layouts/nav/_project.html.haml @@ -1,44 +1,43 @@ -%ul +%ul.project-navigation = nav_link(path: 'projects#show', html_options: {class: "home"}) do - = link_to project_path(@project), title: "Project" do - Project - + = link_to project_path(@project), title: 'Project', class: 'shortcuts-activity' do + Activity - if project_nav_tab? :files = nav_link(controller: %w(tree blob blame edit_tree new_tree)) do - = link_to 'Files', project_tree_path(@project, @ref || @repository.root_ref) + = link_to 'Files', project_tree_path(@project, @ref || @repository.root_ref), class: 'shortcuts-tree' - if project_nav_tab? :commits = nav_link(controller: %w(commit commits compare repositories tags branches)) do - = link_to "Commits", project_commits_path(@project, @ref || @repository.root_ref) + = link_to "Commits", project_commits_path(@project, @ref || @repository.root_ref), class: 'shortcuts-commits' - if project_nav_tab? :network = nav_link(controller: %w(network)) do - = link_to "Network", project_network_path(@project, @ref || @repository.root_ref) + = link_to "Network", project_network_path(@project, @ref || @repository.root_ref), class: 'shortcuts-network' - if project_nav_tab? :graphs = nav_link(controller: %w(graphs)) do - = link_to "Graphs", project_graph_path(@project, @ref || @repository.root_ref) + = link_to "Graphs", project_graph_path(@project, @ref || @repository.root_ref), class: 'shortcuts-graphs' - if project_nav_tab? :issues = nav_link(controller: %w(issues milestones labels)) do - = link_to url_for_project_issues do + = link_to url_for_project_issues, class: 'shortcuts-issues' do Issues - if @project.used_default_issues_tracker? %span.count.issue_counter= @project.issues.opened.count - if project_nav_tab? :merge_requests = nav_link(controller: :merge_requests) do - = link_to project_merge_requests_path(@project) do + = link_to project_merge_requests_path(@project), class: 'shortcuts-merge_requests' do Merge Requests %span.count.merge_counter= @project.merge_requests.opened.count - if project_nav_tab? :wiki = nav_link(controller: :wikis) do - = link_to 'Wiki', project_wiki_path(@project, :home) + = link_to 'Wiki', project_wiki_path(@project, :home), class: 'shortcuts-wiki' - if project_nav_tab? :snippets = nav_link(controller: :snippets) do - = link_to 'Snippets', project_snippets_path(@project) + = link_to 'Snippets', project_snippets_path(@project), class: 'shortcuts-snippets' - if project_nav_tab? :settings = nav_link(html_options: {class: "#{project_tab_class}"}) do |