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
0481fdff
Commit
0481fdff
authored
Mar 16, 2022
by
Siddharth Asthana
Committed by
Peter Leitzen
Mar 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass formats explicitly when rendering .html format
Changelog: other
parent
eee5d278
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
+10
-9
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+3
-3
app/views/projects/issues/_service_desk_empty_state.html.haml
...views/projects/issues/_service_desk_empty_state.html.haml
+2
-2
ee/spec/views/admin/users/_credit_card_info.html.haml_spec.rb
...pec/views/admin/users/_credit_card_info.html.haml_spec.rb
+2
-1
spec/views/projects/commits/_commit.html.haml_spec.rb
spec/views/projects/commits/_commit.html.haml_spec.rb
+3
-3
No files found.
app/controllers/application_controller.rb
View file @
0481fdff
...
@@ -246,19 +246,19 @@ class ApplicationController < ActionController::Base
...
@@ -246,19 +246,19 @@ class ApplicationController < ActionController::Base
end
end
def
git_not_found!
def
git_not_found!
render
"errors/git_not_found.html"
,
layout:
"errors"
,
status: :not_found
render
template:
"errors/git_not_found"
,
formats: :html
,
layout:
"errors"
,
status: :not_found
end
end
def
render_403
def
render_403
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
{
render
"errors/access_denied"
,
layout:
"errors"
,
status: :forbidden
}
format
.
html
{
render
template:
"errors/access_denied"
,
formats: :html
,
layout:
"errors"
,
status: :forbidden
}
format
.
any
{
head
:forbidden
}
format
.
any
{
head
:forbidden
}
end
end
end
end
def
render_404
def
render_404
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
{
render
"errors/not_found"
,
layout:
"errors"
,
status: :not_found
}
format
.
html
{
render
template:
"errors/not_found"
,
formats: :html
,
layout:
"errors"
,
status: :not_found
}
# Prevent the Rails CSRF protector from thinking a missing .js file is a JavaScript file
# Prevent the Rails CSRF protector from thinking a missing .js file is a JavaScript file
format
.
js
{
render
json:
''
,
status: :not_found
,
content_type:
'application/json'
}
format
.
js
{
render
json:
''
,
status: :not_found
,
content_type:
'application/json'
}
format
.
any
{
head
:not_found
}
format
.
any
{
head
:not_found
}
...
...
app/views/projects/issues/_service_desk_empty_state.html.haml
View file @
0481fdff
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
-
if
Gitlab
::
ServiceDesk
.
supported?
-
if
Gitlab
::
ServiceDesk
.
supported?
.empty-state
.empty-state
.svg-content
.svg-content
=
render
'shared/empty_states/icons/service_desk_empty_state.svg'
=
render
partial:
'shared/empty_states/icons/service_desk_empty_state'
,
formats: :svg
.text-content
.text-content
%h4
=
title_text
%h4
=
title_text
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
-
else
-
else
.empty-state
.empty-state
.svg-content
.svg-content
=
render
'shared/empty_states/icons/service_desk_setup.svg'
=
render
partial:
'shared/empty_states/icons/service_desk_setup'
,
formats: :svg
.text-content
.text-content
-
if
can_edit_project_settings
-
if
can_edit_project_settings
%h4
=
s_
(
'ServiceDesk|Service Desk is not supported'
)
%h4
=
s_
(
'ServiceDesk|Service Desk is not supported'
)
...
...
ee/spec/views/admin/users/_credit_card_info.html.haml_spec.rb
View file @
0481fdff
...
@@ -9,7 +9,8 @@ RSpec.describe 'admin/users/_credit_card_info.html.haml', :saas do
...
@@ -9,7 +9,8 @@ RSpec.describe 'admin/users/_credit_card_info.html.haml', :saas do
def
render
def
render
super
(
super
(
partial:
'admin/users/credit_card_info.html.haml'
,
partial:
'admin/users/credit_card_info'
,
formats: :html
,
locals:
{
user:
user
}
locals:
{
user:
user
}
)
)
end
end
...
...
spec/views/projects/commits/_commit.html.haml_spec.rb
View file @
0481fdff
...
@@ -33,7 +33,7 @@ RSpec.describe 'projects/commits/_commit.html.haml' do
...
@@ -33,7 +33,7 @@ RSpec.describe 'projects/commits/_commit.html.haml' do
let
(
:ref
)
{
GpgHelpers
::
SIGNED_COMMIT_SHA
}
let
(
:ref
)
{
GpgHelpers
::
SIGNED_COMMIT_SHA
}
it
'does not display a loading spinner for GPG status'
do
it
'does not display a loading spinner for GPG status'
do
render
partial:
template
,
locals:
{
render
partial:
template
,
formats: :html
,
locals:
{
project:
project
,
project:
project
,
ref:
ref
,
ref:
ref
,
commit:
commit
commit:
commit
...
@@ -69,7 +69,7 @@ RSpec.describe 'projects/commits/_commit.html.haml' do
...
@@ -69,7 +69,7 @@ RSpec.describe 'projects/commits/_commit.html.haml' do
end
end
it
'does not display a ci status icon'
do
it
'does not display a ci status icon'
do
render
partial:
template
,
locals:
{
render
partial:
template
,
formats: :html
,
locals:
{
project:
project
,
project:
project
,
ref:
ref
,
ref:
ref
,
commit:
commit
commit:
commit
...
@@ -85,7 +85,7 @@ RSpec.describe 'projects/commits/_commit.html.haml' do
...
@@ -85,7 +85,7 @@ RSpec.describe 'projects/commits/_commit.html.haml' do
end
end
it
'does display a ci status icon when pipelines are enabled'
do
it
'does display a ci status icon when pipelines are enabled'
do
render
partial:
template
,
locals:
{
render
partial:
template
,
formats: :html
,
locals:
{
project:
project
,
project:
project
,
ref:
ref
,
ref:
ref
,
commit:
commit
commit:
commit
...
...
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