app/controllers/workarea/admin/releases_controller.rb in workarea-admin-3.4.45 vs app/controllers/workarea/admin/releases_controller.rb in workarea-admin-3.5.0.beta.1
- old
+ new
@@ -4,18 +4,16 @@
include StorefrontHelper
required_permissions :releases
before_action :find_release, except: :changes
- before_action :find_calendar, only: [:calendar, :update]
+ before_action :find_calendar, only: [:index, :update]
before_action :authenticate_user_by_token, only: :calendar_feed
skip_before_action :require_login, :require_admin, only: :calendar_feed
- around_action :set_time_zone, only: :calendar
+ around_action :set_time_zone, only: :index
def index
- search = Search::AdminReleases.new(params)
- @search = Admin::ReleaseSearchViewModel.new(search, view_model_options)
end
def show
end
@@ -26,11 +24,13 @@
@release.attributes = params[:release]
@release.save
render json: { release: @release.model }
end
- def calendar
+ def list
+ search = Search::AdminReleases.new(params)
+ @search = Admin::ReleaseSearchViewModel.new(search, view_model_options)
end
def new
end
@@ -42,22 +42,17 @@
flash[:error] = t('workarea.admin.releases.flash_messages.saved_error')
render :edit
end
end
+ def original
+ end
+
def publish
self.current_release = nil
PublishRelease.perform_async(@release.id)
flash[:success] = t('workarea.admin.releases.flash_messages.published')
- redirect_to return_to || release_path(@release)
- end
-
- def undo
- self.current_release = nil
- @release.undo!
-
- flash[:success] = t('workarea.admin.releases.flash_messages.reverted')
redirect_to return_to || release_path(@release)
end
def destroy
self.current_release = nil