Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
2d4556c5
Commit
2d4556c5
authored
Jun 17, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a few changes based on MR feedback
parent
bfced6fd
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
10 deletions
+17
-10
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+12
-6
app/models/application_setting.rb
app/models/application_setting.rb
+1
-1
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+1
-1
app/views/projects/new.html.haml
app/views/projects/new.html.haml
+1
-1
config/routes.rb
config/routes.rb
+1
-0
lib/gitlab/current_settings.rb
lib/gitlab/current_settings.rb
+1
-1
No files found.
app/controllers/projects_controller.rb
View file @
2d4556c5
...
@@ -7,7 +7,7 @@ class ProjectsController < Projects::ApplicationController
...
@@ -7,7 +7,7 @@ class ProjectsController < Projects::ApplicationController
before_action
:assign_ref_vars
,
:tree
,
only:
[
:show
],
if: :repo_exists?
before_action
:assign_ref_vars
,
:tree
,
only:
[
:show
],
if: :repo_exists?
# Authorize
# Authorize
before_action
:authorize_admin_project!
,
only:
[
:edit
,
:update
,
:housekeeping
,
:download_export
,
:export
,
:remove_export
]
before_action
:authorize_admin_project!
,
only:
[
:edit
,
:update
,
:housekeeping
,
:download_export
,
:export
,
:remove_export
,
:generate_new_export
]
before_action
:event_filter
,
only:
[
:show
,
:activity
]
before_action
:event_filter
,
only:
[
:show
,
:activity
]
layout
:determine_layout
layout
:determine_layout
...
@@ -190,7 +190,7 @@ class ProjectsController < Projects::ApplicationController
...
@@ -190,7 +190,7 @@ class ProjectsController < Projects::ApplicationController
redirect_to
(
redirect_to
(
edit_project_path
(
@project
),
edit_project_path
(
@project
),
notice:
"Project export started. A download link will be sent by e
-
mail."
notice:
"Project export started. A download link will be sent by email."
)
)
end
end
...
@@ -209,10 +209,16 @@ class ProjectsController < Projects::ApplicationController
...
@@ -209,10 +209,16 @@ class ProjectsController < Projects::ApplicationController
def
remove_export
def
remove_export
if
@project
.
remove_exports
if
@project
.
remove_exports
redirect_to
(
flash
[
:notice
]
=
"Project export has been deleted."
edit_project_path
(
@project
),
else
notice:
"Project export has been deleted."
flash
[
:alert
]
=
"Project export could not be deleted."
)
end
redirect_to
(
edit_project_path
(
@project
))
end
def
generate_new_export
if
@project
.
remove_exports
export
else
else
redirect_to
(
redirect_to
(
edit_project_path
(
@project
),
edit_project_path
(
@project
),
...
...
app/models/application_setting.rb
View file @
2d4556c5
...
@@ -123,7 +123,7 @@ class ApplicationSetting < ActiveRecord::Base
...
@@ -123,7 +123,7 @@ class ApplicationSetting < ActiveRecord::Base
default_project_visibility:
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
default_project_visibility:
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
default_snippet_visibility:
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
default_snippet_visibility:
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
restricted_signup_domains:
Settings
.
gitlab
[
'restricted_signup_domains'
],
restricted_signup_domains:
Settings
.
gitlab
[
'restricted_signup_domains'
],
import_sources:
[
'github'
,
'bitbucket'
,
'gitlab'
,
'gitorious'
,
'google_code'
,
'fogbugz'
,
'git'
,
'gitlab_project'
],
import_sources:
%w[github bitbucket gitlab gitorious google_code fogbugz git gitlab_project
]
,
shared_runners_enabled:
Settings
.
gitlab_ci
[
'shared_runners_enabled'
],
shared_runners_enabled:
Settings
.
gitlab_ci
[
'shared_runners_enabled'
],
max_artifacts_size:
Settings
.
artifacts
[
'max_size'
],
max_artifacts_size:
Settings
.
artifacts
[
'max_size'
],
require_two_factor_authentication:
false
,
require_two_factor_authentication:
false
,
...
...
app/views/projects/edit.html.haml
View file @
2d4556c5
...
@@ -135,7 +135,7 @@
...
@@ -135,7 +135,7 @@
-
if
@project
.
export_project_path
-
if
@project
.
export_project_path
=
link_to
'Download export'
,
download_export_namespace_project_path
(
@project
.
namespace
,
@project
),
=
link_to
'Download export'
,
download_export_namespace_project_path
(
@project
.
namespace
,
@project
),
method: :get
,
class:
"btn btn-default"
method: :get
,
class:
"btn btn-default"
=
link_to
'
Delete export'
,
remove
_export_namespace_project_path
(
@project
.
namespace
,
@project
),
=
link_to
'
Generate new export'
,
generate_new
_export_namespace_project_path
(
@project
.
namespace
,
@project
),
method: :post
,
class:
"btn btn-default"
method: :post
,
class:
"btn btn-default"
-
else
-
else
=
link_to
'Export project'
,
export_namespace_project_path
(
@project
.
namespace
,
@project
),
=
link_to
'Export project'
,
export_namespace_project_path
(
@project
.
namespace
,
@project
),
...
...
app/views/projects/new.html.haml
View file @
2d4556c5
...
@@ -136,7 +136,7 @@
...
@@ -136,7 +136,7 @@
$
(
'
.import_gitlab_project
'
).
click
(
function
(
event
)
{
$
(
'
.import_gitlab_project
'
).
click
(
function
(
event
)
{
if
(
$
(
'
.import_gitlab_project
'
).
attr
(
'
disabled
'
))
{
if
(
$
(
'
.import_gitlab_project
'
).
attr
(
'
disabled
'
))
{
event
.
preventDefault
();
event
.
preventDefault
();
new
Flash
(
"
P
roject path required.
"
,
"
alert
"
);
new
Flash
(
"
P
lease enter a path for the project to be imported to.
"
);
}
}
});
});
...
...
config/routes.rb
View file @
2d4556c5
...
@@ -461,6 +461,7 @@ Rails.application.routes.draw do
...
@@ -461,6 +461,7 @@ Rails.application.routes.draw do
post
:markdown_preview
post
:markdown_preview
post
:export
post
:export
post
:remove_export
post
:remove_export
post
:generate_new_export
get
:download_export
get
:download_export
get
:autocomplete_sources
get
:autocomplete_sources
get
:activity
get
:activity
...
...
lib/gitlab/current_settings.rb
View file @
2d4556c5
...
@@ -36,7 +36,7 @@ module Gitlab
...
@@ -36,7 +36,7 @@ module Gitlab
default_project_visibility:
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
default_project_visibility:
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
default_snippet_visibility:
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
default_snippet_visibility:
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
restricted_signup_domains:
Settings
.
gitlab
[
'restricted_signup_domains'
],
restricted_signup_domains:
Settings
.
gitlab
[
'restricted_signup_domains'
],
import_sources:
[
'github'
,
'bitbucket'
,
'gitlab'
,
'gitorious'
,
'google_code'
,
'fogbugz'
,
'git'
,
'gitlab_project'
],
import_sources:
%w[github bitbucket gitlab gitorious google_code fogbugz git gitlab_project
]
,
shared_runners_enabled:
Settings
.
gitlab_ci
[
'shared_runners_enabled'
],
shared_runners_enabled:
Settings
.
gitlab_ci
[
'shared_runners_enabled'
],
max_artifacts_size:
Settings
.
artifacts
[
'max_size'
],
max_artifacts_size:
Settings
.
artifacts
[
'max_size'
],
require_two_factor_authentication:
false
,
require_two_factor_authentication:
false
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment