-<% if @search_sharing.any? %>
- <% linktext = "Shared" %>
- <% btnstyle = "btn-success" %>
+<% button_attrs = {
+ class: 'btn btn-xs btn-info',
+ remote: true,
+ method: :post,
+ } %>
+<% if @search_sharing.nil? %>
+ <p>Your API token is not authorized to manage collection sharing links.</p>
+<% elsif @search_sharing.empty? %>
+ <%= button_to("Create sharing link", {action: "share"}, button_attrs) %>