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
13a66040
Commit
13a66040
authored
Nov 12, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ability to remvoe broadcast messages
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
c5b66735
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
2 deletions
+22
-2
app/assets/stylesheets/sections/admin.scss
app/assets/stylesheets/sections/admin.scss
+6
-0
app/controllers/admin/broadcast_messages_controller.rb
app/controllers/admin/broadcast_messages_controller.rb
+9
-0
app/views/admin/broadcast_messages/index.html.haml
app/views/admin/broadcast_messages/index.html.haml
+6
-1
config/routes.rb
config/routes.rb
+1
-1
No files found.
app/assets/stylesheets/sections/admin.scss
View file @
13a66040
...
@@ -21,3 +21,9 @@
...
@@ -21,3 +21,9 @@
.controls
{
margin-left
:
130px
;
}
.controls
{
margin-left
:
130px
;
}
.form-actions
{
padding-left
:
130px
;
background
:
#fff
}
.form-actions
{
padding-left
:
130px
;
background
:
#fff
}
}
}
.broadcast-messages
{
.message
{
line-height
:
2
;
}
}
app/controllers/admin/broadcast_messages_controller.rb
View file @
13a66040
...
@@ -15,6 +15,15 @@ class Admin::BroadcastMessagesController < Admin::ApplicationController
...
@@ -15,6 +15,15 @@ class Admin::BroadcastMessagesController < Admin::ApplicationController
end
end
end
end
def
destroy
BroadcastMessage
.
find
(
params
[
:id
]).
destroy
respond_to
do
|
format
|
format
.
html
{
redirect_to
:back
}
format
.
js
{
render
nothing:
true
}
end
end
protected
protected
def
broadcast_messages
def
broadcast_messages
...
...
app/views/admin/broadcast_messages/index.html.haml
View file @
13a66040
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
=
f
.
submit
"Add broadcast message"
,
class:
"btn btn-create"
=
f
.
submit
"Add broadcast message"
,
class:
"btn btn-create"
-
if
@broadcast_messages
.
any?
-
if
@broadcast_messages
.
any?
%ul
.bordered-list
%ul
.bordered-list
.broadcast-messages
-
@broadcast_messages
.
each
do
|
broadcast_message
|
-
@broadcast_messages
.
each
do
|
broadcast_message
|
%li
%li
.pull-right
.pull-right
...
@@ -36,6 +36,11 @@
...
@@ -36,6 +36,11 @@
-
if
broadcast_message
.
ends_at
-
if
broadcast_message
.
ends_at
%strong
%strong
#{
broadcast_message
.
ends_at
.
to_s
(
:short
)
}
#{
broadcast_message
.
ends_at
.
to_s
(
:short
)
}
=
link_to
[
:admin
,
broadcast_message
],
method: :delete
,
remote:
true
,
class:
'remove-row btn btn-tiny'
do
%i
.icon-remove.cred
.message
=
broadcast_message
.
message
.message
=
broadcast_message
.
message
=
paginate
@broadcast_messages
=
paginate
@broadcast_messages
config/routes.rb
View file @
13a66040
...
@@ -86,7 +86,7 @@ Gitlab::Application.routes.draw do
...
@@ -86,7 +86,7 @@ Gitlab::Application.routes.draw do
get
:test
get
:test
end
end
resources
:broadcast_messages
,
only:
[
:index
,
:create
]
resources
:broadcast_messages
,
only:
[
:index
,
:create
,
:destroy
]
resource
:logs
,
only:
[
:show
]
resource
:logs
,
only:
[
:show
]
resource
:background_jobs
,
controller:
'background_jobs'
,
only:
[
:show
]
resource
:background_jobs
,
controller:
'background_jobs'
,
only:
[
:show
]
resources
:projects
,
constraints:
{
id:
/[a-zA-Z.\/0-9_\-]+/
},
only:
[
:index
,
:show
]
resources
:projects
,
constraints:
{
id:
/[a-zA-Z.\/0-9_\-]+/
},
only:
[
:index
,
:show
]
...
...
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