2018-09-14 05:42:05 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-11-17 10:03:18 +00:00
|
|
|
module IssuesAction
|
|
|
|
extend ActiveSupport::Concern
|
2016-07-23 23:28:12 +00:00
|
|
|
include IssuableCollections
|
2018-06-12 09:35:34 +00:00
|
|
|
include IssuesCalendar
|
2015-11-17 10:03:18 +00:00
|
|
|
|
2017-11-22 07:50:36 +00:00
|
|
|
# rubocop:disable Gitlab/ModuleWithInstanceVariables
|
2015-11-17 10:03:18 +00:00
|
|
|
def issues
|
2017-11-07 13:34:12 +00:00
|
|
|
@issues = issuables_collection
|
2016-07-23 23:28:12 +00:00
|
|
|
.non_archived
|
|
|
|
.page(params[:page])
|
2016-02-17 13:52:12 +00:00
|
|
|
|
2017-11-07 13:34:12 +00:00
|
|
|
@issuable_meta_data = issuable_meta_data(@issues, collection_type)
|
2017-01-23 20:40:25 +00:00
|
|
|
|
2015-11-17 10:03:18 +00:00
|
|
|
respond_to do |format|
|
|
|
|
format.html
|
2017-06-12 17:21:13 +00:00
|
|
|
format.atom { render layout: 'xml.atom' }
|
2015-11-17 10:03:18 +00:00
|
|
|
end
|
|
|
|
end
|
2017-11-22 07:50:36 +00:00
|
|
|
# rubocop:enable Gitlab/ModuleWithInstanceVariables
|
2018-02-20 12:33:49 +00:00
|
|
|
|
2018-05-31 14:01:04 +00:00
|
|
|
def issues_calendar
|
2018-06-12 09:35:34 +00:00
|
|
|
render_issues_calendar(issuables_collection)
|
2018-05-31 14:01:04 +00:00
|
|
|
end
|
|
|
|
|
2018-02-20 12:33:49 +00:00
|
|
|
private
|
|
|
|
|
|
|
|
def finder_type
|
|
|
|
(super if defined?(super)) ||
|
2018-05-31 14:01:04 +00:00
|
|
|
(IssuesFinder if %w(issues issues_calendar).include?(action_name))
|
2018-02-20 12:33:49 +00:00
|
|
|
end
|
2015-11-17 10:03:18 +00:00
|
|
|
end
|