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
443bd1b1
Commit
443bd1b1
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 weight"
parent
6cf17029
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
77 additions
and
2 deletions
+77
-2
app/assets/stylesheets/pages/promotions.scss
app/assets/stylesheets/pages/promotions.scss
+28
-0
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+1
-0
ee/app/views/shared/promotions/_promote_issue_weights.html.haml
.../views/shared/promotions/_promote_issue_weights.html.haml
+28
-0
ee/app/views/shared/promotions/_promotion_link_project.html.haml
...views/shared/promotions/_promotion_link_project.html.haml
+3
-2
spec/features/promotion_spec.rb
spec/features/promotion_spec.rb
+17
-0
No files found.
app/assets/stylesheets/pages/promotions.scss
View file @
443bd1b1
...
...
@@ -76,3 +76,31 @@
max-width
:
700px
;
}
}
.promotion-info-weight-message
{
padding
:
$gl-padding-top
;
.dropdown-title
{
margin
:
0
0
10px
;
}
.btn
{
padding
:
$gl-vert-padding
$gl-btn-padding
;
border-radius
:
$border-radius-default
;
display
:
block
;
line-height
:
$line-height-base
;
}
.btn-link
{
display
:
inline
;
color
:
$gl-link-color
;
background-color
:
transparent
;
padding
:
0
;
&
:hover
{
background-color
:
transparent
;
color
:
$gl-link-hover-color
;
}
}
}
app/views/shared/issuable/_sidebar.html.haml
View file @
443bd1b1
...
...
@@ -141,6 +141,7 @@
%li
%a
{
href:
"#"
,
data:
{
id:
weight
,
none:
weight
==
Issue
::
WEIGHT_NONE
},
class:
(
"is-active"
if
params
[
:weight
]
==
weight
.
to_s
)
}
=
weight
=
render
'shared/promotions/promote_issue_weights'
-
if
issuable
.
has_attribute?
(
:confidential
)
%script
#js-confidential-issue-data
{
type:
"application/json"
}=
{
is_confidential:
@issue
.
confidential
,
is_editable:
can_edit_issuable
}.
to_json
.
html_safe
...
...
ee/app/views/shared/promotions/_promote_issue_weights.html.haml
0 → 100644
View file @
443bd1b1
-
if
show_promotions?
&&
!
@project
.
feature_available?
(
:issue_weights
)
.block.weight
.sidebar-collapsed-icon
{
data:
{
toggle:
"dropdown"
,
target:
".weight"
}
}
=
icon
(
'balance-scale'
)
%span
No
.title.hide-collapsed
=
_
(
'Weight'
)
=
link_to
_
(
'Edit'
),
'#'
,
class:
'edit-link promote-weight-link pull-right'
,
data:
{
toggle:
"dropdown"
,
target:
".weight"
}
.promotion-info-weight.dropdown
.dropdown-menu.promotion-info-weight-message
.dropdown-title
%span
=
_
(
'Change Weight'
)
%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
-
if
current_application_settings
.
should_check_namespace_plan?
=
_
(
'Upgrade your plan to activate Issue weight.'
)
-
else
=
_
(
'Improve issues management with Issue weight and GitLab Enterprise Edition.'
)
=
link_to
_
(
'Read more'
),
help_page_path
(
'workflow/issue_weight.html'
),
class:
'btn-link'
,
target:
'_blank'
%div
=
render
'shared/promotions/promotion_link_project'
,
short_form:
true
.hide-collapsed
%span
.no-value
=
_
(
'None'
)
ee/app/views/shared/promotions/_promotion_link_project.html.haml
View file @
443bd1b1
-
short_form
=
local_assigns
.
fetch
:short_form
,
false
-
if
current_application_settings
.
should_check_namespace_plan?
-
if
can?
(
current_user
,
:admin_namespace
,
@project
.
namespace
)
=
link_to
'Upgrade your plan'
,
upgrade_plan_url
,
class:
'btn btn-primary'
...
...
@@ -8,9 +9,9 @@
%p
Contact owner
#{
link_to
(
owner
.
name
,
user_path
(
owner
))
}
to upgrade the plan.
-
elsif
current_user
&
.
admin?
-
if
License
.
current
&
.
expired?
=
link_to
'Buy GitLab Enterprise Edition'
,
Gitlab
::
SUBSCRIPTIONS_PLANS_URL
,
class:
'btn btn-primary'
=
link_to
(
!
short_form
?
'Buy GitLab Enterprise Edition'
:
'Buy EE'
)
,
Gitlab
::
SUBSCRIPTIONS_PLANS_URL
,
class:
'btn btn-primary'
-
else
=
link_to
'Start GitLab Enterprise Edition trial'
,
new_trial_url
,
class:
'btn btn-primary'
=
link_to
(
!
short_form
?
'Start GitLab Enterprise Edition trial'
:
'Start GitLab EE trial'
)
,
new_trial_url
,
class:
'btn btn-primary'
-
else
%p
Contact your Administrator to upgrade your license.
spec/features/promotion_spec.rb
View file @
443bd1b1
...
...
@@ -247,6 +247,23 @@ describe 'Promotions', js: true do
end
end
describe
'for issue weight'
,
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
project_issue_path
(
project
,
issue
)
wait_for_requests
find
(
'.promote-weight-link'
).
click
expect
(
find
(
'.promotion-info-weight-message'
)).
to
have_content
'Improve issues management with Issue weight and GitLab Enterprise Edition'
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