mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 23:16:15 +08:00
Merge pull request #1667 from mlorb/ml-sci-3304
Fix links in activity message for protocols in repository [SCI-3304]
This commit is contained in:
commit
1e3d0e901a
|
@ -72,8 +72,12 @@ module GlobalActivitiesHelper
|
|||
end
|
||||
end
|
||||
when Protocol
|
||||
if obj.in_repository?
|
||||
path = protocols_path
|
||||
if obj.in_repository_public?
|
||||
path = protocols_path(type: :public)
|
||||
elsif obj.in_repository_private?
|
||||
path = protocols_path(type: :private)
|
||||
elsif obj.in_repository_archived?
|
||||
path = protocols_path(type: :archive)
|
||||
elsif obj.my_module.navigable?
|
||||
path = protocols_my_module_path(obj.my_module)
|
||||
else
|
||||
|
|
|
@ -7,9 +7,12 @@
|
|||
<% end %>
|
||||
<% if subject %>
|
||||
<% if subject.in_repository? %>
|
||||
<% type = :public if subject.in_repository_public? %>
|
||||
<% type = :private if subject.in_repository_private? %>
|
||||
<% type = :archive if subject.in_repository_archived? %>
|
||||
<div class="ga-breadcrumb">
|
||||
<span class="fas fa-edit"></span>
|
||||
<%= route_to_other_team protocols_path(team: subject.team),
|
||||
<%= route_to_other_team protocols_path(team: subject.team, type: type),
|
||||
team,
|
||||
subject.name&.truncate(Constants::NAME_TRUNCATION_LENGTH),
|
||||
title: subject.name %>
|
||||
|
|
Loading…
Reference in a new issue