- <%= link_to truncate(p.title), stash_url_helpers.edit_histories_path(resource_id: p.resource.id) %>
-
- <% if (p.resource.submitted? && current_user.min_curator?) || p.resource.dataset_in_progress_editor&.id == current_user.id %>
-
- <%= form_with(url: stash_url_helpers.metadata_entry_pages_new_version_path, method: :post) do -%>
-
- <%= hidden_field_tag :resource_id, p.resource.id %>
- <% end %>
+ <%= link_to truncate(p.title), stash_url_helpers.show_path(id: p.resource.identifier_str), target: '_blank' %>
+ <% if policy([:stash_engine, :admin_datasets]).curation_actions? && ((p.resource.permission_to_edit?(user: current_user) && p.resource.last_curation_activity.status == 'submitted') || (p.resource.last_curation_activity.status == 'in_progress' && p.resource.current_editor_id == current_user.id)) %>
+
+ <%= form_with(url: stash_url_helpers.metadata_entry_pages_new_version_path, method: :post) do %>
+ <%= hidden_field_tag :resource_id, p.resource.id, id: "resource_id_#{p.resource.id}" %>
+ <%= hidden_field_tag :return_url, '/stash/dashboard' %>
+
+ <% end %>
+
<% end %>