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
8380c272
Commit
8380c272
authored
May 12, 2021
by
Robert May
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cached merge request title partial
parent
f963a7b0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
38 deletions
+48
-38
app/views/projects/merge_requests/_mr_title.html.haml
app/views/projects/merge_requests/_mr_title.html.haml
+40
-38
config/feature_flags/development/cached_mr_title.yml
config/feature_flags/development/cached_mr_title.yml
+8
-0
No files found.
app/views/projects/merge_requests/_mr_title.html.haml
View file @
8380c272
...
...
@@ -2,14 +2,16 @@
-
can_update_merge_request
=
can?
(
current_user
,
:update_merge_request
,
@merge_request
)
-
can_reopen_merge_request
=
can?
(
current_user
,
:reopen_merge_request
,
@merge_request
)
-
are_close_and_open_buttons_hidden
=
merge_request_button_hidden?
(
@merge_request
,
true
)
&&
merge_request_button_hidden?
(
@merge_request
,
false
)
-
cache_key
=
[
@project
,
@merge_request
,
can_update_merge_request
,
can_reopen_merge_request
,
are_close_and_open_buttons_hidden
]
-
if
@merge_request
.
closed_or_merged_without_fork?
=
cache_if
(
Feature
.
enabled?
(
:cached_mr_title
,
@project
),
cache_key
,
expires_in:
1
.
day
)
do
-
if
@merge_request
.
closed_or_merged_without_fork?
.gl-alert.gl-alert-danger.gl-mb-5
=
sprite_icon
(
'error'
,
size:
16
,
css_class:
'gl-icon gl-alert-icon gl-alert-icon-no-title'
)
.gl-alert-body
The source project of this merge request has been removed.
.detail-page-header.border-bottom-0.pt-0.pb-0
.detail-page-header.border-bottom-0.pt-0.pb-0
.detail-page-header-body
=
render
"shared/issuable/status_box"
,
issuable:
@merge_request
...
...
config/feature_flags/development/cached_mr_title.yml
0 → 100644
View file @
8380c272
---
name
:
cached_mr_title
introduced_by_url
:
rollout_issue_url
:
milestone
:
'
13.12'
type
:
development
group
:
group::source code
default_enabled
:
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