X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/06a0c1d9f2e6cf1d5a9fd00b53071d857252f9fa..1d5934b254afc9e6082a154b5c365df968b3a65f:/apps/workbench/app/views/collections/_sharing_button.html.erb diff --git a/apps/workbench/app/views/collections/_sharing_button.html.erb b/apps/workbench/app/views/collections/_sharing_button.html.erb index b4f59f7015..3d8ea3fff1 100644 --- a/apps/workbench/app/views/collections/_sharing_button.html.erb +++ b/apps/workbench/app/views/collections/_sharing_button.html.erb @@ -1,8 +1,21 @@ -<% if @search_sharing.any? %> - <% linktext = "Shared" %> - <% btnstyle = "btn-success" %> +<%# Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 %> + +<% button_attrs = { + class: 'btn btn-xs btn-info', + remote: true, + method: :post, + } %> +<% if @search_sharing.nil? %> +
Your API token is not authorized to manage collection sharing links.
+<% elsif @search_sharing.empty? %> + <%= button_to("Create sharing link", {action: "share"}, button_attrs) %> <% else %> - <% linktext = "Share" %> - <% btnstyle = "btn-info" %> +