Skip to content

Commit

Permalink
Drop old announcements feature from WebUI
Browse files Browse the repository at this point in the history
Announcements functionality has been moved to StatusMessage,
so its code is removed. For the moment we drop the WebUI part
since the API part is going to be adapted to keep backward
compatibility.

Co-authored-by: Victor Pereira <vpereira@suse.com>
  • Loading branch information
saraycp and vpereira committed May 29, 2020
1 parent f86f173 commit f2e48e3
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 133 deletions.
8 changes: 0 additions & 8 deletions src/api/app/controllers/webui/announcements_controller.rb

This file was deleted.

13 changes: 0 additions & 13 deletions src/api/app/controllers/webui/users/announcements_controller.rb

This file was deleted.

6 changes: 0 additions & 6 deletions src/api/app/controllers/webui/webui_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class Webui::WebuiController < ActionController::Base
before_action :check_anonymous
before_action :set_influxdb_additional_tags
before_action :require_configuration
before_action :set_pending_announcement
before_action :current_announcement
after_action :clean_cache

Expand Down Expand Up @@ -312,11 +311,6 @@ def pundit_user
User.possibly_nobody
end

def set_pending_announcement
return if Announcement.last.in?(User.possibly_nobody.announcements)
@pending_announcement = Announcement.last
end

def current_announcement
@current_announcement = StatusMessage.latest_for_current_user
end
Expand Down
12 changes: 0 additions & 12 deletions src/api/app/views/layouts/webui/_announcement.html.haml

This file was deleted.

2 changes: 0 additions & 2 deletions src/api/app/views/layouts/webui/_footer.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
%li= link_to('API Documentation', apidocs_index_path)
%li= link_to('OBS Portal', 'http://en.opensuse.org/Portal:Build_service')
%li= link_to('Reporting a Bug', 'http://openbuildservice.org/support/')
- if Announcement.last.present?
%li= link_to('Latest Announcement', announcement_path(Announcement.last))
.col
%strong.text-uppercase Contact
%ul
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
%li= link_to('API Documentation', apidocs_index_path)
%li= link_to('OBS Portal', 'http://en.opensuse.org/Portal:Build_service')
%li= link_to('Reporting a Bug', 'http://openbuildservice.org/support/')
- if Announcement.last.present?
%li= link_to('Latest Announcement', announcement_path(Announcement.last))
.flex-fill
%strong.text-uppercase Contact
%ul
Expand Down
2 changes: 0 additions & 2 deletions src/api/app/views/layouts/webui/webui.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
= render partial: 'layouts/webui/personal_navigation'

.container-xxl.sticky-top.flash-and-announcement.text-word-break-all
- unless @hide_announcement_notification
#announcement= render partial: 'layouts/webui/announcement', locals: { pending_announcement: @pending_announcement }
= render partial: 'layouts/webui/status_message_announcement', locals: { current_announcement: @current_announcement }
#flash= render partial: 'layouts/webui/flash', object: flash
.modal.fade#modal{ tabindex: '-1', role: 'dialog', aria: { labelledby: 'modalLabel', hidden: true } }
Expand Down

This file was deleted.

9 changes: 0 additions & 9 deletions src/api/app/views/webui/announcements/show.html.haml

This file was deleted.

9 changes: 0 additions & 9 deletions src/api/app/views/webui/users/announcements/create.js.haml

This file was deleted.

4 changes: 0 additions & 4 deletions src/api/config/routes/webui_routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,6 @@
end

post 'rss_tokens' => :create, controller: 'webui/users/rss_tokens', as: :my_rss_token
# To accept announcements as user
post 'announcements/:id' => :create, controller: 'webui/users/announcements', as: :my_announcements
post 'status_messages/:id' => :acknowledge, controller: 'webui/status_messages', as: :acknowledge_status_message
end

Expand All @@ -335,8 +333,6 @@
end
# Legacy routes end

resources :announcements, only: :show, controller: 'webui/announcements'

resource :session, only: [:new, :create, :destroy], controller: 'webui/session'

controller 'webui/groups/bs_requests' do
Expand Down

This file was deleted.

17 changes: 0 additions & 17 deletions src/api/spec/features/beta/webui/announcements_spec.rb

This file was deleted.

17 changes: 0 additions & 17 deletions src/api/spec/features/webui/announcements_spec.rb

This file was deleted.

0 comments on commit f2e48e3

Please sign in to comment.