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
a3e0e869
Commit
a3e0e869
authored
Jan 29, 2020
by
nicolasdular
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove broadcast_type feature flag
parent
fd4034b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
17 deletions
+19
-17
app/views/admin/broadcast_messages/_form.html.haml
app/views/admin/broadcast_messages/_form.html.haml
+13
-15
app/views/layouts/_broadcast.html.haml
app/views/layouts/_broadcast.html.haml
+1
-2
changelogs/unreleased/nicolasdular-add-broadcast-types.yml
changelogs/unreleased/nicolasdular-add-broadcast-types.yml
+5
-0
No files found.
app/views/admin/broadcast_messages/_form.html.haml
View file @
a3e0e869
...
@@ -5,15 +5,14 @@
...
@@ -5,15 +5,14 @@
=
render_broadcast_message
(
@broadcast_message
)
=
render_broadcast_message
(
@broadcast_message
)
-
else
-
else
Your message here
Your message here
-
if
Feature
.
enabled?
(
:broadcast_notification_type
)
.d-flex.justify-content-center
.d-flex.justify-content-center
.broadcast-notification-message.preview.js-broadcast-notification-message-preview.mt-2
{
class:
(
'hidden'
unless
@broadcast_message
.
notification?
)
}
.broadcast-notification-message.preview.js-broadcast-notification-message-preview.mt-2
{
class:
(
'hidden'
unless
@broadcast_message
.
notification?
)
}
=
sprite_icon
(
'bullhorn'
,
size:
16
,
css_class
:'vertical-align-text-top'
)
=
sprite_icon
(
'bullhorn'
,
size:
16
,
css_class
:'vertical-align-text-top'
)
.js-broadcast-message-preview
.js-broadcast-message-preview
-
if
@broadcast_message
.
message
.
present?
-
if
@broadcast_message
.
message
.
present?
=
render_broadcast_message
(
@broadcast_message
)
=
render_broadcast_message
(
@broadcast_message
)
-
else
-
else
Your message here
Your message here
=
form_for
[
:admin
,
@broadcast_message
],
html:
{
class:
'broadcast-message-form js-quick-submit js-requires-input'
}
do
|
f
|
=
form_for
[
:admin
,
@broadcast_message
],
html:
{
class:
'broadcast-message-form js-quick-submit js-requires-input'
}
do
|
f
|
=
form_errors
(
@broadcast_message
)
=
form_errors
(
@broadcast_message
)
...
@@ -26,12 +25,11 @@
...
@@ -26,12 +25,11 @@
required:
true
,
required:
true
,
dir:
'auto'
,
dir:
'auto'
,
data:
{
preview_path:
preview_admin_broadcast_messages_path
}
data:
{
preview_path:
preview_admin_broadcast_messages_path
}
-
if
Feature
.
enabled?
(
:broadcast_notification_type
)
.form-group.row
.form-group.row
.col-sm-2.col-form-label
.col-sm-2.col-form-label
=
f
.
label
:broadcast_type
,
_
(
'Type'
)
=
f
.
label
:broadcast_type
,
_
(
'Type'
)
.col-sm-10
.col-sm-10
=
f
.
select
:broadcast_type
,
broadcast_type_options
,
{},
class:
'form-control js-broadcast-message-type'
=
f
.
select
:broadcast_type
,
broadcast_type_options
,
{},
class:
'form-control js-broadcast-message-type'
.form-group.row.js-broadcast-message-background-color-form-group
{
class:
(
'hidden'
unless
@broadcast_message
.
banner?
)
}
.form-group.row.js-broadcast-message-background-color-form-group
{
class:
(
'hidden'
unless
@broadcast_message
.
banner?
)
}
.col-sm-2.col-form-label
.col-sm-2.col-form-label
=
f
.
label
:color
,
_
(
"Background color"
)
=
f
.
label
:color
,
_
(
"Background color"
)
...
...
app/views/layouts/_broadcast.html.haml
View file @
a3e0e869
-
current_broadcast_banner_messages
.
each
do
|
message
|
-
current_broadcast_banner_messages
.
each
do
|
message
|
=
broadcast_message
(
message
)
=
broadcast_message
(
message
)
-
if
Feature
.
enabled?
(
:broadcast_notification_type
)
=
broadcast_message
(
current_broadcast_notification_message
)
=
broadcast_message
(
current_broadcast_notification_message
)
changelogs/unreleased/nicolasdular-add-broadcast-types.yml
0 → 100644
View file @
a3e0e869
---
title
:
Add broadcast types to broadcast messages
merge_request
:
author
:
type
:
added
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