gitlab-org--gitlab-foss/app/controllers/concerns/issues_action.rb

40 lines
1,006 B
Ruby
Raw Normal View History

module IssuesAction
extend ActiveSupport::Concern
include IssuableCollections
# rubocop:disable Gitlab/ModuleWithInstanceVariables
def issues
2017-11-07 08:34:12 -05:00
@issues = issuables_collection
.non_archived
.page(params[:page])
2017-11-07 08:34:12 -05:00
@issuable_meta_data = issuable_meta_data(@issues, collection_type)
respond_to do |format|
format.html
format.atom { render layout: 'xml.atom' }
end
end
# rubocop:enable Gitlab/ModuleWithInstanceVariables
# rubocop:disable Gitlab/ModuleWithInstanceVariables
def issues_calendar
@issues = issuables_collection
.non_archived
.with_due_date
.limit(100)
respond_to do |format|
format.ics { response.headers['Content-Disposition'] = 'inline' }
end
end
# rubocop:enable Gitlab/ModuleWithInstanceVariables
private
def finder_type
(super if defined?(super)) ||
(IssuesFinder if %w(issues issues_calendar).include?(action_name))
end
end