diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-07-27 21:24:05 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-07-27 21:25:02 +0100 |
commit | d34c620fae23597e0130474fe20883f0718ded58 (patch) | |
tree | da89ba9fc2dcbc731fb3fd1e98dc25ad063455f8 /app/views/projects/issues | |
parent | 487ed06f444892abce47a6e21aaea79c9ca9c800 (diff) | |
download | gitlab-ce-d34c620fae23597e0130474fe20883f0718ded58.tar.gz |
[ci skip] Add issue data and notes data provided through haml to the store to stop querying the DOM everywhere
Diffstat (limited to 'app/views/projects/issues')
-rw-r--r-- | app/views/projects/issues/_discussion.html.haml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml index 90b97d36d2c..2b4fb6be327 100644 --- a/app/views/projects/issues/_discussion.html.haml +++ b/app/views/projects/issues/_discussion.html.haml @@ -3,16 +3,16 @@ = link_to 'Reopen issue', issue_path(@issue, issue: {state_event: :reopen}, format: 'json'), data: {original_text: "Reopen issue", alternative_text: "Comment & reopen issue"}, class: "btn btn-nr btn-reopen btn-comment js-note-target-reopen #{issue_button_visibility(@issue, false)}", title: 'Reopen issue' = link_to 'Close issue', issue_path(@issue, issue: {state_event: :close}, format: 'json'), data: {original_text: "Close issue", alternative_text: "Comment & close issue"}, class: "btn btn-nr btn-close btn-comment js-note-target-close #{issue_button_visibility(@issue, true)}", title: 'Close issue' -%section.js-notes-wrapper{ data: { discussions_path: discussions_namespace_project_issue_path(@project.namespace, @project, @issue, format: :json), new_session_path: new_session_path(:user, redirect_to_referer: 'yes'), notes_path: notes_url, last_fetched_at: Time.now.to_i } } - #js-notes +%section + #js-vue-notes{ data: { discussions_path: discussions_namespace_project_issue_path(@project.namespace, @project, @issue, format: :json), + new_session_path: new_session_path(:user, redirect_to_referer: 'yes'), + notes_path: '#{notes_url}?full_data=1', last_fetched_at: Time.now.to_i, + issue_data: serialize_issuable(@issue), + current_user_data: UserSerializer.new.represent(current_user).to_json }} - content_for :page_specific_javascripts do = webpack_bundle_tag 'common_vue' = webpack_bundle_tag 'notes' - -/ #notes{style: "margin-top: 150px"} -/ = render 'shared/notes/notes_with_form', :autocomplete => true - = render "layouts/init_auto_complete" :javascript |