Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2018-06-05 10:39:59 +0300
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-06-05 10:39:59 +0300
commit809a50fcbf5ecfbf5ec02671f1ca2710a96f58d3 (patch)
tree0b77ad7a705f6477b03d0f83634a73e3cf36f7d1 /app/controllers/projects/issues_controller.rb
parent114c26ccf0f10788271c6108774e72809a7f93e1 (diff)
parent04236363bce399fbde36f396fdcf51d61735e1b0 (diff)
Merge branch 'master' into 'backstage/gb/use-persisted-stages-to-improve-pipelines-table'
Conflicts: app/models/ci/pipeline.rb
Diffstat (limited to 'app/controllers/projects/issues_controller.rb')
-rw-r--r--app/controllers/projects/issues_controller.rb15
1 files changed, 13 insertions, 2 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index d69015c8665..35c36c725e2 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -10,8 +10,8 @@ class Projects::IssuesController < Projects::ApplicationController
before_action :whitelist_query_limiting, only: [:create, :create_merge_request, :move, :bulk_update]
before_action :check_issues_available!
- before_action :issue, except: [:index, :new, :create, :bulk_update]
- before_action :set_issuables_index, only: [:index]
+ before_action :issue, except: [:index, :calendar, :new, :create, :bulk_update]
+ before_action :set_issuables_index, only: [:index, :calendar]
# Allow write(create) issue
before_action :authorize_create_issue!, only: [:new, :create]
@@ -39,6 +39,17 @@ class Projects::IssuesController < Projects::ApplicationController
end
end
+ def calendar
+ @issues = @issuables
+ .non_archived
+ .with_due_date
+ .limit(100)
+
+ respond_to do |format|
+ format.ics { response.headers['Content-Disposition'] = 'inline' }
+ end
+ end
+
def new
params[:issue] ||= ActionController::Parameters.new(
assignee_ids: ""