Commit be18397d82ca16fefed7287c8078a9b41bf37c95
1 parent
933c5e41
Exists in
master
and in
4 other branches
rename ProjectController to ProjectResourceController
Showing
24 changed files
with
66 additions
and
66 deletions
Show diff stats
app/controllers/blame_controller.rb
app/controllers/blob_controller.rb
app/controllers/commit_controller.rb
1 | 1 | # Controller for a specific Commit |
2 | 2 | # |
3 | 3 | # Not to be confused with CommitsController, plural. |
4 | -class CommitController < ProjectController | |
4 | +class CommitController < ProjectResourceController | |
5 | 5 | # Authorize |
6 | 6 | before_filter :authorize_read_project! |
7 | 7 | before_filter :authorize_code_access! | ... | ... |
app/controllers/commits_controller.rb
app/controllers/compare_controller.rb
app/controllers/deploy_keys_controller.rb
app/controllers/hooks_controller.rb
app/controllers/issues_controller.rb
app/controllers/labels_controller.rb
app/controllers/merge_requests_controller.rb
1 | -class MergeRequestsController < ProjectController | |
1 | +class MergeRequestsController < ProjectResourceController | |
2 | 2 | before_filter :module_enabled |
3 | 3 | before_filter :merge_request, only: [:edit, :update, :destroy, :show, :commits, :diffs, :automerge, :automerge_check, :raw] |
4 | 4 | before_filter :validates_merge_request, only: [:show, :diffs, :raw] | ... | ... |
app/controllers/milestones_controller.rb
app/controllers/notes_controller.rb
app/controllers/project_controller.rb
app/controllers/projects_controller.rb
app/controllers/protected_branches_controller.rb
app/controllers/refs_controller.rb
app/controllers/repositories_controller.rb
app/controllers/snippets_controller.rb
app/controllers/team_members_controller.rb
app/controllers/tree_controller.rb
app/controllers/wikis_controller.rb
app/views/layouts/project.html.haml
... | ... | @@ -1,41 +0,0 @@ |
1 | -!!! 5 | |
2 | -%html{ lang: "en"} | |
3 | - = render "layouts/head" | |
4 | - %body{class: "#{app_theme} project"} | |
5 | - = render "layouts/flash" | |
6 | - = render "layouts/head_panel", title: @project.name | |
7 | - .container | |
8 | - %ul.main_menu | |
9 | - = nav_link(html_options: {class: "home #{project_tab_class}"}) do | |
10 | - = link_to @project.code, project_path(@project), title: "Project" | |
11 | - | |
12 | - - if @project.repo_exists? | |
13 | - - if can? current_user, :download_code, @project | |
14 | - = nav_link(controller: %w(tree blob blame)) do | |
15 | - = link_to 'Files', project_tree_path(@project, @ref || @project.root_ref) | |
16 | - = nav_link(controller: %w(commit commits compare repositories protected_branches)) do | |
17 | - = link_to "Commits", project_commits_path(@project, @ref || @project.root_ref) | |
18 | - = nav_link(path: 'projects#graph') do | |
19 | - = link_to "Network", graph_project_path(@project) | |
20 | - | |
21 | - - if @project.issues_enabled | |
22 | - = nav_link(controller: %w(issues milestones labels)) do | |
23 | - = link_to project_issues_filter_path(@project) do | |
24 | - Issues | |
25 | - %span.count.issue_counter= @project.issues.opened.count | |
26 | - | |
27 | - - if @project.repo_exists? && @project.merge_requests_enabled | |
28 | - = nav_link(controller: :merge_requests) do | |
29 | - = link_to project_merge_requests_path(@project) do | |
30 | - Merge Requests | |
31 | - %span.count.merge_counter= @project.merge_requests.opened.count | |
32 | - | |
33 | - - if @project.wall_enabled | |
34 | - = nav_link(path: 'projects#wall') do | |
35 | - = link_to 'Wall', wall_project_path(@project) | |
36 | - | |
37 | - - if @project.wiki_enabled | |
38 | - = nav_link(controller: :wikis) do | |
39 | - = link_to 'Wiki', project_wiki_path(@project, :index) | |
40 | - | |
41 | - .content= yield |
... | ... | @@ -0,0 +1,41 @@ |
1 | +!!! 5 | |
2 | +%html{ lang: "en"} | |
3 | + = render "layouts/head" | |
4 | + %body{class: "#{app_theme} project"} | |
5 | + = render "layouts/flash" | |
6 | + = render "layouts/head_panel", title: @project.name | |
7 | + .container | |
8 | + %ul.main_menu | |
9 | + = nav_link(html_options: {class: "home #{project_tab_class}"}) do | |
10 | + = link_to @project.code, project_path(@project), title: "Project" | |
11 | + | |
12 | + - if @project.repo_exists? | |
13 | + - if can? current_user, :download_code, @project | |
14 | + = nav_link(controller: %w(tree blob blame)) do | |
15 | + = link_to 'Files', project_tree_path(@project, @ref || @project.root_ref) | |
16 | + = nav_link(controller: %w(commit commits compare repositories protected_branches)) do | |
17 | + = link_to "Commits", project_commits_path(@project, @ref || @project.root_ref) | |
18 | + = nav_link(path: 'projects#graph') do | |
19 | + = link_to "Network", graph_project_path(@project) | |
20 | + | |
21 | + - if @project.issues_enabled | |
22 | + = nav_link(controller: %w(issues milestones labels)) do | |
23 | + = link_to project_issues_filter_path(@project) do | |
24 | + Issues | |
25 | + %span.count.issue_counter= @project.issues.opened.count | |
26 | + | |
27 | + - if @project.repo_exists? && @project.merge_requests_enabled | |
28 | + = nav_link(controller: :merge_requests) do | |
29 | + = link_to project_merge_requests_path(@project) do | |
30 | + Merge Requests | |
31 | + %span.count.merge_counter= @project.merge_requests.opened.count | |
32 | + | |
33 | + - if @project.wall_enabled | |
34 | + = nav_link(path: 'projects#wall') do | |
35 | + = link_to 'Wall', wall_project_path(@project) | |
36 | + | |
37 | + - if @project.wiki_enabled | |
38 | + = nav_link(controller: :wikis) do | |
39 | + = link_to 'Wiki', project_wiki_path(@project, :index) | |
40 | + | |
41 | + .content= yield | ... | ... |