Commit 0283fff5 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'master' into extend_markdown_upload

# Conflicts:
#	app/views/projects/issues/_form.html.haml
#	app/views/projects/merge_requests/_form.html.haml
#	app/views/projects/merge_requests/_new_submit.html.haml
#	app/views/projects/milestones/_form.html.haml
#	app/views/projects/notes/_form.html.haml
#	app/views/projects/wikis/_form.html.haml
#	config/routes.rb
#	spec/controllers/projects_controller_spec.rb
parents aba12515 7561b1c2
Please view this file on the master branch, on stable branches it's out of date.
v 7.9.0 (unreleased) v 7.9.0 (unreleased)
- Move labels/milestones tabs to sidebar - Move labels/milestones tabs to sidebar
- Upgrade Rails gem to version 4.1.9.
- Improve error messages for file edit failures
- Improve UI for commits, issues and merge request lists - Improve UI for commits, issues and merge request lists
- Fix commit comments on first line of diff not rendering in Merge Request Discussion view. - Fix commit comments on first line of diff not rendering in Merge Request Discussion view.
v 7.8.0 (unreleased) v 7.8.0
- Fix access control and protection against XSS for note attachments and other uploads. - Fix access control and protection against XSS for note attachments and other uploads.
- Fix broken access control for note attachments (Hannes Rosenögger) - Fix broken access control for note attachments (Hannes Rosenögger)
- Generalize image upload in drag and drop in markdown to all files (Hannes Rosenögger) - Generalize image upload in drag and drop in markdown to all files (Hannes Rosenögger)
......
...@@ -176,9 +176,6 @@ gem 'ace-rails-ap' ...@@ -176,9 +176,6 @@ gem 'ace-rails-ap'
# Keyboard shortcuts # Keyboard shortcuts
gem 'mousetrap-rails' gem 'mousetrap-rails'
# Semantic UI Sass for Sidebar
gem 'semantic-ui-sass', '~> 1.8.0'
gem "sass-rails", '~> 4.0.2' gem "sass-rails", '~> 4.0.2'
gem "coffee-rails" gem "coffee-rails"
gem "uglifier" gem "uglifier"
...@@ -251,8 +248,8 @@ group :development, :test do ...@@ -251,8 +248,8 @@ group :development, :test do
gem 'jasmine', '2.0.2' gem 'jasmine', '2.0.2'
gem "spring", '1.1.3' gem "spring", '1.3.1'
gem "spring-commands-rspec", '1.0.1' gem "spring-commands-rspec", '1.0.4'
gem "spring-commands-spinach", '1.0.0' gem "spring-commands-spinach", '1.0.0'
end end
......
...@@ -3,31 +3,31 @@ GEM ...@@ -3,31 +3,31 @@ GEM
specs: specs:
RedCloth (4.2.9) RedCloth (4.2.9)
ace-rails-ap (2.0.1) ace-rails-ap (2.0.1)
actionmailer (4.1.1) actionmailer (4.1.9)
actionpack (= 4.1.1) actionpack (= 4.1.9)
actionview (= 4.1.1) actionview (= 4.1.9)
mail (~> 2.5.4) mail (~> 2.5, >= 2.5.4)
actionpack (4.1.1) actionpack (4.1.9)
actionview (= 4.1.1) actionview (= 4.1.9)
activesupport (= 4.1.1) activesupport (= 4.1.9)
rack (~> 1.5.2) rack (~> 1.5.2)
rack-test (~> 0.6.2) rack-test (~> 0.6.2)
actionview (4.1.1) actionview (4.1.9)
activesupport (= 4.1.1) activesupport (= 4.1.9)
builder (~> 3.1) builder (~> 3.1)
erubis (~> 2.7.0) erubis (~> 2.7.0)
activemodel (4.1.1) activemodel (4.1.9)
activesupport (= 4.1.1) activesupport (= 4.1.9)
builder (~> 3.1) builder (~> 3.1)
activerecord (4.1.1) activerecord (4.1.9)
activemodel (= 4.1.1) activemodel (= 4.1.9)
activesupport (= 4.1.1) activesupport (= 4.1.9)
arel (~> 5.0.0) arel (~> 5.0.0)
activeresource (4.0.0) activeresource (4.0.0)
activemodel (~> 4.0) activemodel (~> 4.0)
activesupport (~> 4.0) activesupport (~> 4.0)
rails-observers (~> 0.1.1) rails-observers (~> 0.1.1)
activesupport (4.1.1) activesupport (4.1.9)
i18n (~> 0.6, >= 0.6.9) i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7) json (~> 1.7, >= 1.7.7)
minitest (~> 5.1) minitest (~> 5.1)
...@@ -81,7 +81,7 @@ GEM ...@@ -81,7 +81,7 @@ GEM
json (>= 1.7) json (>= 1.7)
celluloid (0.16.0) celluloid (0.16.0)
timers (~> 4.0.0) timers (~> 4.0.0)
charlock_holmes (0.6.9.4) charlock_holmes (0.7.3)
cliver (0.3.2) cliver (0.3.2)
coderay (1.1.0) coderay (1.1.0)
coercible (1.0.0) coercible (1.0.0)
...@@ -312,9 +312,8 @@ GEM ...@@ -312,9 +312,8 @@ GEM
rb-fsevent (>= 0.9.3) rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9) rb-inotify (>= 0.9)
lumberjack (1.0.4) lumberjack (1.0.4)
mail (2.5.4) mail (2.6.3)
mime-types (~> 1.16) mime-types (>= 1.16, < 3)
treetop (~> 1.4.8)
method_source (0.8.2) method_source (0.8.2)
mime-types (1.25.1) mime-types (1.25.1)
mini_portile (0.6.1) mini_portile (0.6.1)
...@@ -381,7 +380,6 @@ GEM ...@@ -381,7 +380,6 @@ GEM
cliver (~> 0.3.1) cliver (~> 0.3.1)
multi_json (~> 1.0) multi_json (~> 1.0)
websocket-driver (>= 0.2.0) websocket-driver (>= 0.2.0)
polyglot (0.3.4)
posix-spawn (0.3.9) posix-spawn (0.3.9)
powerpack (0.0.9) powerpack (0.0.9)
pry (0.9.12.4) pry (0.9.12.4)
...@@ -412,30 +410,30 @@ GEM ...@@ -412,30 +410,30 @@ GEM
rack (>= 1.1) rack (>= 1.1)
rack-protection (1.5.1) rack-protection (1.5.1)
rack rack
rack-test (0.6.2) rack-test (0.6.3)
rack (>= 1.0) rack (>= 1.0)
rails (4.1.1) rails (4.1.9)
actionmailer (= 4.1.1) actionmailer (= 4.1.9)
actionpack (= 4.1.1) actionpack (= 4.1.9)
actionview (= 4.1.1) actionview (= 4.1.9)
activemodel (= 4.1.1) activemodel (= 4.1.9)
activerecord (= 4.1.1) activerecord (= 4.1.9)
activesupport (= 4.1.1) activesupport (= 4.1.9)
bundler (>= 1.3.0, < 2.0) bundler (>= 1.3.0, < 2.0)
railties (= 4.1.1) railties (= 4.1.9)
sprockets-rails (~> 2.0) sprockets-rails (~> 2.0)
rails-observers (0.1.2) rails-observers (0.1.2)
activemodel (~> 4.0) activemodel (~> 4.0)
rails_autolink (1.1.6) rails_autolink (1.1.6)
rails (> 3.1) rails (> 3.1)
railties (4.1.1) railties (4.1.9)
actionpack (= 4.1.1) actionpack (= 4.1.9)
activesupport (= 4.1.1) activesupport (= 4.1.9)
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rainbow (2.0.0) rainbow (2.0.0)
raindrops (0.13.0) raindrops (0.13.0)
rake (10.3.2) rake (10.4.2)
raphael-rails (2.1.2) raphael-rails (2.1.2)
rb-fsevent (0.9.3) rb-fsevent (0.9.3)
rb-inotify (0.9.2) rb-inotify (0.9.2)
...@@ -518,8 +516,6 @@ GEM ...@@ -518,8 +516,6 @@ GEM
activesupport (>= 3.1, < 4.2) activesupport (>= 3.1, < 4.2)
select2-rails (3.5.2) select2-rails (3.5.2)
thor (~> 0.14) thor (~> 0.14)
semantic-ui-sass (1.8.0.0)
sass (~> 3.2)
settingslogic (2.0.9) settingslogic (2.0.9)
shoulda-matchers (2.7.0) shoulda-matchers (2.7.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
...@@ -552,8 +548,8 @@ GEM ...@@ -552,8 +548,8 @@ GEM
capybara (>= 2.0.0) capybara (>= 2.0.0)
railties (>= 3) railties (>= 3)
spinach (>= 0.4) spinach (>= 0.4)
spring (1.1.3) spring (1.3.1)
spring-commands-rspec (1.0.1) spring-commands-rspec (1.0.4)
spring (>= 0.9.1) spring (>= 0.9.1)
spring-commands-spinach (1.0.0) spring-commands-spinach (1.0.0)
spring (>= 0.9.1) spring (>= 0.9.1)
...@@ -562,10 +558,10 @@ GEM ...@@ -562,10 +558,10 @@ GEM
multi_json (~> 1.0) multi_json (~> 1.0)
rack (~> 1.0) rack (~> 1.0)
tilt (~> 1.1, != 1.3.0) tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.1.3) sprockets-rails (2.2.4)
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
sprockets (~> 2.8) sprockets (>= 2.8, < 4.0)
stamp (0.5.0) stamp (0.5.0)
state_machine (1.2.0) state_machine (1.2.0)
stringex (2.5.2) stringex (2.5.2)
...@@ -596,9 +592,6 @@ GEM ...@@ -596,9 +592,6 @@ GEM
multi_json (~> 1.7) multi_json (~> 1.7)
twitter-stream (~> 0.1) twitter-stream (~> 0.1)
tins (0.13.1) tins (0.13.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.0.0) turbolinks (2.0.0)
coffee-rails coffee-rails
twitter-stream (0.1.16) twitter-stream (0.1.16)
...@@ -746,7 +739,6 @@ DEPENDENCIES ...@@ -746,7 +739,6 @@ DEPENDENCIES
sdoc sdoc
seed-fu seed-fu
select2-rails select2-rails
semantic-ui-sass (~> 1.8.0)
settingslogic settingslogic
shoulda-matchers (~> 2.7.0) shoulda-matchers (~> 2.7.0)
sidekiq (~> 3.3) sidekiq (~> 3.3)
...@@ -756,8 +748,8 @@ DEPENDENCIES ...@@ -756,8 +748,8 @@ DEPENDENCIES
slack-notifier (~> 1.0.0) slack-notifier (~> 1.0.0)
slim slim
spinach-rails spinach-rails
spring (= 1.1.3) spring (= 1.3.1)
spring-commands-rspec (= 1.0.1) spring-commands-rspec (= 1.0.4)
spring-commands-spinach (= 1.0.0) spring-commands-spinach (= 1.0.0)
stamp stamp
state_machine state_machine
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#= require jquery.scrollTo #= require jquery.scrollTo
#= require jquery.blockUI #= require jquery.blockUI
#= require jquery.turbolinks #= require jquery.turbolinks
#= require jquery.sticky-kit.min
#= require turbolinks #= require turbolinks
#= require autosave #= require autosave
#= require bootstrap #= require bootstrap
...@@ -32,7 +33,6 @@ ...@@ -32,7 +33,6 @@
#= require nprogress #= require nprogress
#= require nprogress-turbolinks #= require nprogress-turbolinks
#= require dropzone #= require dropzone
#= require semantic-ui/sidebar
#= require mousetrap #= require mousetrap
#= require mousetrap/pause #= require mousetrap/pause
#= require shortcuts #= require shortcuts
...@@ -115,7 +115,6 @@ if location.hash ...@@ -115,7 +115,6 @@ if location.hash
window.addEventListener "hashchange", shiftWindow window.addEventListener "hashchange", shiftWindow
$ -> $ ->
# Click a .one_click_select field, select the contents # Click a .one_click_select field, select the contents
$(".one_click_select").on 'click', -> $(@).select() $(".one_click_select").on 'click', -> $(@).select()
...@@ -183,6 +182,8 @@ $ -> ...@@ -183,6 +182,8 @@ $ ->
form = btn.closest("form") form = btn.closest("form")
new ConfirmDangerModal(form, text) new ConfirmDangerModal(form, text)
new Aside()
(($) -> (($) ->
# Disable an element and add the 'disabled' Bootstrap class # Disable an element and add the 'disabled' Bootstrap class
$.fn.extend disable: -> $.fn.extend disable: ->
......
class @Aside
constructor: ->
$(document).off "click", "a.show-aside"
$(document).on "click", 'a.show-aside', (e) ->
e.preventDefault()
btn = $(e.currentTarget)
icon = btn.find('i')
console.log('1')
if icon.hasClass('fa-angle-left')
btn.parent().find('section').hide()
btn.parent().find('aside').fadeIn()
icon.removeClass('fa-angle-left').addClass('fa-angle-right')
else
btn.parent().find('aside').hide()
btn.parent().find('section').fadeIn()
icon.removeClass('fa-angle-right').addClass('fa-angle-left')
...@@ -36,6 +36,8 @@ class @Diff ...@@ -36,6 +36,8 @@ class @Diff
) )
) )
$('.diff-header').stick_in_parent(offset_top: $('.navbar').height())
lineNumbers: (line) -> lineNumbers: (line) ->
return ([0, 0]) unless line.children().length return ([0, 0]) unless line.children().length
lines = line.children().slice(0, 2) lines = line.children().slice(0, 2)
......
...@@ -26,7 +26,7 @@ class Dispatcher ...@@ -26,7 +26,7 @@ class Dispatcher
new ZenMode() new ZenMode()
when 'projects:milestones:show' when 'projects:milestones:show'
new Milestone() new Milestone()
when 'projects:milestones:new' when 'projects:milestones:new', 'projects:milestones:edit'
new ZenMode() new ZenMode()
when 'projects:issues:new','projects:issues:edit' when 'projects:issues:new','projects:issues:edit'
GitLab.GfmAutoComplete.setup() GitLab.GfmAutoComplete.setup()
...@@ -54,6 +54,7 @@ class Dispatcher ...@@ -54,6 +54,7 @@ class Dispatcher
when 'projects:commit:show' when 'projects:commit:show'
new Commit() new Commit()
new Diff() new Diff()
new ZenMode()
shortcut_handler = new ShortcutsNavigation() shortcut_handler = new ShortcutsNavigation()
when 'projects:commits:show' when 'projects:commits:show'
shortcut_handler = new ShortcutsNavigation() shortcut_handler = new ShortcutsNavigation()
......
responsive_resize = ->
current_width = $(window).width()
if current_width < 985
$('.responsive-side').addClass("ui right wide sidebar")
else
$('.responsive-side').removeClass("ui right wide sidebar")
$ ->
# Depending on window size, set the sidebar offscreen.
responsive_resize()
$('.sidebar-expand-button').click ->
$('.ui.sidebar')
.sidebar({overlay: true})
.sidebar('toggle')
# Hide sidebar on click outside of sidebar
$(document).mouseup (e) ->
container = $(".ui.sidebar")
container.sidebar "hide" if not container.is(e.target) and container.has(e.target).length is 0
return
# On resize, check if sidebar should be offscreen.
$(window).resize ->
responsive_resize()
return
$(document).on("click", '.toggle-nav-collapse', (e) -> $(document).on("click", '.toggle-nav-collapse', (e) ->
e.preventDefault() e.preventDefault()
collapsed = 'page-sidebar-collapsed' collapsed = 'page-sidebar-collapsed'
......
...@@ -55,8 +55,3 @@ ...@@ -55,8 +55,3 @@
* Styles for JS behaviors. * Styles for JS behaviors.
*/ */
@import "behaviors.scss"; @import "behaviors.scss";
/**
* Styles for responsive sidebar
*/
@import "semantic-ui/modules/sidebar";
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
&.s16 { font-size: 12px; line-height: 1.33; } &.s16 { font-size: 12px; line-height: 1.33; }
&.s24 { font-size: 14px; line-height: 1.8; } &.s24 { font-size: 14px; line-height: 1.8; }
&.s26 { font-size: 20px; line-height: 1.33; } &.s26 { font-size: 20px; line-height: 1.33; }
&.s32 { font-size: 24px; line-height: 1.33; } &.s32 { font-size: 22px; line-height: 32px; }
&.s60 { font-size: 45px; line-height: 1.33; } &.s60 { font-size: 32px; line-height: 60px; }
&.s90 { font-size: 68px; line-height: 1.33; } &.s90 { font-size: 36px; line-height: 90px; }
&.s160 { font-size: 120px; line-height: 1.33; } &.s160 { font-size: 96px; line-height: 1.33; }
} }
...@@ -50,4 +50,24 @@ ...@@ -50,4 +50,24 @@
.issue_edited_ago, .note_edited_ago { .issue_edited_ago, .note_edited_ago {
display: none; display: none;
} }
aside {
display: none;
}
.show-aside {
display: block !important;
}
}
.show-aside {
display: none;
position: fixed;
right: 0px;
top: 30%;
padding: 5px 15px;
background: #EEE;
font-size: 20px;
color: #777;
@include box-shadow(0 1px 2px #DDD);
} }
.ui.sidebar {
z-index: 1000 !important;
background: #fff;
padding: 10px;
width: 285px;
}
.ui.right.sidebar {
border-left: 1px solid #e1e1e1;
border-right: 0;
}
.sidebar-expand-button {
cursor: pointer;
transition: all 0.4s;
-moz-transition: all 0.4s;
-webkit-transition: all 0.4s;
}
.fixed.sidebar-expand-button {
background: #f9f9f9;
color: #555;
padding: 9px 12px 6px 14px;
border: 1px solid #E1E1E1;
border-right: 0;
position: fixed;
top: 108px;
right: 0px;
margin-right: 0;
&:hover {
background: #ddd;
color: #333;
padding-right: 25px;
}
}
.btn.btn-default.sidebar-expand-button {
margin-left: 12px;
display: inline-block !important;
}
@media (min-width: 767px) {
.btn.btn-default.sidebar-expand-button {
display: none!important;
}
}
...@@ -84,7 +84,6 @@ ...@@ -84,7 +84,6 @@
margin-left: 10px; margin-left: 10px;
float: left; float: left;
margin-right: 15px; margin-right: 15px;
font-size: 20px;
margin-bottom: 15px; margin-bottom: 15px;
i { i {
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
border-left: 3px solid $style_color; border-left: 3px solid $style_color;
&.no-highlight { &.no-highlight {
background: none; background: none !important;
border: none; border: none;
} }
......
...@@ -111,6 +111,8 @@ ...@@ -111,6 +111,8 @@
color: $link_color; color: $link_color;
&.active { &.active {
background-color: #f5f5f5;
border: 1px solid rgba(0,0,0,0.195);
color: #333; color: #333;
font-weight: bold; font-weight: bold;
} }
......
...@@ -120,13 +120,13 @@ ...@@ -120,13 +120,13 @@
} }
.readme-holder { .readme-holder {
border-top: 1px dashed #CCC;
padding-top: 10px;
.readme-file-title { .readme-file-title {
font-size: 14px; font-size: 14px;
font-weight: bold;
margin-bottom: 20px; margin-bottom: 20px;
color: #777; color: #777;
border-bottom: 1px solid #DDD;
padding: 10px 0;
} }
} }
......
...@@ -25,13 +25,16 @@ class Admin::ProjectsController < Admin::ApplicationController ...@@ -25,13 +25,16 @@ class Admin::ProjectsController < Admin::ApplicationController
def transfer def transfer
::Projects::TransferService.new(@project, current_user, params.dup).execute ::Projects::TransferService.new(@project, current_user, params.dup).execute
redirect_to [:admin, @project.reload] @project.reload
redirect_to admin_namespace_project_path(@project.namespace, @project)
end end
protected protected
def project def project
@project = Project.find_with_namespace(params[:id]) @project = Project.find_with_namespace(
[params[:namespace_id], '/', params[:id]].join('')
)
@project || render_404 @project || render_404
end end
......
...@@ -93,6 +93,7 @@ class ApplicationController < ActionController::Base ...@@ -93,6 +93,7 @@ class ApplicationController < ActionController::Base
def project def project
unless @project unless @project
namespace = params[:namespace_id]
id = params[:project_id] || params[:id] id = params[:project_id] || params[:id]
# Redirect from # Redirect from
...@@ -104,7 +105,7 @@ class ApplicationController < ActionController::Base ...@@ -104,7 +105,7 @@ class ApplicationController < ActionController::Base
redirect_to request.original_url.gsub(/\.git\Z/, '') and return redirect_to request.original_url.gsub(/\.git\Z/, '') and return
end end
@project = Project.find_with_namespace(id) @project = Project.find_with_namespace("#{namespace}/#{id}")
if @project and can?(current_user, :read_project, @project) if @project and can?(current_user, :read_project, @project)
@project @project
...@@ -121,7 +122,8 @@ class ApplicationController < ActionController::Base ...@@ -121,7 +122,8 @@ class ApplicationController < ActionController::Base
def repository def repository
@repository ||= project.repository @repository ||= project.repository
rescue Grit::NoSuchPathError rescue Grit::NoSuchPathError(e)
log_exception(e)
nil nil
end end
......
...@@ -8,7 +8,8 @@ class Projects::ApplicationController < ApplicationController ...@@ -8,7 +8,8 @@ class Projects::ApplicationController < ApplicationController
# for non-signed users # for non-signed users
if !current_user if !current_user
id = params[:project_id] || params[:id] id = params[:project_id] || params[:id]
@project = Project.find_with_namespace(id) project_with_namespace = "#{params[:namespace_id]}/#{id}"
@project = Project.find_with_namespace(project_with_namespace)
return if @project && @project.public? return if @project && @project.public?
end end
...@@ -26,7 +27,10 @@ class Projects::ApplicationController < ApplicationController ...@@ -26,7 +27,10 @@ class Projects::ApplicationController < ApplicationController
def require_branch_head def require_branch_head
unless @repository.branch_names.include?(@ref) unless @repository.branch_names.include?(@ref)
redirect_to project_tree_path(@project, @ref), notice: "This action is not allowed unless you are on top of a branch" redirect_to(
namespace_project_tree_path(@project.namespace, @project, @ref),
notice: "This action is not allowed unless you are on top of a branch"
)
end end
end end
end end
...@@ -24,6 +24,6 @@ class Projects::AvatarsController < Projects::ApplicationController ...@@ -24,6 +24,6 @@ class Projects::AvatarsController < Projects::ApplicationController
@project.save @project.save
@project.reset_events_cache @project.reset_events_cache
redirect_to edit_project_path(@project) redirect_to edit_namespace_project_path(@project.namespace, @project)
end end
end end
...@@ -25,7 +25,7 @@ class Projects::BlobController < Projects::ApplicationController ...@@ -25,7 +25,7 @@ class Projects::BlobController < Projects::ApplicationController
if result[:status] == :success if result[:status] == :success
flash[:notice] = "Your changes have been successfully committed" flash[:notice] = "Your changes have been successfully committed"
redirect_to project_blob_path(@project, File.join(@ref, file_path)) redirect_to namespace_project_blob_path(@project.namespace, @project, File.join(@ref, file_path))
else else
flash[:alert] = result[:message] flash[:alert] = result[:message]
render :new render :new
...@@ -70,7 +70,8 @@ class Projects::BlobController < Projects::ApplicationController ...@@ -70,7 +70,8 @@ class Projects::BlobController < Projects::ApplicationController
if result[:status] == :success if result[:status] == :success
flash[:notice] = "Your changes have been successfully committed" flash[:notice] = "Your changes have been successfully committed"
redirect_to project_tree_path(@project, @ref) redirect_to namespace_project_tree_path(@project.namespace, @project,
@ref)
else else
flash[:alert] = result[:message] flash[:alert] = result[:message]
render :show render :show
...@@ -102,7 +103,7 @@ class Projects::BlobController < Projects::ApplicationController ...@@ -102,7 +103,7 @@ class Projects::BlobController < Projects::ApplicationController
else else
if tree = @repository.tree(@commit.id, @path) if tree = @repository.tree(@commit.id, @path)
if tree.entries.any? if tree.entries.any?
redirect_to project_tree_path(@project, File.join(@ref, @path)) and return redirect_to namespace_project_tree_path(@project.namespace, @project, File.join(@ref, @path)) and return
end end
end end
...@@ -128,10 +129,10 @@ class Projects::BlobController < Projects::ApplicationController ...@@ -128,10 +129,10 @@ class Projects::BlobController < Projects::ApplicationController
def after_edit_path def after_edit_path
@after_edit_path ||= @after_edit_path ||=
if from_merge_request if from_merge_request
diffs_project_merge_request_path(from_merge_request.target_project, from_merge_request) + diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) +
"#file-path-#{hexdigest(@path)}" "#file-path-#{hexdigest(@path)}"
else else
project_blob_path(@project, @id) namespace_project_blob_path(@project.namespace, @project, @id)
end end
end end
......
...@@ -23,7 +23,8 @@ class Projects::BranchesController < Projects::ApplicationController ...@@ -23,7 +23,8 @@ class Projects::BranchesController < Projects::ApplicationController
if result[:status] == :success if result[:status] == :success
@branch = result[:branch] @branch = result[:branch]
redirect_to project_tree_path(@project, @branch.name) redirect_to namespace_project_tree_path(@project.namespace, @project,
@branch.name)
else else
@error = result[:message] @error = result[:message]
render action: 'new' render action: 'new'
...@@ -35,7 +36,10 @@ class Projects::BranchesController < Projects::ApplicationController ...@@ -35,7 +36,10 @@ class Projects::BranchesController < Projects::ApplicationController
@branch_name = params[:id] @branch_name = params[:id]
respond_to do |format| respond_to do |format|
format.html { redirect_to project_branches_path(@project) } format.html do
redirect_to namespace_project_branches_path(@project.namespace,
@project)
end
format.js format.js
end end
end end
......
...@@ -25,6 +25,7 @@ class Projects::CompareController < Projects::ApplicationController ...@@ -25,6 +25,7 @@ class Projects::CompareController < Projects::ApplicationController
end end
def create def create
redirect_to project_compare_path(@project, params[:from], params[:to]) redirect_to namespace_project_compare_path(@project.namespace, @project,
params[:from], params[:to])
end end
end end
...@@ -25,7 +25,8 @@ class Projects::DeployKeysController < Projects::ApplicationController ...@@ -25,7 +25,8 @@ class Projects::DeployKeysController < Projects::ApplicationController
@key = DeployKey.new(deploy_key_params) @key = DeployKey.new(deploy_key_params)
if @key.valid? && @project.deploy_keys << @key if @key.valid? && @project.deploy_keys << @key
redirect_to project_deploy_keys_path(@project) redirect_to namespace_project_deploy_keys_path(@project.namespace,
@project)
else else
render "new" render "new"
end end
...@@ -44,13 +45,15 @@ class Projects::DeployKeysController < Projects::ApplicationController ...@@ -44,13 +45,15 @@ class Projects::DeployKeysController < Projects::ApplicationController
def enable def enable
@project.deploy_keys << available_keys.find(params[:id]) @project.deploy_keys << available_keys.find(params[:id])
redirect_to project_deploy_keys_path(@project) redirect_to namespace_project_deploy_keys_path(@project.namespace,
@project)
end end
def disable def disable
@project.deploy_keys_projects.where(deploy_key_id: params[:id]).last.destroy @project.deploy_keys_projects.where(deploy_key_id: params[:id]).last.destroy
redirect_to project_deploy_keys_path(@project) redirect_to namespace_project_deploy_keys_path(@project.namespace,
@project)
end end
protected protected
......
...@@ -9,11 +9,14 @@ class Projects::ForksController < Projects::ApplicationController ...@@ -9,11 +9,14 @@ class Projects::ForksController < Projects::ApplicationController
end end
def create def create
namespace = Namespace.find(params[:namespace_id]) namespace = Namespace.find(params[:namespace_key])
@forked_project = ::Projects::ForkService.new(project, current_user, namespace: namespace).execute @forked_project = ::Projects::ForkService.new(project, current_user, namespace: namespace).execute
if @forked_project.saved? && @forked_project.forked? if @forked_project.saved? && @forked_project.forked?
redirect_to(@forked_project, notice: 'Project was successfully forked.') redirect_to(
namespace_project_path(@forked_project.namespace, @forked_project),
notice: 'Project was successfully forked.'
)
else else
@title = 'Fork project' @title = 'Fork project'
render :error render :error
......
...@@ -16,7 +16,7 @@ class Projects::HooksController < Projects::ApplicationController ...@@ -16,7 +16,7 @@ class Projects::HooksController < Projects::ApplicationController
@hook.save @hook.save
if @hook.valid? if @hook.valid?
redirect_to project_hooks_path(@project) redirect_to namespace_project_hooks_path(@project.namespace, @project)
else else
@hooks = @project.hooks.select(&:persisted?) @hooks = @project.hooks.select(&:persisted?)
render :index render :index
...@@ -43,7 +43,7 @@ class Projects::HooksController < Projects::ApplicationController ...@@ -43,7 +43,7 @@ class Projects::HooksController < Projects::ApplicationController
def destroy def destroy
hook.destroy hook.destroy
redirect_to project_hooks_path(@project) redirect_to namespace_project_hooks_path(@project.namespace, @project)
end end
private private
......
...@@ -20,7 +20,7 @@ class Projects::ImportsController < Projects::ApplicationController ...@@ -20,7 +20,7 @@ class Projects::ImportsController < Projects::ApplicationController
end end
end end
redirect_to project_import_path(@project) redirect_to namespace_project_import_path(@project.namespace, @project)
end end
def show def show
...@@ -28,7 +28,8 @@ class Projects::ImportsController < Projects::ApplicationController ...@@ -28,7 +28,8 @@ class Projects::ImportsController < Projects::ApplicationController
if @project.import_finished? if @project.import_finished?
redirect_to(@project) and return redirect_to(@project) and return
else else
redirect_to new_project_import_path(@project) and return redirect_to new_namespace_project_import_path(@project.namespace,
@project) && return
end end
end end
end end
...@@ -37,13 +38,14 @@ class Projects::ImportsController < Projects::ApplicationController ...@@ -37,13 +38,14 @@ class Projects::ImportsController < Projects::ApplicationController
def require_no_repo def require_no_repo
if @project.repository_exists? if @project.repository_exists?
redirect_to(@project) and return redirect_to(namespace_project_path(@project.namespace, @project)) and return
end end
end end
def redirect_if_progress def redirect_if_progress
if @project.import_in_progress? if @project.import_in_progress?
redirect_to project_import_path(@project) and return redirect_to namespace_project_import_path(@project.namespace, @project) &&
return
end end
end end
end end
...@@ -60,7 +60,8 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -60,7 +60,8 @@ class Projects::IssuesController < Projects::ApplicationController
respond_to do |format| respond_to do |format|
format.html do format.html do
if @issue.valid? if @issue.valid?
redirect_to project_issue_path(@project, @issue) redirect_to namespace_project_issue_path(@project.namespace,
@project, @issue)
else else
render :new render :new
end end
...@@ -78,7 +79,7 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -78,7 +79,7 @@ class Projects::IssuesController < Projects::ApplicationController
format.js format.js
format.html do format.html do
if @issue.valid? if @issue.valid?
redirect_to [@project, @issue] redirect_to [@project.namespace.becomes(Namespace), @project, @issue]
else else
render :edit render :edit
end end
...@@ -128,7 +129,8 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -128,7 +129,8 @@ class Projects::IssuesController < Projects::ApplicationController
issue = @project.issues.find_by(id: params[:id]) issue = @project.issues.find_by(id: params[:id])
if issue if issue
redirect_to project_issue_path(@project, issue) redirect_to namespace_project_issue_path(@project.namespace, @project,
issue)
return return
else else
raise ActiveRecord::RecordNotFound.new raise ActiveRecord::RecordNotFound.new
......
...@@ -18,7 +18,7 @@ class Projects::LabelsController < Projects::ApplicationController ...@@ -18,7 +18,7 @@ class Projects::LabelsController < Projects::ApplicationController
@label = @project.labels.create(label_params) @label = @project.labels.create(label_params)
if @label.valid? if @label.valid?
redirect_to project_labels_path(@project) redirect_to namespace_project_labels_path(@project.namespace, @project)
else else
render 'new' render 'new'
end end
...@@ -29,7 +29,7 @@ class Projects::LabelsController < Projects::ApplicationController ...@@ -29,7 +29,7 @@ class Projects::LabelsController < Projects::ApplicationController
def update def update
if @label.update_attributes(label_params) if @label.update_attributes(label_params)
redirect_to project_labels_path(@project) redirect_to namespace_project_labels_path(@project.namespace, @project)
else else
render 'edit' render 'edit'
end end
...@@ -39,11 +39,12 @@ class Projects::LabelsController < Projects::ApplicationController ...@@ -39,11 +39,12 @@ class Projects::LabelsController < Projects::ApplicationController
Gitlab::IssuesLabels.generate(@project) Gitlab::IssuesLabels.generate(@project)
if params[:redirect] == 'issues' if params[:redirect] == 'issues'
redirect_to project_issues_path(@project) redirect_to namespace_project_issues_path(@project.namespace, @project)
elsif params[:redirect] == 'merge_requests' elsif params[:redirect] == 'merge_requests'
redirect_to project_merge_requests_path(@project) redirect_to namespace_project_merge_requests_path(@project.namespace,
@project)
else else
redirect_to project_labels_path(@project) redirect_to namespace_project_labels_path(@project.namespace, @project)
end end
end end
...@@ -51,7 +52,10 @@ class Projects::LabelsController < Projects::ApplicationController ...@@ -51,7 +52,10 @@ class Projects::LabelsController < Projects::ApplicationController
@label.destroy @label.destroy
respond_to do |format| respond_to do |format|
format.html { redirect_to project_labels_path(@project), notice: 'Label was removed' } format.html do
redirect_to(namespace_project_labels_path(@project.namespace, @project),
notice: 'Label was removed')
end
format.js format.js
end end
end end
......
...@@ -78,7 +78,12 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -78,7 +78,12 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@merge_request = MergeRequests::CreateService.new(project, current_user, merge_request_params).execute @merge_request = MergeRequests::CreateService.new(project, current_user, merge_request_params).execute
if @merge_request.valid? if @merge_request.valid?
redirect_to project_merge_request_path(@merge_request.target_project, @merge_request), notice: 'Merge request was successfully created.' redirect_to(
namespace_project_merge_request_path(@merge_request.target_project.namespace,
@merge_request.target_project,
@merge_request),
notice: 'Merge request was successfully created.'
)
else else
@source_project = @merge_request.source_project @source_project = @merge_request.source_project
@target_project = @merge_request.target_project @target_project = @merge_request.target_project
...@@ -93,7 +98,9 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -93,7 +98,9 @@ class Projects::MergeRequestsController < Projects::ApplicationController
respond_to do |format| respond_to do |format|
format.js format.js
format.html do format.html do
redirect_to [@merge_request.target_project, @merge_request], notice: 'Merge request was successfully updated.' redirect_to([@merge_request.target_project.namespace.becomes(Namespace),
@merge_request.target_project, @merge_request],
notice: 'Merge request was successfully updated.')
end end
end end
else else
......
...@@ -40,7 +40,8 @@ class Projects::MilestonesController < Projects::ApplicationController ...@@ -40,7 +40,8 @@ class Projects::MilestonesController < Projects::ApplicationController
@milestone = Milestones::CreateService.new(project, current_user, milestone_params).execute @milestone = Milestones::CreateService.new(project, current_user, milestone_params).execute
if @milestone.save if @milestone.save
redirect_to project_milestone_path(@project, @milestone) redirect_to namespace_project_milestone_path(@project.namespace,
@project, @milestone)
else else
render "new" render "new"
end end
...@@ -67,7 +68,7 @@ class Projects::MilestonesController < Projects::ApplicationController ...@@ -67,7 +68,7 @@ class Projects::MilestonesController < Projects::ApplicationController
@milestone.destroy @milestone.destroy
respond_to do |format| respond_to do |format|
format.html { redirect_to project_milestones_path } format.html { redirect_to namespace_project_milestones_path }
format.js { render nothing: true } format.js { render nothing: true }
end end
end end
......
...@@ -12,7 +12,8 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController ...@@ -12,7 +12,8 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
def create def create
@project.protected_branches.create(protected_branch_params) @project.protected_branches.create(protected_branch_params)
redirect_to project_protected_branches_path(@project) redirect_to namespace_project_protected_branches_path(@project.namespace,
@project)
end end
def update def update
...@@ -37,7 +38,7 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController ...@@ -37,7 +38,7 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
@project.protected_branches.find(params[:id]).destroy @project.protected_branches.find(params[:id]).destroy
respond_to do |format| respond_to do |format|
format.html { redirect_to project_protected_branches_path } format.html { redirect_to namespace_project_protected_branches_path }
format.js { render nothing: true } format.js { render nothing: true }
end end
end end
......
...@@ -9,13 +9,15 @@ class Projects::RefsController < Projects::ApplicationController ...@@ -9,13 +9,15 @@ class Projects::RefsController < Projects::ApplicationController
respond_to do |format| respond_to do |format|
format.html do format.html do
new_path = if params[:destination] == "tree" new_path = if params[:destination] == "tree"
project_tree_path(@project, (@id)) namespace_project_tree_path(@project.namespace, @project,
(@id))
elsif params[:destination] == "blob" elsif params[:destination] == "blob"
project_blob_path(@project, (@id)) namespace_project_blob_path(@project.namespace, @project,
(@id))
elsif params[:destination] == "graph" elsif params[:destination] == "graph"
project_network_path(@project, @id, @options) namespace_project_network_path(@project.namespace, @project, @id, @options)
else else
project_commits_path(@project, @id) namespace_project_commits_path(@project.namespace, @project, @id)
end end
redirect_to new_path redirect_to new_path
......
...@@ -7,7 +7,7 @@ class Projects::RepositoriesController < Projects::ApplicationController ...@@ -7,7 +7,7 @@ class Projects::RepositoriesController < Projects::ApplicationController
def create def create
@project.create_repository @project.create_repository
redirect_to @project redirect_to namespace_project_path(@project.namespace, @project)
end end
def archive def archive
......
...@@ -17,8 +17,11 @@ class Projects::ServicesController < Projects::ApplicationController ...@@ -17,8 +17,11 @@ class Projects::ServicesController < Projects::ApplicationController
def update def update
if @service.update_attributes(service_params) if @service.update_attributes(service_params)
redirect_to edit_project_service_path(@project, @service.to_param), redirect_to(
notice: 'Successfully updated.' edit_namespace_project_service_path(@project.namespace, @project,
@service.to_param, notice:
'Successfully updated.')
)
else else
render 'edit' render 'edit'
end end
......
...@@ -32,7 +32,8 @@ class Projects::SnippetsController < Projects::ApplicationController ...@@ -32,7 +32,8 @@ class Projects::SnippetsController < Projects::ApplicationController
@snippet.author = current_user @snippet.author = current_user
if @snippet.save if @snippet.save
redirect_to project_snippet_path(@project, @snippet) redirect_to namespace_project_snippet_path(@project.namespace, @project,
@snippet)
else else
respond_with(@snippet) respond_with(@snippet)
end end
...@@ -43,7 +44,7 @@ class Projects::SnippetsController < Projects::ApplicationController ...@@ -43,7 +44,7 @@ class Projects::SnippetsController < Projects::ApplicationController
def update def update
if @snippet.update_attributes(snippet_params) if @snippet.update_attributes(snippet_params)
redirect_to project_snippet_path(@project, @snippet) redirect_to namespace_project_snippet_path(@project.namespace, @project, @snippet)
else else
respond_with(@snippet) respond_with(@snippet)
end end
...@@ -60,7 +61,7 @@ class Projects::SnippetsController < Projects::ApplicationController ...@@ -60,7 +61,7 @@ class Projects::SnippetsController < Projects::ApplicationController
@snippet.destroy @snippet.destroy
redirect_to project_snippets_path(@project) redirect_to namespace_project_snippets_path(@project.namespace, @project)
end end
def raw def raw
......
...@@ -16,7 +16,7 @@ class Projects::TagsController < Projects::ApplicationController ...@@ -16,7 +16,7 @@ class Projects::TagsController < Projects::ApplicationController
if result[:status] == :success if result[:status] == :success
@tag = result[:tag] @tag = result[:tag]
redirect_to project_tags_path(@project) redirect_to namespace_project_tags_path(@project.namespace, @project)
else else
@error = result[:message] @error = result[:message]
render action: 'new' render action: 'new'
...@@ -31,7 +31,7 @@ class Projects::TagsController < Projects::ApplicationController ...@@ -31,7 +31,7 @@ class Projects::TagsController < Projects::ApplicationController
end end
respond_to do |format| respond_to do |format|
format.html { redirect_to project_tags_path } format.html { redirect_to namespace_project_tags_path }
format.js format.js
end end
end end
......
...@@ -21,7 +21,8 @@ class Projects::TeamMembersController < Projects::ApplicationController ...@@ -21,7 +21,8 @@ class Projects::TeamMembersController < Projects::ApplicationController
if params[:redirect_to] if params[:redirect_to]
redirect_to params[:redirect_to] redirect_to params[:redirect_to]
else else
redirect_to project_team_index_path(@project) redirect_to namespace_project_team_index_path(@project.namespace,
@project)
end end
end end
...@@ -32,7 +33,7 @@ class Projects::TeamMembersController < Projects::ApplicationController ...@@ -32,7 +33,7 @@ class Projects::TeamMembersController < Projects::ApplicationController
unless @user_project_relation.valid? unless @user_project_relation.valid?
flash[:alert] = "User should have at least one role" flash[:alert] = "User should have at least one role"
end end
redirect_to project_team_index_path(@project) redirect_to namespace_project_team_index_path(@project.namespace, @project)
end end
def destroy def destroy
...@@ -40,7 +41,10 @@ class Projects::TeamMembersController < Projects::ApplicationController ...@@ -40,7 +41,10 @@ class Projects::TeamMembersController < Projects::ApplicationController
@user_project_relation.destroy @user_project_relation.destroy
respond_to do |format| respond_to do |format|
format.html { redirect_to project_team_index_path(@project) } format.html do
redirect_to namespace_project_team_index_path(@project.namespace,
@project)
end
format.js { render nothing: true } format.js { render nothing: true }
end end
end end
...@@ -59,7 +63,8 @@ class Projects::TeamMembersController < Projects::ApplicationController ...@@ -59,7 +63,8 @@ class Projects::TeamMembersController < Projects::ApplicationController
status = @project.team.import(giver) status = @project.team.import(giver)
notice = status ? "Successfully imported" : "Import failed" notice = status ? "Successfully imported" : "Import failed"
redirect_to project_team_index_path(project), notice: notice redirect_to(namespace_project_team_index_path(project.namespace, project),
notice: notice)
end end
protected protected
......
...@@ -9,7 +9,10 @@ class Projects::TreeController < Projects::ApplicationController ...@@ -9,7 +9,10 @@ class Projects::TreeController < Projects::ApplicationController
def show def show
if tree.entries.empty? if tree.entries.empty?
if @repository.blob_at(@commit.id, @path) if @repository.blob_at(@commit.id, @path)
redirect_to project_blob_path(@project, File.join(@ref, @path)) and return redirect_to(
namespace_project_blob_path(@project.namespace, @project,
File.join(@ref, @path))
) and return
else else
return not_found! return not_found!
end end
......
...@@ -45,7 +45,7 @@ class Projects::WikisController < Projects::ApplicationController ...@@ -45,7 +45,7 @@ class Projects::WikisController < Projects::ApplicationController
return render('empty') unless can?(current_user, :write_wiki, @project) return render('empty') unless can?(current_user, :write_wiki, @project)
if @page.update(content, format, message) if @page.update(content, format, message)
redirect_to [@project, @page], notice: 'Wiki was successfully updated.' redirect_to [@project.namespace.becomes(Namespace), @project, @page], notice: 'Wiki was successfully updated.'
else else
render 'edit' render 'edit'
end end
...@@ -55,7 +55,10 @@ class Projects::WikisController < Projects::ApplicationController ...@@ -55,7 +55,10 @@ class Projects::WikisController < Projects::ApplicationController
@page = WikiPage.new(@project_wiki) @page = WikiPage.new(@project_wiki)
if @page.create(wiki_params) if @page.create(wiki_params)
redirect_to project_wiki_path(@project, @page), notice: 'Wiki was successfully updated.' redirect_to(
namespace_project_wiki_path(@project.namespace, @project, @page),
notice: 'Wiki was successfully updated.'
)
else else
render action: "edit" render action: "edit"
end end
...@@ -65,7 +68,10 @@ class Projects::WikisController < Projects::ApplicationController ...@@ -65,7 +68,10 @@ class Projects::WikisController < Projects::ApplicationController
@page = @project_wiki.find_page(params[:id]) @page = @project_wiki.find_page(params[:id])
unless @page unless @page
redirect_to(project_wiki_path(@project, :home), notice: "Page not found") redirect_to(
namespace_project_wiki_path(@project.namespace, @project, :home),
notice: "Page not found"
)
end end
end end
...@@ -73,7 +79,10 @@ class Projects::WikisController < Projects::ApplicationController ...@@ -73,7 +79,10 @@ class Projects::WikisController < Projects::ApplicationController
@page = @project_wiki.find_page(params[:id]) @page = @project_wiki.find_page(params[:id])
@page.delete if @page @page.delete if @page
redirect_to project_wiki_path(@project, :home), notice: "Page was successfully deleted" redirect_to(
namespace_project_wiki_path(@project.namespace, @project, :home),
notice: "Page was successfully deleted"
)
end end
def git_access def git_access
......
...@@ -22,7 +22,10 @@ class ProjectsController < ApplicationController ...@@ -22,7 +22,10 @@ class ProjectsController < ApplicationController
@project = ::Projects::CreateService.new(current_user, project_params).execute @project = ::Projects::CreateService.new(current_user, project_params).execute
if @project.saved? if @project.saved?
redirect_to project_path(@project), notice: 'Project was successfully created.' redirect_to(
namespace_project_path(@project.namespace, @project),
notice: 'Project was successfully created.'
)
else else
render 'new' render 'new'
end end
...@@ -34,7 +37,12 @@ class ProjectsController < ApplicationController ...@@ -34,7 +37,12 @@ class ProjectsController < ApplicationController
respond_to do |format| respond_to do |format|
if status if status
flash[:notice] = 'Project was successfully updated.' flash[:notice] = 'Project was successfully updated.'
format.html { redirect_to edit_project_path(@project), notice: 'Project was successfully updated.' } format.html do
redirect_to(
edit_namespace_project_path(@project.namespace, @project),
notice: 'Project was successfully updated.'
)
end
format.js format.js
else else
format.html { render 'edit', layout: 'project_settings' } format.html { render 'edit', layout: 'project_settings' }
...@@ -44,7 +52,8 @@ class ProjectsController < ApplicationController ...@@ -44,7 +52,8 @@ class ProjectsController < ApplicationController
end end
def transfer def transfer
::Projects::TransferService.new(project, current_user, project_params).execute transfer_params = params.permit(:new_namespace_id)
::Projects::TransferService.new(project, current_user, transfer_params).execute
if @project.errors[:namespace_id].present? if @project.errors[:namespace_id].present?
flash[:alert] = @project.errors[:namespace_id].first flash[:alert] = @project.errors[:namespace_id].first
end end
...@@ -52,7 +61,7 @@ class ProjectsController < ApplicationController ...@@ -52,7 +61,7 @@ class ProjectsController < ApplicationController
def show def show
if @project.import_in_progress? if @project.import_in_progress?
redirect_to project_import_path(@project) redirect_to namespace_project_import_path(@project.namespace, @project)
return return
end end
...@@ -93,7 +102,7 @@ class ProjectsController < ApplicationController ...@@ -93,7 +102,7 @@ class ProjectsController < ApplicationController
flash[:alert] = 'Project deleted.' flash[:alert] = 'Project deleted.'
if request.referer.include?('/admin') if request.referer.include?('/admin')
redirect_to admin_projects_path redirect_to admin_namespace_projects_path
else else
redirect_to projects_dashboard_path redirect_to projects_dashboard_path
end end
...@@ -124,7 +133,7 @@ class ProjectsController < ApplicationController ...@@ -124,7 +133,7 @@ class ProjectsController < ApplicationController
@project.archive! @project.archive!
respond_to do |format| respond_to do |format|
format.html { redirect_to @project } format.html { redirect_to namespace_project_path(@project.namespace, @project) }
end end
end end
...@@ -133,7 +142,7 @@ class ProjectsController < ApplicationController ...@@ -133,7 +142,7 @@ class ProjectsController < ApplicationController
@project.unarchive! @project.unarchive!
respond_to do |format| respond_to do |format|
format.html { redirect_to @project } format.html { redirect_to namespace_project_path(@project.namespace, @project) }
end end
end end
......
class UploadsController < ApplicationController class UploadsController < ApplicationController
skip_before_filter :authenticate_user!, :reject_blocked!
before_filter :authorize_access
def show def show
model = params[:model].camelize.constantize.find(params[:id]) model = params[:model].camelize.constantize.find(params[:id])
uploader = model.send(params[:mounted_as]) uploader = model.send(params[:mounted_as])
...@@ -12,4 +15,10 @@ class UploadsController < ApplicationController ...@@ -12,4 +15,10 @@ class UploadsController < ApplicationController
disposition = uploader.image? ? 'inline' : 'attachment' disposition = uploader.image? ? 'inline' : 'attachment'
send_file uploader.file.path, disposition: disposition send_file uploader.file.path, disposition: disposition
end end
def authorize_access
unless params[:mounted_as] == 'avatar'
authenticate_user! && reject_blocked!
end
end
end end
...@@ -61,7 +61,7 @@ module ApplicationHelper ...@@ -61,7 +61,7 @@ module ApplicationHelper
if project.avatar.present? if project.avatar.present?
image_tag project.avatar.url, options image_tag project.avatar.url, options
elsif project.avatar_in_git elsif project.avatar_in_git
image_tag project_avatar_path(project), options image_tag namespace_project_avatar_path(project.namespace, project), options
else # generated icon else # generated icon
project_identicon(project, options) project_identicon(project, options)
end end
......
...@@ -36,8 +36,12 @@ module BlobHelper ...@@ -36,8 +36,12 @@ module BlobHelper
link_opts[:from_merge_request_id] = from_mr if from_mr link_opts[:from_merge_request_id] = from_mr if from_mr
cls = 'btn btn-small' cls = 'btn btn-small'
if allowed_tree_edit?(project, ref) if allowed_tree_edit?(project, ref)
link_to text, project_edit_blob_path(project, tree_join(ref, path), link_to(text,
link_opts), class: cls namespace_project_edit_blob_path(project.namespace, project,
tree_join(ref, path),
link_opts),
class: cls
)
else else
content_tag :span, text, class: cls + ' disabled' content_tag :span, text, class: cls + ' disabled'
end + after.html_safe end + after.html_safe
......
...@@ -37,7 +37,10 @@ module CommitsHelper ...@@ -37,7 +37,10 @@ module CommitsHelper
# Add the root project link and the arrow icon # Add the root project link and the arrow icon
crumbs = content_tag(:li) do crumbs = content_tag(:li) do
link_to(@project.path, project_commits_path(@project, @ref)) link_to(
@project.path,
namespace_project_commits_path(@project.namespace, @project, @ref)
)
end end
if @path if @path
...@@ -46,7 +49,14 @@ module CommitsHelper ...@@ -46,7 +49,14 @@ module CommitsHelper
parts.each_with_index do |part, i| parts.each_with_index do |part, i|
crumbs << content_tag(:li) do crumbs << content_tag(:li) do
# The text is just the individual part, but the link needs all the parts before it # The text is just the individual part, but the link needs all the parts before it
link_to part, project_commits_path(@project, tree_join(@ref, parts[0..i].join('/'))) link_to(
part,
namespace_project_commits_path(
@project.namespace,
@project,
tree_join(@ref, parts[0..i].join('/'))
)
)
end end
end end
end end
...@@ -63,7 +73,9 @@ module CommitsHelper ...@@ -63,7 +73,9 @@ module CommitsHelper
# Returns the sorted alphabetically links to branches, separated by a comma # Returns the sorted alphabetically links to branches, separated by a comma
def commit_branches_links(project, branches) def commit_branches_links(project, branches)
branches.sort.map do |branch| branches.sort.map do |branch|
link_to(project_tree_path(project, branch)) do link_to(
namespace_project_tree_path(project.namespace, project, branch)
) do
content_tag :span, class: 'label label-gray' do content_tag :span, class: 'label label-gray' do
icon('code-fork') + ' ' + branch icon('code-fork') + ' ' + branch
end end
...@@ -75,7 +87,10 @@ module CommitsHelper ...@@ -75,7 +87,10 @@ module CommitsHelper
def commit_tags_links(project, tags) def commit_tags_links(project, tags)
sorted = VersionSorter.rsort(tags) sorted = VersionSorter.rsort(tags)
sorted.map do |tag| sorted.map do |tag|
link_to(project_commits_path(project, project.repository.find_tag(tag).name)) do link_to(
namespace_project_commits_path(project.namespace, project,
project.repository.find_tag(tag).name)
) do
content_tag :span, class: 'label label-gray' do content_tag :span, class: 'label label-gray' do
icon('tag') + ' ' + tag icon('tag') + ' ' + tag
end end
...@@ -86,12 +101,26 @@ module CommitsHelper ...@@ -86,12 +101,26 @@ module CommitsHelper
def link_to_browse_code(project, commit) def link_to_browse_code(project, commit)
if current_controller?(:projects, :commits) if current_controller?(:projects, :commits)
if @repo.blob_at(commit.id, @path) if @repo.blob_at(commit.id, @path)
return link_to "Browse File »", project_blob_path(project, tree_join(commit.id, @path)), class: "pull-right" return link_to(
"Browse File »",
namespace_project_blob_path(project.namespace, project,
tree_join(commit.id, @path)),
class: "pull-right"
)
elsif @path.present? elsif @path.present?
return link_to "Browse Dir »", project_tree_path(project, tree_join(commit.id, @path)), class: "pull-right" return link_to(
"Browse Dir »",
namespace_project_tree_path(project.namespace, project,
tree_join(commit.id, @path)),
class: "pull-right"
)
end end
end end
link_to "Browse Code »", project_tree_path(project, commit), class: "pull-right" link_to(
"Browse Code »",
namespace_project_tree_path(project.namespace, project, commit),
class: "pull-right"
)
end end
protected protected
...@@ -133,8 +162,11 @@ module CommitsHelper ...@@ -133,8 +162,11 @@ module CommitsHelper
end end
def view_file_btn(commit_sha, diff, project) def view_file_btn(commit_sha, diff, project)
link_to project_blob_path(project, tree_join(commit_sha, diff.new_path)), link_to(
class: 'btn btn-small view-file js-view-file' do namespace_project_blob_path(project.namespace, project,
tree_join(commit_sha, diff.new_path)),
class: 'btn btn-small view-file js-view-file'
) do
raw('View file @') + content_tag(:span, commit_sha[0..6], raw('View file @') + content_tag(:span, commit_sha[0..6],
class: 'commit-short-id') class: 'commit-short-id')
end end
......
...@@ -10,6 +10,13 @@ module CompareHelper ...@@ -10,6 +10,13 @@ module CompareHelper
end end
def compare_mr_path def compare_mr_path
new_project_merge_request_path(@project, merge_request: { source_branch: params[:to], target_branch: params[:from] }) new_namespace_project_merge_request_path(
@project.namespace,
@project,
merge_request: {
source_branch: params[:to],
target_branch: params[:from]
}
)
end end
end end
...@@ -74,17 +74,23 @@ module EventsHelper ...@@ -74,17 +74,23 @@ module EventsHelper
def event_feed_url(event) def event_feed_url(event)
if event.issue? if event.issue?
project_issue_url(event.project, event.issue) namespace_project_issue_url(event.project.namespace, event.project,
event.issue)
elsif event.merge_request? elsif event.merge_request?
project_merge_request_url(event.project, event.merge_request) namespace_project_merge_request_url(event.project.namespace,
event.project, event.merge_request)
elsif event.note? && event.note_commit? elsif event.note? && event.note_commit?
project_commit_url(event.project, event.note_target) namespace_project_commit_url(event.project.namespace, event.project,
event.note_target)
elsif event.note? elsif event.note?
if event.note_target if event.note_target
if event.note_commit? if event.note_commit?
project_commit_path(event.project, event.note_commit_id, anchor: dom_id(event.target)) namespace_project_commit_path(event.project.namespace, event.project,
event.note_commit_id,
anchor: dom_id(event.target))
elsif event.note_project_snippet? elsif event.note_project_snippet?
project_snippet_path(event.project, event.note_target) namespace_project_snippet_path(event.project.namespace,
event.project, event.note_target)
else else
event_note_target_path(event) event_note_target_path(event)
end end
...@@ -92,12 +98,16 @@ module EventsHelper ...@@ -92,12 +98,16 @@ module EventsHelper
elsif event.push? elsif event.push?
if event.push_with_commits? if event.push_with_commits?
if event.commits_count > 1 if event.commits_count > 1
project_compare_url(event.project, from: event.commit_from, to: event.commit_to) namespace_project_compare_url(event.project.namespace, event.project,
from: event.commit_from, to:
event.commit_to)
else else
project_commit_url(event.project, id: event.commit_to) namespace_project_commit_url(event.project.namespace, event.project,
id: event.commit_to)
end end
else else
project_commits_url(event.project, event.ref_name) namespace_project_commits_url(event.project.namespace, event.project,
event.ref_name)
end end
end end
end end
...@@ -116,20 +126,30 @@ module EventsHelper ...@@ -116,20 +126,30 @@ module EventsHelper
def event_note_target_path(event) def event_note_target_path(event)
if event.note? && event.note_commit? if event.note? && event.note_commit?
project_commit_path(event.project, event.note_target) namespace_project_commit_path(event.project.namespace, event.project,
event.note_target)
else else
polymorphic_path([event.project, event.note_target], anchor: dom_id(event.target)) polymorphic_path([event.project.namespace.becomes(Namespace),
event.project, event.note_target],
anchor: dom_id(event.target))
end end
end end
def event_note_title_html(event) def event_note_title_html(event)
if event.note_target if event.note_target
if event.note_commit? if event.note_commit?
link_to project_commit_path(event.project, event.note_commit_id, anchor: dom_id(event.target)), class: "commit_short_id" do link_to(
namespace_project_commit_path(event.project.namespace, event.project,
event.note_commit_id,
anchor: dom_id(event.target)),
class: "commit_short_id"
) do
"#{event.note_target_type} #{event.note_short_commit_id}" "#{event.note_target_type} #{event.note_short_commit_id}"
end end
elsif event.note_project_snippet? elsif event.note_project_snippet?
link_to(project_snippet_path(event.project, event.note_target)) do link_to(namespace_project_snippet_path(event.project.namespace,
event.project,
event.note_target)) do
"#{event.note_target_type} ##{truncate event.note_target_id}" "#{event.note_target_type} ##{truncate event.note_target_id}"
end end
else else
......
...@@ -93,8 +93,10 @@ module IssuesHelper ...@@ -93,8 +93,10 @@ module IssuesHelper
def issue_to_atom(xml, issue) def issue_to_atom(xml, issue)
xml.entry do xml.entry do
xml.id project_issue_url(issue.project, issue) xml.id namespace_project_issue_url(issue.project.namespace,
xml.link href: project_issue_url(issue.project, issue) issue.project, issue)
xml.link href: namespace_project_issue_url(issue.project.namespace,
issue.project, issue)
xml.title truncate(issue.title, length: 80) xml.title truncate(issue.title, length: 80)
xml.updated issue.created_at.strftime("%Y-%m-%dT%H:%M:%SZ") xml.updated issue.created_at.strftime("%Y-%m-%dT%H:%M:%SZ")
xml.media :thumbnail, width: "40", height: "40", url: avatar_icon(issue.author_email) xml.media :thumbnail, width: "40", height: "40", url: avatar_icon(issue.author_email)
......
module MergeRequestsHelper module MergeRequestsHelper
def new_mr_path_from_push_event(event) def new_mr_path_from_push_event(event)
target_project = event.project.forked_from_project || event.project target_project = event.project.forked_from_project || event.project
new_project_merge_request_path( new_namespace_project_merge_request_path(
event.project.namespace,
event.project, event.project,
new_mr_from_push_event(event, target_project) new_mr_from_push_event(event, target_project)
) )
end end
def new_mr_path_for_fork_from_push_event(event) def new_mr_path_for_fork_from_push_event(event)
new_project_merge_request_path( new_namespace_project_merge_request_path(
event.project.namespace,
event.project, event.project,
new_mr_from_push_event(event, event.project.forked_from_project) new_mr_from_push_event(event, event.project.forked_from_project)
) )
......
module MilestonesHelper module MilestonesHelper
def milestones_filter_path(opts = {}) def milestones_filter_path(opts = {})
if @project if @project
project_milestones_path(@project, opts) namespace_project_milestones_path(@project.namespace, @project, opts)
elsif @group elsif @group
group_milestones_path(@group, opts) group_milestones_path(@group, opts)
end end
......
...@@ -11,7 +11,11 @@ module NotesHelper ...@@ -11,7 +11,11 @@ module NotesHelper
def link_to_commit_diff_line_note(note) def link_to_commit_diff_line_note(note)
if note.for_commit_diff_line? if note.for_commit_diff_line?
link_to "#{note.diff_file_name}:L#{note.diff_new_line}", project_commit_path(@project, note.noteable, anchor: note.line_code) link_to(
"#{note.diff_file_name}:L#{note.diff_new_line}",
namespace_project_commit_path(@project.namespace, @project,
note.noteable, anchor: note.line_code)
)
end end
end end
......
...@@ -4,7 +4,7 @@ module ProjectsHelper ...@@ -4,7 +4,7 @@ module ProjectsHelper
end end
def link_to_project(project) def link_to_project(project)
link_to project do link_to [project.namespace.becomes(Namespace), project] do
title = content_tag(:span, project.name, class: 'project-name') title = content_tag(:span, project.name, class: 'project-name')
if project.namespace if project.namespace
...@@ -42,12 +42,20 @@ module ProjectsHelper ...@@ -42,12 +42,20 @@ module ProjectsHelper
def project_title(project) def project_title(project)
if project.group if project.group
content_tag :span do content_tag :span do
link_to(simple_sanitize(project.group.name), group_path(project.group)) + ' / ' + link_to(simple_sanitize(project.name), project_path(project)) link_to(
simple_sanitize(project.group.name), group_path(project.group)
) + ' / ' +
link_to(simple_sanitize(project.name),
namespace_project_path(project.namespace, project))
end end
else else
owner = project.namespace.owner owner = project.namespace.owner
content_tag :span do content_tag :span do
link_to(simple_sanitize(owner.name), user_path(owner)) + ' / ' + link_to(simple_sanitize(project.name), project_path(project)) link_to(
simple_sanitize(owner.name), user_path(owner)
) + ' / ' +
link_to(simple_sanitize(project.name),
namespace_project_path(project.namespace, project))
end end
end end
end end
...@@ -100,7 +108,10 @@ module ProjectsHelper ...@@ -100,7 +108,10 @@ module ProjectsHelper
content_tag 'span', class: starred ? 'turn-on' : 'turn-off' do content_tag 'span', class: starred ? 'turn-on' : 'turn-off' do
link_to toggle_star_project_path(@project), link_opts do link_to(
toggle_star_namespace_project_path(@project.namespace, @project),
link_opts
) do
toggle_html + ' ' + count_html toggle_html + ' ' + count_html
end end
end end
...@@ -222,7 +233,12 @@ module ProjectsHelper ...@@ -222,7 +233,12 @@ module ProjectsHelper
def contribution_guide_url(project) def contribution_guide_url(project)
if project && project.repository.contribution_guide if project && project.repository.contribution_guide
project_blob_path(project, tree_join(project.default_branch, project.repository.contribution_guide.name)) namespace_project_blob_path(
project.namespace,
project,
tree_join(project.default_branch,
project.repository.contribution_guide.name)
)
end end
end end
...@@ -236,7 +252,7 @@ module ProjectsHelper ...@@ -236,7 +252,7 @@ module ProjectsHelper
def project_wiki_path_with_version(proj, page, version, is_newest) def project_wiki_path_with_version(proj, page, version, is_newest)
url_params = is_newest ? {} : { version_id: version } url_params = is_newest ? {} : { version_id: version }
project_wiki_path(proj, page, url_params) namespace_project_wiki_path(proj.namespace, proj, page, url_params)
end end
def project_status_css_class(status) def project_status_css_class(status)
......
...@@ -52,16 +52,16 @@ module SearchHelper ...@@ -52,16 +52,16 @@ module SearchHelper
ref = @ref || @project.repository.root_ref ref = @ref || @project.repository.root_ref
[ [
{ label: "#{prefix} - Files", url: project_tree_path(@project, ref) }, { label: "#{prefix} - Files", url: namespace_project_tree_path(@project.namespace, @project, ref) },
{ label: "#{prefix} - Commits", url: project_commits_path(@project, ref) }, { label: "#{prefix} - Commits", url: namespace_project_commits_path(@project.namespace, @project, ref) },
{ label: "#{prefix} - Network", url: project_network_path(@project, ref) }, { label: "#{prefix} - Network", url: namespace_project_network_path(@project.namespace, @project, ref) },
{ label: "#{prefix} - Graph", url: project_graph_path(@project, ref) }, { label: "#{prefix} - Graph", url: namespace_project_graph_path(@project.namespace, @project, ref) },
{ label: "#{prefix} - Issues", url: project_issues_path(@project) }, { label: "#{prefix} - Issues", url: namespace_project_issues_path(@project.namespace, @project) },
{ label: "#{prefix} - Merge Requests", url: project_merge_requests_path(@project) }, { label: "#{prefix} - Merge Requests", url: namespace_project_merge_requests_path(@project.namespace, @project) },
{ label: "#{prefix} - Milestones", url: project_milestones_path(@project) }, { label: "#{prefix} - Milestones", url: namespace_project_milestones_path(@project.namespace, @project) },
{ label: "#{prefix} - Snippets", url: project_snippets_path(@project) }, { label: "#{prefix} - Snippets", url: namespace_project_snippets_path(@project.namespace, @project) },
{ label: "#{prefix} - Team", url: project_team_index_path(@project) }, { label: "#{prefix} - Team", url: namespace_project_team_index_path(@project.namespace, @project) },
{ label: "#{prefix} - Wiki", url: project_wikis_path(@project) }, { label: "#{prefix} - Wiki", url: namespace_project_wikis_path(@project.namespace, @project) },
] ]
else else
[] []
...@@ -84,7 +84,7 @@ module SearchHelper ...@@ -84,7 +84,7 @@ module SearchHelper
sorted_by_stars.non_archived.limit(limit).map do |p| sorted_by_stars.non_archived.limit(limit).map do |p|
{ {
label: "project: #{search_result_sanitize(p.name_with_namespace)}", label: "project: #{search_result_sanitize(p.name_with_namespace)}",
url: project_path(p) url: namespace_project_path(p.namespace, p)
} }
end end
end end
......
...@@ -11,7 +11,8 @@ module SnippetsHelper ...@@ -11,7 +11,8 @@ module SnippetsHelper
def reliable_snippet_path(snippet) def reliable_snippet_path(snippet)
if snippet.project_id? if snippet.project_id?
project_snippet_path(snippet.project, snippet) namespace_project_snippet_path(snippet.project.namespace,
snippet.project, snippet)
else else
snippet_path(snippet) snippet_path(snippet)
end end
......
...@@ -5,19 +5,22 @@ module SubmoduleHelper ...@@ -5,19 +5,22 @@ module SubmoduleHelper
def submodule_links(submodule_item, ref = nil) def submodule_links(submodule_item, ref = nil)
url = @repository.submodule_url_for(ref, submodule_item.path) url = @repository.submodule_url_for(ref, submodule_item.path)
return url, nil unless url =~ /([^\/:]+\/[^\/]+\.git)\Z/ return url, nil unless url =~ /([^\/:]+)\/([^\/]+\.git)\Z/
project = $1 namespace = $1
project = $2
project.chomp!('.git') project.chomp!('.git')
if self_url?(url, project) if self_url?(url, namespace, project)
return project_path(project), project_tree_path(project, submodule_item.id) return namespace_project_path(namespace, project),
namespace_project_tree_path(namespace, project,
submodule_item.id)
elsif relative_self_url?(url) elsif relative_self_url?(url)
relative_self_links(url, submodule_item.id) relative_self_links(url, submodule_item.id)
elsif github_dot_com_url?(url) elsif github_dot_com_url?(url)
standard_links('github.com', project, submodule_item.id) standard_links('github.com', namespace, project, submodule_item.id)
elsif gitlab_dot_com_url?(url) elsif gitlab_dot_com_url?(url)
standard_links('gitlab.com', project, submodule_item.id) standard_links('gitlab.com', namespace, project, submodule_item.id)
else else
return url, nil return url, nil
end end
...@@ -33,9 +36,10 @@ module SubmoduleHelper ...@@ -33,9 +36,10 @@ module SubmoduleHelper
url =~ /gitlab\.com[\/:][^\/]+\/[^\/]+\Z/ url =~ /gitlab\.com[\/:][^\/]+\/[^\/]+\Z/
end end
def self_url?(url, project) def self_url?(url, namespace, project)
return true if url == [ Gitlab.config.gitlab.url, '/', project, '.git' ].join('') return true if url == [ Gitlab.config.gitlab.url, '/', namespace, '/',
url == gitlab_shell.url_to_repo(project) project, '.git' ].join('')
url == gitlab_shell.url_to_repo([namespace, '/', project].join(''))
end end
def relative_self_url?(url) def relative_self_url?(url)
...@@ -43,8 +47,8 @@ module SubmoduleHelper ...@@ -43,8 +47,8 @@ module SubmoduleHelper
url =~ /^((\.\/)?(\.\.\/))(?!(\.\.)|(.*\/)).*\.git\Z/ || url =~ /^((\.\/)?(\.\.\/){2})(?!(\.\.))([^\/]*)\/(?!(\.\.)|(.*\/)).*\.git\Z/ url =~ /^((\.\/)?(\.\.\/))(?!(\.\.)|(.*\/)).*\.git\Z/ || url =~ /^((\.\/)?(\.\.\/){2})(?!(\.\.))([^\/]*)\/(?!(\.\.)|(.*\/)).*\.git\Z/
end end
def standard_links(host, project, commit) def standard_links(host, namespace, project, commit)
base = [ 'https://', host, '/', project ].join('') base = [ 'https://', host, '/', namespace, '/', project ].join('')
return base, [ base, '/tree/', commit ].join('') return base, [ base, '/tree/', commit ].join('')
end end
...@@ -54,6 +58,7 @@ module SubmoduleHelper ...@@ -54,6 +58,7 @@ module SubmoduleHelper
else else
base = [ @project.group.path, '/', url[/([^\/]*)\.git/, 1] ].join('') base = [ @project.group.path, '/', url[/([^\/]*)\.git/, 1] ].join('')
end end
return project_path(base), project_tree_path(base, commit) return namespace_project_path(base.namespace, base),
namespace_project_tree_path(base.namespace, base, commit)
end end
end end
...@@ -97,7 +97,8 @@ module TabHelper ...@@ -97,7 +97,8 @@ module TabHelper
def branches_tab_class def branches_tab_class
if current_controller?(:protected_branches) || if current_controller?(:protected_branches) ||
current_controller?(:branches) || current_controller?(:branches) ||
current_page?(project_repository_path(@project)) current_page?(namespace_project_repository_path(@project.namespace,
@project))
'active' 'active'
end end
end end
......
...@@ -3,7 +3,7 @@ module Emails ...@@ -3,7 +3,7 @@ module Emails
def new_issue_email(recipient_id, issue_id) def new_issue_email(recipient_id, issue_id)
@issue = Issue.find(issue_id) @issue = Issue.find(issue_id)
@project = @issue.project @project = @issue.project
@target_url = project_issue_url(@project, @issue) @target_url = namespace_project_issue_url(@project.namespace, @project, @issue)
mail_new_thread(@issue, mail_new_thread(@issue,
from: sender(@issue.author_id), from: sender(@issue.author_id),
to: recipient(recipient_id), to: recipient(recipient_id),
...@@ -14,7 +14,7 @@ module Emails ...@@ -14,7 +14,7 @@ module Emails
@issue = Issue.find(issue_id) @issue = Issue.find(issue_id)
@previous_assignee = User.find_by(id: previous_assignee_id) if previous_assignee_id @previous_assignee = User.find_by(id: previous_assignee_id) if previous_assignee_id
@project = @issue.project @project = @issue.project
@target_url = project_issue_url(@project, @issue) @target_url = namespace_project_issue_url(@project.namespace, @project, @issue)
mail_answer_thread(@issue, mail_answer_thread(@issue,
from: sender(updated_by_user_id), from: sender(updated_by_user_id),
to: recipient(recipient_id), to: recipient(recipient_id),
...@@ -25,7 +25,7 @@ module Emails ...@@ -25,7 +25,7 @@ module Emails
@issue = Issue.find issue_id @issue = Issue.find issue_id
@project = @issue.project @project = @issue.project
@updated_by = User.find updated_by_user_id @updated_by = User.find updated_by_user_id
@target_url = project_issue_url(@project, @issue) @target_url = namespace_project_issue_url(@project.namespace, @project, @issue)
mail_answer_thread(@issue, mail_answer_thread(@issue,
from: sender(updated_by_user_id), from: sender(updated_by_user_id),
to: recipient(recipient_id), to: recipient(recipient_id),
...@@ -37,7 +37,7 @@ module Emails ...@@ -37,7 +37,7 @@ module Emails
@issue_status = status @issue_status = status
@project = @issue.project @project = @issue.project
@updated_by = User.find updated_by_user_id @updated_by = User.find updated_by_user_id
@target_url = project_issue_url(@project, @issue) @target_url = namespace_project_issue_url(@project.namespace, @project, @issue)
mail_answer_thread(@issue, mail_answer_thread(@issue,
from: sender(updated_by_user_id), from: sender(updated_by_user_id),
to: recipient(recipient_id), to: recipient(recipient_id),
......
...@@ -3,7 +3,9 @@ module Emails ...@@ -3,7 +3,9 @@ module Emails
def new_merge_request_email(recipient_id, merge_request_id) def new_merge_request_email(recipient_id, merge_request_id)
@merge_request = MergeRequest.find(merge_request_id) @merge_request = MergeRequest.find(merge_request_id)
@project = @merge_request.project @project = @merge_request.project
@target_url = project_merge_request_url(@project, @merge_request) @target_url = namespace_project_merge_request_url(@project.namespace,
@project,
@merge_request)
mail_new_thread(@merge_request, mail_new_thread(@merge_request,
from: sender(@merge_request.author_id), from: sender(@merge_request.author_id),
to: recipient(recipient_id), to: recipient(recipient_id),
...@@ -14,7 +16,9 @@ module Emails ...@@ -14,7 +16,9 @@ module Emails
@merge_request = MergeRequest.find(merge_request_id) @merge_request = MergeRequest.find(merge_request_id)
@previous_assignee = User.find_by(id: previous_assignee_id) if previous_assignee_id @previous_assignee = User.find_by(id: previous_assignee_id) if previous_assignee_id
@project = @merge_request.project @project = @merge_request.project
@target_url = project_merge_request_url(@project, @merge_request) @target_url = namespace_project_merge_request_url(@project.namespace,
@project,
@merge_request)
mail_answer_thread(@merge_request, mail_answer_thread(@merge_request,
from: sender(updated_by_user_id), from: sender(updated_by_user_id),
to: recipient(recipient_id), to: recipient(recipient_id),
...@@ -25,7 +29,9 @@ module Emails ...@@ -25,7 +29,9 @@ module Emails
@merge_request = MergeRequest.find(merge_request_id) @merge_request = MergeRequest.find(merge_request_id)
@updated_by = User.find updated_by_user_id @updated_by = User.find updated_by_user_id
@project = @merge_request.project @project = @merge_request.project
@target_url = project_merge_request_url(@project, @merge_request) @target_url = namespace_project_merge_request_url(@project.namespace,
@project,
@merge_request)
mail_answer_thread(@merge_request, mail_answer_thread(@merge_request,
from: sender(updated_by_user_id), from: sender(updated_by_user_id),
to: recipient(recipient_id), to: recipient(recipient_id),
...@@ -35,7 +41,9 @@ module Emails ...@@ -35,7 +41,9 @@ module Emails
def merged_merge_request_email(recipient_id, merge_request_id, updated_by_user_id) def merged_merge_request_email(recipient_id, merge_request_id, updated_by_user_id)
@merge_request = MergeRequest.find(merge_request_id) @merge_request = MergeRequest.find(merge_request_id)
@project = @merge_request.project @project = @merge_request.project
@target_url = project_merge_request_url(@project, @merge_request) @target_url = namespace_project_merge_request_url(@project.namespace,
@project,
@merge_request)
mail_answer_thread(@merge_request, mail_answer_thread(@merge_request,
from: sender(updated_by_user_id), from: sender(updated_by_user_id),
to: recipient(recipient_id), to: recipient(recipient_id),
...@@ -47,7 +55,9 @@ module Emails ...@@ -47,7 +55,9 @@ module Emails
@mr_status = status @mr_status = status
@project = @merge_request.project @project = @merge_request.project
@updated_by = User.find updated_by_user_id @updated_by = User.find updated_by_user_id
@target_url = project_merge_request_url(@project, @merge_request) @target_url = namespace_project_merge_request_url(@project.namespace,
@project,
@merge_request)
set_reference("merge_request_#{merge_request_id}") set_reference("merge_request_#{merge_request_id}")
mail_answer_thread(@merge_request, mail_answer_thread(@merge_request,
from: sender(updated_by_user_id), from: sender(updated_by_user_id),
......
...@@ -4,7 +4,9 @@ module Emails ...@@ -4,7 +4,9 @@ module Emails
@note = Note.find(note_id) @note = Note.find(note_id)
@commit = @note.noteable @commit = @note.noteable
@project = @note.project @project = @note.project
@target_url = project_commit_url(@project, @commit, anchor: "note_#{@note.id}") @target_url = namespace_project_commit_url(@project.namespace, @project,
@commit, anchor:
"note_#{@note.id}")
mail_answer_thread(@commit, mail_answer_thread(@commit,
from: sender(@note.author_id), from: sender(@note.author_id),
to: recipient(recipient_id), to: recipient(recipient_id),
...@@ -15,7 +17,9 @@ module Emails ...@@ -15,7 +17,9 @@ module Emails
@note = Note.find(note_id) @note = Note.find(note_id)
@issue = @note.noteable @issue = @note.noteable
@project = @note.project @project = @note.project
@target_url = project_issue_url(@project, @issue, anchor: "note_#{@note.id}") @target_url = namespace_project_issue_url(@project.namespace, @project,
@issue, anchor:
"note_#{@note.id}")
mail_answer_thread(@issue, mail_answer_thread(@issue,
from: sender(@note.author_id), from: sender(@note.author_id),
to: recipient(recipient_id), to: recipient(recipient_id),
...@@ -26,7 +30,10 @@ module Emails ...@@ -26,7 +30,10 @@ module Emails
@note = Note.find(note_id) @note = Note.find(note_id)
@merge_request = @note.noteable @merge_request = @note.noteable
@project = @note.project @project = @note.project
@target_url = project_merge_request_url(@project, @merge_request, anchor: "note_#{@note.id}") @target_url = namespace_project_merge_request_url(@project.namespace,
@project,
@merge_request, anchor:
"note_#{@note.id}")
mail_answer_thread(@merge_request, mail_answer_thread(@merge_request,
from: sender(@note.author_id), from: sender(@note.author_id),
to: recipient(recipient_id), to: recipient(recipient_id),
......
...@@ -3,7 +3,7 @@ module Emails ...@@ -3,7 +3,7 @@ module Emails
def project_access_granted_email(user_project_id) def project_access_granted_email(user_project_id)
@project_member = ProjectMember.find user_project_id @project_member = ProjectMember.find user_project_id
@project = @project_member.project @project = @project_member.project
@target_url = project_url(@project) @target_url = namespace_project_url(@project.namespace, @project)
mail(to: @project_member.user.email, mail(to: @project_member.user.email,
subject: subject("Access to project was granted")) subject: subject("Access to project was granted"))
end end
...@@ -11,7 +11,7 @@ module Emails ...@@ -11,7 +11,7 @@ module Emails
def project_was_moved_email(project_id, user_id) def project_was_moved_email(project_id, user_id)
@user = User.find user_id @user = User.find user_id
@project = Project.find project_id @project = Project.find project_id
@target_url = project_url(@project) @target_url = namespace_project_url(@project.namespace, @project)
mail(to: @user.notification_email, mail(to: @user.notification_email,
subject: subject("Project was moved")) subject: subject("Project was moved"))
end end
...@@ -24,10 +24,14 @@ module Emails ...@@ -24,10 +24,14 @@ module Emails
@diffs = compare.diffs @diffs = compare.diffs
@branch = branch @branch = branch
if @commits.length > 1 if @commits.length > 1
@target_url = project_compare_url(@project, from: @commits.first, to: @commits.last) @target_url = namespace_project_compare_url(@project.namespace,
@project,
from: @commits.first,
to: @commits.last)
@subject = "#{@commits.length} new commits pushed to repository" @subject = "#{@commits.length} new commits pushed to repository"
else else
@target_url = project_commit_url(@project, @commits.first) @target_url = namespace_project_commit_url(@project.namespace,
@project, @commits.first)
@subject = @commits.first.title @subject = @commits.first.title
end end
......
...@@ -285,7 +285,7 @@ class Project < ActiveRecord::Base ...@@ -285,7 +285,7 @@ class Project < ActiveRecord::Base
end end
def to_param def to_param
namespace.path + '/' + path path
end end
def web_url def web_url
......
...@@ -27,14 +27,20 @@ class GitlabIssueTrackerService < IssueTrackerService ...@@ -27,14 +27,20 @@ class GitlabIssueTrackerService < IssueTrackerService
end end
def project_url def project_url
project_issues_path(project) "#{gitlab_url}#{namespace_project_issues_path(project.namespace, project)}"
end end
def new_issue_url def new_issue_url
new_project_issue_path project_id: project "#{gitlab_url}#{new_namespace_project_issue_path(namespace_id: project.namespace, project_id: project)}"
end end
def issue_url(iid) def issue_url(iid)
"#{Gitlab.config.gitlab.url}#{project_issue_path(project_id: project, id: iid)}" "#{gitlab_url}#{namespace_project_issue_path(namespace_id: project.namespace, project_id: project, id: iid)}"
end
private
def gitlab_url
Gitlab.config.gitlab.relative_url_root.chomp("/") if Gitlab.config.gitlab.relative_url_root
end end
end end
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
# last_credential_check_at :datetime # last_credential_check_at :datetime
# github_access_token :string(255) # github_access_token :string(255)
# notification_email :string(255) # notification_email :string(255)
# password_automatically_set :boolean default(FALSE)
# #
require 'carrierwave/orm/activerecord' require 'carrierwave/orm/activerecord'
...@@ -350,6 +351,10 @@ class User < ActiveRecord::Base ...@@ -350,6 +351,10 @@ class User < ActiveRecord::Base
keys.count == 0 keys.count == 0
end end
def require_password?
password_automatically_set? && !ldap_user?
end
def can_change_username? def can_change_username?
gitlab_config.username_changing_enabled gitlab_config.username_changing_enabled
end end
......
...@@ -37,11 +37,14 @@ class BaseService ...@@ -37,11 +37,14 @@ class BaseService
private private
def error(message) def error(message, http_status = nil)
{ result = {
message: message, message: message,
status: :error status: :error
} }
result[:http_status] = http_status if http_status
result
end end
def success def success
......
...@@ -20,17 +20,19 @@ module Files ...@@ -20,17 +20,19 @@ module Files
end end
edit_file_action = Gitlab::Satellite::EditFileAction.new(current_user, project, ref, path) edit_file_action = Gitlab::Satellite::EditFileAction.new(current_user, project, ref, path)
created_successfully = edit_file_action.commit!( edit_file_action.commit!(
params[:content], params[:content],
params[:commit_message], params[:commit_message],
params[:encoding] params[:encoding]
) )
if created_successfully success
success rescue Gitlab::Satellite::CheckoutFailed => ex
else error("Your changes could not be committed because ref '#{ref}' could not be checked out", 400)
error("Your changes could not be committed. Maybe the file was changed by another process or there was nothing to commit?") rescue Gitlab::Satellite::CommitFailed => ex
end error("Your changes could not be committed. Maybe there was nothing to commit?", 409)
rescue Gitlab::Satellite::PushFailed => ex
error("Your changes could not be committed. Maybe the file was changed by another process?", 409)
end end
end end
end end
...@@ -53,7 +53,7 @@ module MergeRequests ...@@ -53,7 +53,7 @@ module MergeRequests
if merge_request.source_branch == @branch_name || force_push? if merge_request.source_branch == @branch_name || force_push?
merge_request.reload_code merge_request.reload_code
merge_request.mark_as_unchecked update_merge_request(merge_request)
else else
mr_commit_ids = merge_request.commits.map(&:id) mr_commit_ids = merge_request.commits.map(&:id)
push_commit_ids = @commits.map(&:id) push_commit_ids = @commits.map(&:id)
...@@ -61,14 +61,20 @@ module MergeRequests ...@@ -61,14 +61,20 @@ module MergeRequests
if matches.any? if matches.any?
merge_request.reload_code merge_request.reload_code
merge_request.mark_as_unchecked update_merge_request(merge_request)
else else
merge_request.mark_as_unchecked update_merge_request(merge_request)
end end
end end
end end
end end
def update_merge_request(merge_request)
MergeRequests::UpdateService.new(
merge_request.target_project,
@current_user, merge_status: 'unchecked').execute(merge_request)
end
# Add comment about pushing new commits to merge requests # Add comment about pushing new commits to merge requests
def comment_mr_with_commits def comment_mr_with_commits
merge_requests = @project.origin_merge_requests.opened.where(source_branch: @branch_name).to_a merge_requests = @project.origin_merge_requests.opened.where(source_branch: @branch_name).to_a
......
...@@ -12,7 +12,7 @@ module Projects ...@@ -12,7 +12,7 @@ module Projects
class TransferError < StandardError; end class TransferError < StandardError; end
def execute def execute
namespace_id = params[:namespace_id] namespace_id = params[:new_namespace_id]
namespace = Namespace.find_by(id: namespace_id) namespace = Namespace.find_by(id: namespace_id)
if allowed_transfer?(current_user, project, namespace) if allowed_transfer?(current_user, project, namespace)
......
...@@ -85,10 +85,10 @@ ...@@ -85,10 +85,10 @@
.light-well .light-well
%h4 Projects %h4 Projects
.data .data
= link_to admin_projects_path do = link_to admin_namespaces_projects_path do
%h1= Project.count %h1= Project.count
%hr %hr
= link_to 'New Project', new_project_path, class: "btn btn-new" = link_to('New Project', new_project_path, class: "btn btn-new")
.col-sm-4 .col-sm-4
.light-well .light-well
%h4 Users %h4 Users
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
%hr %hr
- @projects.each do |project| - @projects.each do |project|
%p %p
= link_to project.name_with_namespace, [:admin, project], class: 'str-truncated' = link_to project.name_with_namespace, [:admin, project.namespace.becomes(Namespace), project], class: 'str-truncated'
%span.light.pull-right %span.light.pull-right
#{time_ago_with_tooltip(project.created_at)} #{time_ago_with_tooltip(project.created_at)}
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
- @projects.each do |project| - @projects.each do |project|
%li %li
%strong %strong
= link_to project.name_with_namespace, [:admin, project] = link_to project.name_with_namespace, [:admin, project.namespace.becomes(Namespace), project]
%span.label.label-gray %span.label.label-gray
= repository_size(project) = repository_size(project)
%span.pull-right.light %span.pull-right.light
......
.row .row
.col-md-3 .col-md-3
.admin-filter .admin-filter
= form_tag admin_projects_path, method: :get, class: '' do = form_tag admin_namespaces_projects_path, method: :get, class: '' do
.form-group .form-group
= label_tag :name, 'Name:' = label_tag :name, 'Name:'
= text_field_tag :name, params[:name], class: "form-control" = text_field_tag :name, params[:name], class: "form-control"
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
%hr %hr
= hidden_field_tag :sort, params[:sort] = hidden_field_tag :sort, params[:sort]
= button_tag "Search", class: "btn submit btn-primary" = button_tag "Search", class: "btn submit btn-primary"
= link_to "Reset", admin_projects_path, class: "btn btn-cancel" = link_to "Reset", admin_namespaces_projects_path, class: "btn btn-cancel"
.col-md-9 .col-md-9
.panel.panel-default .panel.panel-default
...@@ -51,15 +51,15 @@ ...@@ -51,15 +51,15 @@
%b.caret %b.caret
%ul.dropdown-menu %ul.dropdown-menu
%li %li
= link_to admin_projects_path(sort: sort_value_recently_created) do = link_to admin_namespaces_projects_path(sort: sort_value_recently_created) do
= sort_title_recently_created = sort_title_recently_created
= link_to admin_projects_path(sort: sort_value_oldest_created) do = link_to admin_namespaces_projects_path(sort: sort_value_oldest_created) do
= sort_title_oldest_created = sort_title_oldest_created
= link_to admin_projects_path(sort: sort_value_recently_updated) do = link_to admin_namespaces_projects_path(sort: sort_value_recently_updated) do
= sort_title_recently_updated = sort_title_recently_updated
= link_to admin_projects_path(sort: sort_value_oldest_updated) do = link_to admin_namespaces_projects_path(sort: sort_value_oldest_updated) do
= sort_title_oldest_updated = sort_title_oldest_updated
= link_to admin_projects_path(sort: sort_value_largest_repo) do = link_to admin_namespaces_projects_path(sort: sort_value_largest_repo) do
= sort_title_largest_repo = sort_title_largest_repo
= link_to 'New Project', new_project_path, class: "btn btn-new" = link_to 'New Project', new_project_path, class: "btn btn-new"
%ul.well-list %ul.well-list
...@@ -68,12 +68,12 @@ ...@@ -68,12 +68,12 @@
.list-item-name .list-item-name
%span{ class: visibility_level_color(project.visibility_level) } %span{ class: visibility_level_color(project.visibility_level) }
= visibility_level_icon(project.visibility_level) = visibility_level_icon(project.visibility_level)
= link_to project.name_with_namespace, [:admin, project] = link_to project.name_with_namespace, [:admin, project.namespace.becomes(Namespace), project]
.pull-right .pull-right
%span.label.label-gray %span.label.label-gray
= repository_size(project) = repository_size(project)
= link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" = link_to 'Edit', edit_namespace_project_path(project.namespace, project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
= link_to 'Destroy', [project], data: { confirm: remove_project_message(project) }, method: :delete, class: "btn btn-small btn-remove" = link_to 'Destroy', [project.namespace.becomes(Namespace), project], data: { confirm: remove_project_message(project) }, method: :delete, class: "btn btn-small btn-remove"
- if @projects.blank? - if @projects.blank?
.nothing-here-block 0 projects matches .nothing-here-block 0 projects matches
= paginate @projects, theme: "gitlab" = paginate @projects, theme: "gitlab"
%h3.page-title %h3.page-title
Project: #{@project.name_with_namespace} Project: #{@project.name_with_namespace}
= link_to edit_project_path(@project), class: "btn pull-right" do = link_to edit_namespace_project_path(@project.namespace, @project), class: "btn pull-right" do
%i.fa.fa-pencil-square-o %i.fa.fa-pencil-square-o
Edit Edit
%hr %hr
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
%li %li
%span.light Name: %span.light Name:
%strong %strong
= link_to @project.name, project_path(@project) = link_to @project.name, namespace_project_path(@project.namespace, @project)
%li %li
%span.light Namespace: %span.light Namespace:
%strong %strong
...@@ -79,11 +79,11 @@ ...@@ -79,11 +79,11 @@
.panel-heading .panel-heading
Transfer project Transfer project
.panel-body .panel-body
= form_for @project, url: transfer_admin_project_path(@project), method: :put, html: { class: 'form-horizontal' } do |f| = form_for @project, url: transfer_admin_namespace_project_path(@project.namespace, @project), method: :put, html: { class: 'form-horizontal' } do |f|
.form-group .form-group
= f.label :namespace_id, "Namespace", class: 'control-label' = f.label :new_namespace_id, "Namespace", class: 'control-label'
.col-sm-10 .col-sm-10
= namespace_select_tag :namespace_id, selected: params[:namespace_id], class: 'input-large' = namespace_select_tag :new_namespace_id, selected: params[:namespace_id], class: 'input-large'
.form-group .form-group
.col-sm-2 .col-sm-2
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
%small %small
(#{@project.users.count}) (#{@project.users.count})
.pull-right .pull-right
= link_to project_team_index_path(@project), class: "btn btn-tiny" do = link_to namespace_project_team_index_path(@project.namespace, @project), class: "btn btn-tiny" do
%i.fa.fa-pencil-square-o %i.fa.fa-pencil-square-o
Manage Access Manage Access
%ul.well-list.team_members %ul.well-list.team_members
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
%span.light Owner %span.light Owner
- else - else
%span.light= project_member.human_access %span.light= project_member.human_access
= link_to project_team_member_path(@project, user), data: { confirm: remove_from_project_team_message(@project, user)}, method: :delete, remote: true, class: "btn btn-small btn-remove" do = link_to namespace_project_team_member_path(@project.namespace, @project, user), data: { confirm: remove_from_project_team_message(@project, user)}, method: :delete, remote: true, class: "btn btn-small btn-remove" do
%i.fa.fa-times %i.fa.fa-times
.panel-footer .panel-footer
= paginate @project_members, param_name: 'project_members_page', theme: 'gitlab' = paginate @project_members, param_name: 'project_members_page', theme: 'gitlab'
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
- tm = project.team.find_tm(@user.id) - tm = project.team.find_tm(@user.id)
%li.project_member %li.project_member
.list-item-name .list-item-name
= link_to admin_project_path(project), class: dom_class(project) do = link_to admin_namespace_project_path(project.namespace, project), class: dom_class(project) do
= project.name_with_namespace = project.name_with_namespace
- if tm - if tm
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
%span.light= tm.human_access %span.light= tm.human_access
- if tm.respond_to? :project - if tm.respond_to? :project
= link_to project_team_member_path(project, @user), data: { confirm: remove_from_project_team_message(project, @user) }, remote: true, method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from project' do = link_to namespace_project_team_member_path(project.namespace, project, @user), data: { confirm: remove_from_project_team_message(project, @user) }, remote: true, method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from project' do
%i.fa.fa-times %i.fa.fa-times
#ssh-keys.tab-pane #ssh-keys.tab-pane
= render 'profiles/keys/key_table', admin: true = render 'profiles/keys/key_table', admin: true
= link_to project_path(project), class: dom_class(project) do = link_to namespace_project_path(project.namespace, project), class: dom_class(project) do
.dash-project-avatar .dash-project-avatar
= project_icon(project, alt: '', class: 'avatar project-avatar s40') = project_icon(project, alt: '', class: 'avatar project-avatar s40')
.dash-project-access-icon .dash-project-access-icon
......
.dash-projects-filters.append-bottom-20 .dash-projects-filters.append-bottom-20
.pull-left.append-right-20 .append-right-20
%ul.nav.nav-pills.nav-compact %ul.nav.nav-tabs
= nav_tab :scope, nil do = nav_tab :scope, nil do
= link_to projects_dashboard_filter_path(scope: nil) do = link_to projects_dashboard_filter_path(scope: nil) do
All All
......
...@@ -16,22 +16,22 @@ ...@@ -16,22 +16,22 @@
%li.my-project-row %li.my-project-row
%h4.project-title %h4.project-title
.pull-left .pull-left
= project_icon(project.to_param, alt: '', class: 'avatar project-avatar s60') = project_icon("#{project.namespace.to_param}/#{project.to_param}", alt: '', class: 'avatar project-avatar s60')
.project-access-icon .project-access-icon
= visibility_level_icon(project.visibility_level) = visibility_level_icon(project.visibility_level)
= link_to project_path(project), class: dom_class(project) do = link_to namespace_project_path(project.namespace, project), class: dom_class(project) do
= project.name_with_namespace %strong= project.name_with_namespace
- if project.forked_from_project - if project.forked_from_project
&nbsp; &nbsp;
%small %small
%i.fa.fa-code-fork %i.fa.fa-code-fork
Forked from: Forked from:
= link_to project.forked_from_project.name_with_namespace, project_path(project.forked_from_project) = link_to project.forked_from_project.name_with_namespace, namespace_project_path(project.namespace, project.forked_from_project)
- if current_user.can_leave_project?(project) - if current_user.can_leave_project?(project)
.pull-right .pull-right
= link_to leave_project_team_members_path(project), data: { confirm: "Leave project?"}, method: :delete, remote: true, class: "btn-tiny btn remove-row", title: 'Leave project' do = link_to leave_namespace_project_team_members_path(project.namespace, project), data: { confirm: "Leave project?"}, method: :delete, remote: true, class: "btn-tiny btn remove-row", title: 'Leave project' do
%i.fa.fa-sign-out %i.fa.fa-sign-out
Leave Leave
......
...@@ -2,11 +2,10 @@ ...@@ -2,11 +2,10 @@
.dashboard.row .dashboard.row
%section.activities.col-md-8 %section.activities.col-md-8
= render 'activities' = render 'activities'
%aside.side.col-md-4.left.responsive-side %aside.col-md-4
= render 'sidebar' = render 'sidebar'
= link_to '#aside', class: 'show-aside' do
.fixed.sidebar-expand-button.hidden-lg.hidden-md %i.fa.fa-angle-left
%i.fa.fa-list.fa-2x
- else - else
= render "zero_authorized_projects" = render "zero_authorized_projects"
%li.commit %li.commit
.commit-row-title .commit-row-title
= link_to truncate_sha(commit[:id]), project_commit_path(project, commit[:id]), class: "commit_short_id", alt: '' = link_to truncate_sha(commit[:id]), namespace_project_commit_path(project.namespace, project, commit[:id]), class: "commit_short_id", alt: ''
&nbsp; &nbsp;
= gfm event_commit_title(commit[:message]), project = gfm event_commit_title(commit[:message]), project
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.event-last-push .event-last-push
.event-last-push-text .event-last-push-text
%span You pushed to %span You pushed to
= link_to project_commits_path(event.project, event.ref_name) do = link_to namespace_project_commits_path(event.project.namespace, event.project, event.ref_name) do
%strong= event.ref_name %strong= event.ref_name
at at
%strong= link_to_project event.project %strong= link_to_project event.project
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- event.commits.first(15).each do |commit| - event.commits.first(15).each do |commit|
%p %p
%strong= commit[:author][:name] %strong= commit[:author][:name]
= link_to "(##{truncate_sha(commit[:id])})", project_commit_path(event.project, id: commit[:id]) = link_to "(##{truncate_sha(commit[:id])})", namespace_project_commit_path(event.project.namespace, event.project, id: commit[:id])
%i %i
at at
= commit[:timestamp].to_time.to_s(:short) = commit[:timestamp].to_time.to_s(:short)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
= event_action_name(event) = event_action_name(event)
- if event.target - if event.target
%strong= link_to "##{event.target_iid}", [event.project, event.target] %strong= link_to "##{event.target_iid}", [event.project.namespace.becomes(Namespace), event.project, event.target]
at at
- if event.project - if event.project
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
- if event.rm_ref? - if event.rm_ref?
%strong= event.ref_name %strong= event.ref_name
- else - else
= link_to project_commits_path(event.project, event.ref_name) do = link_to namespace_project_commits_path(event.project.namespace, event.project, event.ref_name) do
%strong= event.ref_name %strong= event.ref_name
at at
= link_to_project event.project = link_to_project event.project
...@@ -21,5 +21,5 @@ ...@@ -21,5 +21,5 @@
%li.commits-stat %li.commits-stat
- if event.commits_count > 2 - if event.commits_count > 2
%span ... and #{event.commits_count - 2} more commits. %span ... and #{event.commits_count - 2} more commits.
= link_to project_compare_path(event.project, from: event.commit_from, to: event.commit_to) do = link_to namespace_project_compare_path(event.project.namespace, event.project, from: event.commit_from, to: event.commit_to) do
%strong Compare &rarr; #{truncate_sha(event.commit_from)}...#{truncate_sha(event.commit_to)} %strong Compare &rarr; #{truncate_sha(event.commit_from)}...#{truncate_sha(event.commit_to)}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
%h4.project-title %h4.project-title
.project-access-icon .project-access-icon
= visibility_level_icon(project.visibility_level) = visibility_level_icon(project.visibility_level)
= link_to project.name_with_namespace, project = link_to project.name_with_namespace, [project.namespace.becomes(Namespace), project]
%span.pull-right %span.pull-right
%i.fa.fa-star %i.fa.fa-star
= project.star_count = project.star_count
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
.repo-info .repo-info
- unless project.empty_repo? - unless project.empty_repo?
= link_to pluralize(project.repository.round_commit_count, 'commit'), project_commits_path(project, project.default_branch) = link_to pluralize(project.repository.round_commit_count, 'commit'), namespace_project_commits_path(project.namespace, project, project.default_branch)
&middot; &middot;
= link_to pluralize(project.repository.branch_names.count, 'branch'), project_branches_path(project) = link_to pluralize(project.repository.branch_names.count, 'branch'), namespace_project_branches_path(project.namespace, project)
&middot; &middot;
= link_to pluralize(project.repository.tag_names.count, 'tag'), project_tags_path(project) = link_to pluralize(project.repository.tag_names.count, 'tag'), namespace_project_tags_path(project.namespace, project)
- else - else
%i.fa.fa-exclamation-triangle %i.fa.fa-exclamation-triangle
Empty repository Empty repository
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.nothing-here-block This group has no projects yet .nothing-here-block This group has no projects yet
- projects.each do |project| - projects.each do |project|
%li.project-row %li.project-row
= link_to project_path(project), class: dom_class(project) do = link_to namespace_project_path(project.namespace, project), class: dom_class(project) do
.dash-project-avatar .dash-project-avatar
= project_icon(project, alt: '', class: 'avatar s40') = project_icon(project, alt: '', class: 'avatar s40')
.dash-project-access-icon .dash-project-access-icon
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
%span.milestone-row %span.milestone-row
- project = issue.project - project = issue.project
%strong #{project.name} &middot; %strong #{project.name} &middot;
= link_to [project, issue] do = link_to [project.namespace.becomes(Namespace), project, issue] do
%span.cgray ##{issue.iid} %span.cgray ##{issue.iid}
= link_to_gfm issue.title, [project, issue], title: issue.title = link_to_gfm issue.title, [project.namespace.becomes(Namespace), project, issue], title: issue.title
.pull-right.assignee-icon .pull-right.assignee-icon
- if issue.assignee - if issue.assignee
= image_tag avatar_icon(issue.assignee.email, 16), class: "avatar s16" = image_tag avatar_icon(issue.assignee.email, 16), class: "avatar s16"
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
%span.milestone-row %span.milestone-row
- project = merge_request.project - project = merge_request.project
%strong #{project.name} &middot; %strong #{project.name} &middot;
= link_to [project, merge_request] do = link_to [project.namespace.becomes(Namespace), project, merge_request] do
%span.cgray ##{merge_request.iid} %span.cgray ##{merge_request.iid}
= link_to_gfm merge_request.title, [project, merge_request], title: merge_request.title = link_to_gfm merge_request.title, [project.namespace.becomes(Namespace), project, merge_request], title: merge_request.title
.pull-right.assignee-icon .pull-right.assignee-icon
- if merge_request.assignee - if merge_request.assignee
= image_tag avatar_icon(merge_request.assignee.email, 16), class: "avatar s16" = image_tag avatar_icon(merge_request.assignee.email, 16), class: "avatar s16"
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
- @group_milestone.milestones.each do |milestone| - @group_milestone.milestones.each do |milestone|
%tr %tr
%td %td
= link_to "#{milestone.project.name}", project_milestone_path(milestone.project, milestone) = link_to "#{milestone.project.name}", namespace_project_milestone_path(milestone.project.namespace, milestone.project, milestone)
%td %td
= milestone.issues.opened.count = milestone.issues.opened.count
%td %td
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
%span.label.label-gray %span.label.label-gray
= repository_size(project) = repository_size(project)
.pull-right .pull-right
= link_to 'Members', project_team_index_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" = link_to 'Members', namespace_project_team_index_path(project.namespace, project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
= link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" = link_to 'Edit', edit_namespace_project_path(project.namespace, project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
= link_to 'Remove', project, data: { confirm: remove_project_message(project)}, method: :delete, class: "btn btn-small btn-remove" = link_to 'Remove', project, data: { confirm: remove_project_message(project)}, method: :delete, class: "btn btn-small btn-remove"
- if @projects.blank? - if @projects.blank?
.nothing-here-block This group has no projects yet .nothing-here-block This group has no projects yet
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
= escaped_autolink(@group.description) = escaped_autolink(@group.description)
%hr %hr
.row .row
%section.activities.col-md-8.hidden-sm.hidden-xs %section.activities.col-md-8
- if current_user - if current_user
= render "events/event_last_push", event: @last_push = render "events/event_last_push", event: @last_push
= render 'shared/event_filter' = render 'shared/event_filter'
...@@ -17,3 +17,5 @@ ...@@ -17,3 +17,5 @@
= spinner = spinner
%aside.side.col-md-4 %aside.side.col-md-4
= render "projects", projects: @projects = render "projects", projects: @projects
= link_to '#aside', class: 'show-aside' do
%i.fa.fa-angle-left
...@@ -23,6 +23,6 @@ ...@@ -23,6 +23,6 @@
= auto_discovery_link_tag :atom, projects_url(:atom, private_token: current_user.private_token), title: "Dashboard feed" = auto_discovery_link_tag :atom, projects_url(:atom, private_token: current_user.private_token), title: "Dashboard feed"
- if @project && !@project.new_record? - if @project && !@project.new_record?
- if current_controller?(:tree, :commits) - if current_controller?(:tree, :commits)
= auto_discovery_link_tag(:atom, project_commits_url(@project, @ref, format: :atom, private_token: current_user.private_token), title: "Recent commits to #{@project.name}:#{@ref}") = auto_discovery_link_tag(:atom, namespace_project_commits_url(@project.namespace, @project, @ref, format: :atom, private_token: current_user.private_token), title: "Recent commits to #{@project.name}:#{@ref}")
- if current_controller?(:issues) - if current_controller?(:issues)
= auto_discovery_link_tag(:atom, project_issues_url(@project, :atom, private_token: current_user.private_token), title: "#{@project.name} issues") = auto_discovery_link_tag(:atom, namespace_project_issues_url(@project.namespace, @project, :atom, private_token: current_user.private_token), title: "#{@project.name} issues")
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
= link_to destroy_user_session_path, class: "logout", method: :delete, title: "Logout", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout' do = link_to destroy_user_session_path, class: "logout", method: :delete, title: "Logout", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout' do
%i.fa.fa-sign-out %i.fa.fa-sign-out
%li.hidden-xs %li.hidden-xs
= link_to current_user, class: "profile-pic", id: 'profile-pic' do = link_to current_user, class: "profile-pic has_bottom_tooltip", id: 'profile-pic', 'data-original-title' => 'Your profile' do
= image_tag avatar_icon(current_user.email, 60), alt: 'User activity' = image_tag avatar_icon(current_user.email, 60), alt: 'User activity'
= render 'shared/outdated_browser' = render 'shared/outdated_browser'
:javascript :javascript
GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_project_path(@project, type: @noteable.class, type_id: params[:id])}" GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_namespace_project_path(@project.namespace, @project, type: @noteable.class, type_id: params[:id])}"
GitLab.GfmAutoComplete.setup(); GitLab.GfmAutoComplete.setup();
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
%span %span
Overview Overview
= nav_link(controller: :projects) do = nav_link(controller: :projects) do
= link_to admin_projects_path, title: 'Projects' do = link_to admin_namespaces_projects_path, title: 'Projects' do
%i.fa.fa-cube %i.fa.fa-cube
%span %span
Projects Projects
......
%ul.project-navigation.nav.nav-sidebar %ul.project-navigation.nav.nav-sidebar
- if @project_settings_nav - if @project_settings_nav
= nav_link do = nav_link do
= link_to project_path(@project), title: 'Back to project', class: "" do = link_to namespace_project_path(@project.namespace, @project), title: 'Back to project', class: "" do
%i.fa.fa-angle-left %i.fa.fa-angle-left
%span %span
Back to project Back to project
= nav_link(html_options: {class: "#{project_tab_class} separate-item"}) do %li.separate-item
= link_to edit_project_path(@project), title: 'Settings', class: "stat-tab tab no-highlight" do
%i.fa.fa-cogs
%span
Settings
%i.fa.fa-angle-down
= render 'projects/settings_nav' = render 'projects/settings_nav'
- else - else
= nav_link(path: 'projects#show', html_options: {class: "home"}) do = nav_link(path: 'projects#show', html_options: {class: "home"}) do
= link_to project_path(@project), title: 'Project', class: 'shortcuts-project' do = link_to namespace_project_path(@project.namespace, @project), title: 'Project', class: 'shortcuts-project' do
%i.fa.fa-dashboard %i.fa.fa-dashboard
%span %span
Project Project
- if project_nav_tab? :files - if project_nav_tab? :files
= nav_link(controller: %w(tree blob blame edit_tree new_tree)) do = nav_link(controller: %w(tree blob blame edit_tree new_tree)) do
= link_to project_tree_path(@project, @ref || @repository.root_ref), title: 'Files', class: 'shortcuts-tree' do = link_to namespace_project_tree_path(@project.namespace, @project, @ref || @repository.root_ref), title: 'Files', class: 'shortcuts-tree' do
%i.fa.fa-files-o %i.fa.fa-files-o
%span %span
Files Files
- if project_nav_tab? :commits - if project_nav_tab? :commits
= nav_link(controller: %w(commit commits compare repositories tags branches)) do = nav_link(controller: %w(commit commits compare repositories tags branches)) do
= link_to project_commits_path(@project, @ref || @repository.root_ref), title: 'Commits', class: 'shortcuts-commits' do = link_to namespace_project_commits_path(@project.namespace, @project, @ref || @repository.root_ref), title: 'Commits', class: 'shortcuts-commits' do
%i.fa.fa-history %i.fa.fa-history
%span %span
Commits Commits
- if project_nav_tab? :network - if project_nav_tab? :network
= nav_link(controller: %w(network)) do = nav_link(controller: %w(network)) do
= link_to project_network_path(@project, @ref || @repository.root_ref), title: 'Network', class: 'shortcuts-network' do = link_to namespace_project_network_path(@project.namespace, @project, @ref || @repository.root_ref), title: 'Network', class: 'shortcuts-network' do
%i.fa.fa-code-fork %i.fa.fa-code-fork
%span %span
Network Network
- if project_nav_tab? :graphs - if project_nav_tab? :graphs
= nav_link(controller: %w(graphs)) do = nav_link(controller: %w(graphs)) do
= link_to project_graph_path(@project, @ref || @repository.root_ref), title: 'Graphs', class: 'shortcuts-graphs' do = link_to namespace_project_graph_path(@project.namespace, @project, @ref || @repository.root_ref), title: 'Graphs', class: 'shortcuts-graphs' do
%i.fa.fa-area-chart %i.fa.fa-area-chart
%span %span
Graphs Graphs
= nav_link(controller: :milestones) do = nav_link(controller: :milestones) do
= link_to project_milestones_path(@project), title: 'Milestones' do = link_to namespace_project_milestones_path(@project.namespace, @project), title: 'Milestones' do
%i.fa.fa-clock-o %i.fa.fa-clock-o
%span %span
Milestones Milestones
...@@ -66,36 +61,35 @@ ...@@ -66,36 +61,35 @@
- if project_nav_tab? :merge_requests - if project_nav_tab? :merge_requests
= nav_link(controller: :merge_requests) do = nav_link(controller: :merge_requests) do
= link_to project_merge_requests_path(@project), title: 'Merge Requests', class: 'shortcuts-merge_requests' do = link_to namespace_project_merge_requests_path(@project.namespace, @project), title: 'Merge Requests', class: 'shortcuts-merge_requests' do
%i.fa.fa-tasks %i.fa.fa-tasks
%span %span
Merge Requests Merge Requests
%span.count.merge_counter= @project.merge_requests.opened.count %span.count.merge_counter= @project.merge_requests.opened.count
= nav_link(controller: :labels) do = nav_link(controller: :labels) do
= link_to project_labels_path(@project), title: 'Labels' do = link_to namespace_project_labels_path(@project.namespace, @project), title: 'Labels' do
%i.fa.fa-tags %i.fa.fa-tags
%span %span
Labels Labels
- if project_nav_tab? :wiki - if project_nav_tab? :wiki
= nav_link(controller: :wikis) do = nav_link(controller: :wikis) do
= link_to project_wiki_path(@project, :home), title: 'Wiki', class: 'shortcuts-wiki' do = link_to namespace_project_wiki_path(@project.namespace, @project, :home), title: 'Wiki', class: 'shortcuts-wiki' do
%i.fa.fa-book %i.fa.fa-book
%span %span
Wiki Wiki
- if project_nav_tab? :snippets - if project_nav_tab? :snippets
= nav_link(controller: :snippets) do = nav_link(controller: :snippets) do
= link_to project_snippets_path(@project), title: 'Snippets', class: 'shortcuts-snippets' do = link_to namespace_project_snippets_path(@project.namespace, @project), title: 'Snippets', class: 'shortcuts-snippets' do
%i.fa.fa-file-text-o %i.fa.fa-file-text-o
%span %span
Snippets Snippets
- if project_nav_tab? :settings - if project_nav_tab? :settings
= nav_link(html_options: {class: "#{project_tab_class} separate-item"}) do = nav_link(html_options: {class: "#{project_tab_class} separate-item"}) do
= link_to edit_project_path(@project), title: 'Settings', class: "stat-tab tab no-highlight" do = link_to edit_namespace_project_path(@project.namespace, @project), title: 'Settings', class: "stat-tab tab no-highlight" do
%i.fa.fa-cogs %i.fa.fa-cogs
%span %span
Settings Settings
%i.fa.fa-angle-down
...@@ -28,4 +28,4 @@ ...@@ -28,4 +28,4 @@
#{link_to "View it on GitLab", @target_url} #{link_to "View it on GitLab", @target_url}
= email_action @target_url = email_action @target_url
- if @project - if @project
You're receiving this notification because you are a member of the #{link_to_unless @target_url, @project.name_with_namespace, project_url(@project)} project team. You're receiving this notification because you are a member of the #{link_to_unless @target_url, @project.name_with_namespace, namespace_project_url(@project.namespace, @project)} project team.
Reassigned <%= issuable.class.model_name.human.titleize %> <%= issuable.iid %> Reassigned <%= issuable.class.model_name.human.titleize %> <%= issuable.iid %>
<%= url_for([issuable.project, issuable, {only_path: false}]) %> <%= url_for([issuable.project.namespace.becomes(Namespace), issuable.project, issuable, {only_path: false}]) %>
Assignee changed <%= "from #{@previous_assignee.name}" if @previous_assignee -%> Assignee changed <%= "from #{@previous_assignee.name}" if @previous_assignee -%>
to <%= "#{issuable.assignee_id ? issuable.assignee_name : 'Unassigned'}" %> to <%= "#{issuable.assignee_id ? issuable.assignee_name : 'Unassigned'}" %>
= "Issue was closed by #{@updated_by.name}" = "Issue was closed by #{@updated_by.name}"
Issue ##{@issue.iid}: #{project_issue_url(@issue.project, @issue)} Issue ##{@issue.iid}: #{namespace_project_issue_url(@issue.project.namespace, @issue.project, @issue)}
= "Merge Request ##{@merge_request.iid} was closed by #{@updated_by.name}" = "Merge Request ##{@merge_request.iid} was closed by #{@updated_by.name}"
Merge Request url: #{project_merge_request_url(@merge_request.target_project, @merge_request)} Merge Request url: #{namespace_project_merge_request_url(@merge_request.target_project.namespace, @merge_request.target_project, @merge_request)}
= merge_path_description(@merge_request, 'to') = merge_path_description(@merge_request, 'to')
......
Issue was <%= @issue_status %> by <%= @updated_by.name %> Issue was <%= @issue_status %> by <%= @updated_by.name %>
Issue <%= @issue.iid %>: <%= url_for(project_issue_url(@issue.project, @issue)) %> Issue <%= @issue.iid %>: <%= url_for(namespace_project_issue_url(@issue.project.namespace, @issue.project, @issue)) %>
= "Merge Request ##{@merge_request.iid} was #{@mr_status} by #{@updated_by.name}" = "Merge Request ##{@merge_request.iid} was #{@mr_status} by #{@updated_by.name}"
Merge Request url: #{project_merge_request_url(@merge_request.target_project, @merge_request)} Merge Request url: #{namespace_project_merge_request_url(@merge_request.target_project.namespace, @merge_request.target_project, @merge_request)}
= merge_path_description(@merge_request, 'to') = merge_path_description(@merge_request, 'to')
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment