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:
authorFilipa Lacerda <filipa@gitlab.com>2018-04-13 11:16:06 +0300
committerFilipa Lacerda <filipa@gitlab.com>2018-04-13 11:50:35 +0300
commita236b5e6a22cf762354a9bb3460e6bad80ab5b3f (patch)
tree5892871692ff57eed2ef6ceb4a60af7167ea8cab /app/views/discussions/_diff_with_notes.html.haml
parentb01fd7ad81524b5f2773ccba4b5789a6074ffb9d (diff)
Render only one error message per diff
Move html to haml file instead of JS
Diffstat (limited to 'app/views/discussions/_diff_with_notes.html.haml')
-rw-r--r--app/views/discussions/_diff_with_notes.html.haml5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/discussions/_diff_with_notes.html.haml b/app/views/discussions/_diff_with_notes.html.haml
index b382bc201b5..c13a128835a 100644
--- a/app/views/discussions/_diff_with_notes.html.haml
+++ b/app/views/discussions/_diff_with_notes.html.haml
@@ -28,8 +28,11 @@
%tr.line_holder.line-holder-placeholder
%td.old_line.diff-line-num
%td.new_line.diff-line-num
- %td.line_content
+ %td.line_content.js-success-lazy-load
.js-code-placeholder
+ %td.line_content.js-error-lazy-load-diff.hidden
+ - button = button_tag(_("Try again"), class: "btn-link btn-no-padding js-toggle-lazy-diff")
+ = _("Unable to load the diff. %{button_try_again}").html_safe % { button_try_again: button}
= render "discussions/diff_discussion", discussions: [discussion], expanded: true
- else
- partial = (diff_file.new_file? || diff_file.deleted_file?) ? 'single_image_diff' : 'replaced_image_diff'