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
55c9f099
Commit
55c9f099
authored
Sep 07, 2017
by
Tim Zallmann
Committed by
Phil Hughes
Sep 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Promote Issue/MR templates"
parent
33741438
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
4 deletions
+73
-4
app/assets/stylesheets/pages/promotions.scss
app/assets/stylesheets/pages/promotions.scss
+34
-0
app/views/shared/issuable/form/_title.html.haml
app/views/shared/issuable/form/_title.html.haml
+7
-4
ee/app/views/shared/promotions/_promote_issue_templates.html.haml
...iews/shared/promotions/_promote_issue_templates.html.haml
+15
-0
spec/features/promotion_spec.rb
spec/features/promotion_spec.rb
+17
-0
No files found.
app/assets/stylesheets/pages/promotions.scss
View file @
55c9f099
...
...
@@ -128,3 +128,37 @@
}
}
.promotion-issue-template-message
{
padding
:
$gl-padding
30px
20px
$gl-padding
;
p
{
margin-right
:
20px
;
}
.dropdown-title
{
margin
:
0
-25px
;
padding
:
0
;
overflow
:
initial
;
border-bottom
:
none
;
}
.btn
{
padding
:
$gl-vert-padding
$gl-btn-padding
;
border-radius
:
$border-radius-default
;
display
:
inline-block
;
line-height
:
$line-height-base
;
}
.btn-link
{
display
:
inline
;
color
:
$gl-link-color
;
padding
:
0
;
&
:hover
{
background-color
:
transparent
;
color
:
$gl-link-hover-color
;
}
}
}
app/views/shared/issuable/form/_title.html.haml
View file @
55c9f099
...
...
@@ -30,7 +30,10 @@
merge request from being merged before it's ready.
-
if
no_issuable_templates
&&
can?
(
current_user
,
:push_code
,
issuable
.
project
)
%p
.help-block
Add
=
link_to
'description templates'
,
help_page_path
(
'user/project/description_templates'
),
tabindex:
-
1
to help your contributors communicate effectively!
-
if
show_promotions?
=
render
'shared/promotions/promote_issue_templates'
-
else
%p
.help-block
Add
=
link_to
'description templates'
,
help_page_path
(
'user/project/description_templates'
),
tabindex:
-
1
to help your contributors communicate effectively!
ee/app/views/shared/promotions/_promote_issue_templates.html.haml
0 → 100644
View file @
55c9f099
.help-block
=
_
(
'Add'
)
=
link_to
'description templates'
,
'javascript:void(0);'
,
id:
'promotion-issue-template-link'
,
data:
{
toggle:
'dropdown'
}
=
_
(
'to help your contributors communicate effectively!'
)
.dropdown.promotion-issue-template
.dropdown-menu.promotion-issue-template-message
.dropdown-title
%button
.dropdown-title-button.dropdown-menu-close
{
"aria-label"
=>
"Close"
,
:type
=>
"button"
}
%i
.fa.fa-times.dropdown-menu-close-icon
{
"aria-hidden"
=>
"true"
,
"data-hidden"
=>
"true"
}
%div
%p
=
_
(
'Description templates allow you to define context-specific templates for issue and merge request description fields for your project.'
)
=
link_to
_
(
'Read more'
),
help_page_path
(
'user/project/description_templates'
),
class:
'btn-link'
%div
=
render
'shared/promotions/promotion_link_project'
spec/features/promotion_spec.rb
View file @
55c9f099
...
...
@@ -264,6 +264,23 @@ describe 'Promotions', js: true do
end
end
describe
'for issue templates'
,
js:
true
do
before
do
allow
(
License
).
to
receive
(
:current
).
and_return
(
nil
)
stub_application_setting
(
check_namespace_plan:
false
)
project
.
team
<<
[
user
,
:master
]
sign_in
(
user
)
end
it
'should appear on the page'
,
js:
true
do
visit
new_project_issue_path
(
project
)
wait_for_requests
find
(
'#promotion-issue-template-link'
).
click
expect
(
find
(
'.promotion-issue-template-message'
)).
to
have_content
'Description templates allow you to define context-specific templates for issue and merge request description fields for your project.'
end
end
describe
'for project audit events'
,
js:
true
do
before
do
allow
(
License
).
to
receive
(
:current
).
and_return
(
nil
)
...
...
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