Commit 08b1f6ef authored by Gilang Gumilar's avatar Gilang Gumilar

Add anchor to related issues and related merge requests

parent 62945ef8
...@@ -64,10 +64,11 @@ export default { ...@@ -64,10 +64,11 @@ export default {
</script> </script>
<template> <template>
<div v-if="isFetchingMergeRequests || (!isFetchingMergeRequests && totalCount)"> <div id="related-merge-requests" v-if="isFetchingMergeRequests || (!isFetchingMergeRequests && totalCount)">
<div id="merge-requests" class="card card-slim mt-3"> <div id="merge-requests" class="card card-slim mt-3">
<div class="card-header"> <div class="card-header">
<div class="card-title mt-0 mb-0 h5 merge-requests-title"> <div class="card-title mt-0 mb-0 h5 merge-requests-title">
<a id="user-content-related-merge-requests" class="anchor" href="#related-merge-requests" aria-hidden="true"></a>
<span class="mr-1"> <span class="mr-1">
{{ __('Related merge requests') }} {{ __('Related merge requests') }}
</span> </span>
......
...@@ -284,3 +284,26 @@ ul.related-merge-requests > li { ...@@ -284,3 +284,26 @@ ul.related-merge-requests > li {
text-align: right; text-align: right;
} }
} }
.issue-details {
.card-title, {
position: relative;
a.anchor {
left: -16px;
top: 4px;
position: absolute;
text-decoration: none;
outline: none;
&::after {
content: image-url('icon_anchor.svg');
visibility: hidden;
}
}
&:hover > a.anchor::after {
visibility: visible;
}
}
}
...@@ -114,10 +114,11 @@ export default { ...@@ -114,10 +114,11 @@ export default {
</script> </script>
<template> <template>
<div class="related-issues-block"> <div id="related-issues" class="related-issues-block">
<div class="card card-slim"> <div class="card card-slim">
<div :class="{ 'panel-empty-heading border-bottom-0': !hasBody }" class="card-header"> <div :class="{ 'panel-empty-heading border-bottom-0': !hasBody }" class="card-header">
<h3 class="card-title mt-0 mb-0 h5"> <h3 class="card-title mt-0 mb-0 h5">
<a id="user-content-related-issues" class="anchor" href="#related-issues" aria-hidden="true"></a>
{{ __('Linked issues') }} {{ __('Linked issues') }}
<a v-if="hasHelpPath" :href="helpPath"> <a v-if="hasHelpPath" :href="helpPath">
<i <i
......
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