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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
e5e2e7b7
Commit
e5e2e7b7
authored
Feb 10, 2016
by
Kamil Trzcinski
Committed by
James Edwards-Jones
Jan 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the remove_pages
parent
13b6bad1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
6 deletions
+14
-6
app/controllers/projects/pages_controller.rb
app/controllers/projects/pages_controller.rb
+5
-0
app/services/projects/update_pages_configuration_service.rb
app/services/projects/update_pages_configuration_service.rb
+2
-2
app/views/projects/pages/index.html.haml
app/views/projects/pages/index.html.haml
+4
-3
config/routes/project.rb
config/routes/project.rb
+3
-1
No files found.
app/controllers/projects/pages_controller.rb
View file @
e5e2e7b7
...
...
@@ -51,6 +51,11 @@ class Projects::PagesController < Projects::ApplicationController
end
end
def
remove_pages
project
.
remove_pages
project
.
pages_domains
.
destroy_all
end
private
def
pages_domain_params
...
...
app/services/projects/update_pages_configuration_service.rb
View file @
e5e2e7b7
...
...
@@ -43,7 +43,7 @@ module Projects
end
def
pages_config_file
File
.
join
(
pages_path
,
'config.jso'
)
File
.
join
(
pages_path
,
'config.jso
n
'
)
end
def
update_file
(
file
,
data
)
...
...
@@ -52,7 +52,7 @@ module Projects
file
.
write
(
data
)
end
else
File
.
rm
_r
(
fil
e
)
File
.
rm
(
file
,
force:
tru
e
)
end
end
end
...
...
app/views/projects/pages/index.html.haml
View file @
e5e2e7b7
...
...
@@ -2,9 +2,10 @@
%h3
.page_title
Pages
=
link_to
new_namespace_project_page_path
(
@project
.
namespace
,
@project
),
class:
"btn btn-new pull-right"
,
title:
"New Domain"
do
%i
.fa.fa-plus
New Domain
-
if
Settings
.
pages
.
external_http
||
Settings
.
pages
.
external_https
=
link_to
new_namespace_project_page_path
(
@project
.
namespace
,
@project
),
class:
"btn btn-new pull-right"
,
title:
"New Domain"
do
%i
.fa.fa-plus
New Domain
%p
.light
With GitLab Pages you can host for free your static websites on GitLab.
...
...
config/routes/project.rb
View file @
e5e2e7b7
...
...
@@ -40,7 +40,9 @@ constraints(ProjectUrlConstrainer.new) do
end
resources
:pages
,
except:
[
:edit
,
:update
]
do
delete
:remove_pages
collection
do
delete
:remove_pages
end
end
resources
:compare
,
only:
[
:index
,
:create
]
do
...
...
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