Fix user smart annotation showing as if the user is removed from team [SCI-2861]

This commit is contained in:
Matej Zrimšek 2018-11-19 08:02:25 +01:00
parent c184ca1c95
commit c144d599fc
9 changed files with 14 additions and 11 deletions

View file

@ -36,5 +36,5 @@
</div> </div>
<strong><%= comment.user.full_name %>:</strong> <strong><%= comment.user.full_name %>:</strong>
<div data-role="comment-message-container"> <div data-role="comment-message-container">
<div data-role="comment-message"><%= custom_auto_link(comment.message) %></div> <div data-role="comment-message"><%= custom_auto_link(comment.message, team: current_team) %></div>
</div> </div>

View file

@ -1,5 +1,5 @@
<% if @my_module.description.blank? %> <% if @my_module.description.blank? %>
<em><%=t "experiments.canvas.popups.no_description" %></em> <em><%=t "experiments.canvas.popups.no_description" %></em>
<% else %> <% else %>
<%= custom_auto_link(@my_module.description) %> <%= custom_auto_link(@my_module.description, team: current_team) %>
<% end %> <% end %>

View file

@ -36,5 +36,6 @@
</div> </div>
<strong><%= comment.user.full_name %>:</strong> <strong><%= comment.user.full_name %>:</strong>
<div data-role="comment-message-container"> <div data-role="comment-message-container">
<div data-role="comment-message"><%= custom_auto_link(comment.message) %></div> <% byebug %>
<div data-role="comment-message"><%= custom_auto_link(comment.message, team: current_team) %></div>
</div> </div>

View file

@ -67,7 +67,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<%= custom_auto_link(experiment.description) %> <%= custom_auto_link(experiment.description, team: current_team) %>
</div> </div>
</div> </div>
</div> </div>

View file

@ -46,7 +46,7 @@
<div data-hook="experiment-card-body"> <div data-hook="experiment-card-body">
<% if experiment.description? %> <% if experiment.description? %>
<div class='experiment-description'> <div class='experiment-description'>
<%= custom_auto_link(experiment.description) %> <%= custom_auto_link(experiment.description, team: current_team) %>
</div> </div>
<% else %> <% else %>
<span class='experiment-no-description'> <span class='experiment-no-description'>

View file

@ -37,5 +37,5 @@
<% end %> <% end %>
</div> </div>
<div data-role="comment-message-container"> <div data-role="comment-message-container">
<div data-role="comment-message"><%= custom_auto_link(comment.message) %></div> <div data-role="comment-message"><%= custom_auto_link(comment.message, team: current_team) %></div>
</div> </div>

View file

@ -1,5 +1,6 @@
<div class="ql-editor"> <div class="ql-editor">
<%= custom_auto_link(generate_image_tag_from_token(result.result_text.text, result.result_text), <%= custom_auto_link(generate_image_tag_from_token(result.result_text.text, result.result_text),
simple_format: false, simple_format: false,
tags: %w(img)) %> tags: %w(img),
team: current_team) %>
</div> </div>

View file

@ -37,5 +37,5 @@
<% end %> <% end %>
</div> </div>
<div data-role="comment-message-container"> <div data-role="comment-message-container">
<div data-role="comment-message"><%= custom_auto_link(comment.message)%></div> <div data-role="comment-message"><%= custom_auto_link(comment.message, team: current_team)%></div>
</div> </div>

View file

@ -55,7 +55,8 @@
<div class="ql-editor"> <div class="ql-editor">
<%= custom_auto_link(generate_image_tag_from_token(step.description, step), <%= custom_auto_link(generate_image_tag_from_token(step.description, step),
simple_format: false, simple_format: false,
tags: %w(img)) %> tags: %w(img),
team: current_team) %>
</div> </div>
<% end %> <% end %>
</div> </div>
@ -95,7 +96,7 @@
<% unless step.checklists.blank? then %> <% unless step.checklists.blank? then %>
<div class="col-xs-12"> <div class="col-xs-12">
<% step.checklists.asc.each do |checklist| %> <% step.checklists.asc.each do |checklist| %>
<strong><%= custom_auto_link(checklist.name) %></strong> <strong><%= custom_auto_link(checklist.name, team: current_team) %></strong>
<% if checklist.checklist_items.empty? %> <% if checklist.checklist_items.empty? %>
</br> </br>
<%= t("protocols.steps.empty_checklist") %> <%= t("protocols.steps.empty_checklist") %>
@ -114,7 +115,7 @@
value="" value=""
disabled="disabled" /> disabled="disabled" />
<% end %> <% end %>
<%= custom_auto_link(checklist_item.text) %> <%= custom_auto_link(checklist_item.text, team: current_team) %>
</label> </label>
</div> </div>
<% end %> <% end %>