diff --git a/app/javascript/vue/protocol/protocolMetadata.vue b/app/javascript/vue/protocol/protocolMetadata.vue index d73dbdf3b..50354b0ef 100644 --- a/app/javascript/vue/protocol/protocolMetadata.vue +++ b/app/javascript/vue/protocol/protocolMetadata.vue @@ -13,7 +13,7 @@
- + diff --git a/app/serializers/protocol_serializer.rb b/app/serializers/protocol_serializer.rb index e8350eed2..167ff01f7 100644 --- a/app/serializers/protocol_serializer.rb +++ b/app/serializers/protocol_serializer.rb @@ -75,7 +75,8 @@ class ProtocolSerializer < ActiveModel::Serializer delete_steps_url: delete_steps_url, publish_url: publish_url, save_as_draft_url: save_as_draft_url, - versions_modal_url: versions_modal_url + versions_modal_url: versions_modal_url, + print_protocol_url: print_protocol_url } end @@ -115,6 +116,12 @@ class ProtocolSerializer < ActiveModel::Serializer versions_modal_protocol_path(object.parent || object) end + def print_protocol_url + return unless can_read_protocol_in_repository?(object) + + print_protocol_path(object) + end + def reorder_steps_url return unless can_manage_protocol_in_module?(object) || can_manage_protocol_in_repository?(object)