anchor.diff:  
             <td colspan="2" ><%= resource_contexts_template.requirements_template.name %></td>
             <td>
  -            <%= link_to raw(''),
  -                    unlink_resource_from_template_path(resource_id: @resource.id,
  +            <%if (!@any_requirements && @templates_count==1)%>
  +              <%= link_to raw(''),
  +                unlink_resource_from_template_path(resource_id: @resource.id,
                                           template_id: resource_contexts_template.requirements_template_id,
                                           customization_id: @customization_id,
                                           custom_origin: @custom_origin,
                                           tab_number: @tab_number),
                                           method: :post,
  +                                        :class => 'icon unlink',
  +                                        data: { confirm: 'Are you sure? This resource is not linked to any other templates; therefore unlinking it will cause it to be deleted from the DMPTool.' } %>
  +            <%else%>
  +              <%= link_to raw(''),
  +                unlink_resource_from_template_path(resource_id: @resource.id,
  +                                        template_id: resource_contexts_template.requirements_template_id,
  +                                        customization_id: @customization_id,
  +                                        custom_origin: @custom_origin,
  +                                        tab_number: @tab_number),
  +                                        method: :post,
                                           :class => 'icon unlink' %>
  +            <%end%>
             </td>
           </tr>
         <% end %>
  
positive.code:                                         custom_origin: @custom_origin,
                                          tab_number: @tab_number),
                                          method: :post,
                                          :class => 'icon unlink' %>
            </td>
          </tr>
        <% end %>
  
negative.code:                                       tab: @tab,
                                        origin_url: smart_origin_url),
                                        :method => :delete,
                                      data: { confirm: 'Are you sure? This resource will be deleted from all templates and all requirements!' },
                                      :class => "red remove_fields") %>
      </div>
    </fieldset>
  