summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorRegis Boudinot <boudinot.regis@yahoo.com>2017-04-06 01:13:06 +0000
committerJacob Schatz <jschatz@gitlab.com>2017-04-06 01:13:06 +0000
commit1c783007e6e2db25623eac3b3b1ef15bfdf95193 (patch)
tree5e7fce4b69fdaafcbb5dfd4aa75d9ff3cafb3909 /app/controllers
parent4e3de96ed059db39ee16ce99e5a4b4e8de14ea55 (diff)
downloadgitlab-ce-1c783007e6e2db25623eac3b3b1ef15bfdf95193.tar.gz
Issue title realtime
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/issues_controller.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index d984e6d3918..3a870ae4241 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -11,10 +11,10 @@ class Projects::IssuesController < Projects::ApplicationController
before_action :redirect_to_external_issue_tracker, only: [:index, :new]
before_action :module_enabled
before_action :issue, only: [:edit, :update, :show, :referenced_merge_requests,
- :related_branches, :can_create_branch]
+ :related_branches, :can_create_branch, :rendered_title]
# Allow read any issue
- before_action :authorize_read_issue!, only: [:show]
+ before_action :authorize_read_issue!, only: [:show, :rendered_title]
# Allow write(create) issue
before_action :authorize_create_issue!, only: [:new, :create]
@@ -200,6 +200,11 @@ class Projects::IssuesController < Projects::ApplicationController
end
end
+ def rendered_title
+ Gitlab::PollingInterval.set_header(response, interval: 3_000)
+ render json: { title: view_context.markdown_field(@issue, :title) }
+ end
+
protected
def issue