Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions app/views/answers/_locking.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
<!--
This partial displays when a question was edit by two or more users. The local variables are: answer, question, readonly, locking
-->
<!-- TEST This partial displays when a question was edit by two or more users.
The local variables are: answer, question, readonly, locking -->
<div class="answer_notice">
<p><%= _('The following answer cannot be saved') %></p>
<%# We do not need to re-show example answers in this lock conflict section so leave template nil %>
<%= render partial: '/answers/new_edit', locals: { template: nil, question: question, answer: answer, readonly: true, locking: true } %>
<p><%= _('since %{name} saved the answer below while you were editing. Please, combine your changes and then save the answer again.') % { name: user.name} %></p>
<p><%= _("The following answer cannot be saved") %></p>
<%# We do not need to re-show example answers in this lock conflict section so leave template nil %>
<%= render partial: "/answers/new_edit",
locals: {
template: nil,
question: question,
answer: answer,
readonly: true,
locking: true,
} %>
<p><%= _(
"since %{name} saved the answer below while you were editing. Please, combine your changes and then save the answer again.",
) % { name: user.name } %></p>
</div>
2 changes: 1 addition & 1 deletion app/views/answers/_new_edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%# locals: { template, question, answer, readonly, locking } %>
<!--
This partial creates a form for each type of question. The local variables are: plan, answer, question, readonly
TEST This partial creates a form for each type of question. The local variables are: plan, answer, question, readonly
-->
<!-- Question text -->
<% q_format = question.question_format %>
Expand Down
Loading