<commit_before>{#        ======= Top right buttons =======#}
<div class="col-sm-12 height-fix">
    <div class="lined-wrapper"></div>
    <div class="custom-btn-toolbar">
        {% if not metadata_form %}
            {% if not is_owner_user and not is_edit_user and not is_view_user %}
                {% if cm.is_mine %}
                    <form class="pull-right" data-id="form-add-to-my-resources"
                          action="/hsapi/_internal/{{ cm.short_id }}/label-resource-action/"
                          method="post">
                        {% csrf_token %}
                        <input type="hidden" name="label_type" value="MINE">
                        <input type="hidden" name="action" value="DELETE">
                        <button id="btnMyResources" data-toggle="tooltip" data-placement="auto"
                                title="Remove from my resources" data-form-id="form-add-to-my-resources"
                                class="glyphicon glyphicon-inbox icon-button btn-resource-remove"></button>
                    </form>
                {% else %}
                    <form class="pull-right" data-id="form-add-to-my-resources"
                          action="/hsapi/_internal/{{ cm.short_id }}/label-resource-action/"
                          method="post">
                        {% csrf_token %}
                        <input type="hidden" name="label_type" value="MINE">
                        <input type="hidden" name="action" value="CREATE">
                        <button id="btnMyResources" data-toggle="tooltip" data-placement="auto"
                                title="Add to my resources" data-form-id="form-add-to-my-resources"
                                class="glyphicon glyphicon-inbox icon-button btn-resource-add"></button>
                    </form>
                {% endif %}
            {% endif %}

            {% if not is_replaced_by %}
                {% if page.perms.change or is_owner_user and cm.raccess.published %}
                    <form class="inline pull-right" action="{{ cm.get_absolute_url }}" method="post">
                        {% csrf_token %}
                        {% if page.perms.delete and cm.can_be_public_or_discoverable %}
                            {% if cm.resource_type|lower == "collectionresource" and cm.are_all_contained_resources_published or cm.resource_type|lower != "collectionresource" %}
                                 <a id="publish" data-toggle="modal" data-target="#submit-for-publication-dialog">
                                    <span data-toggle="tooltip" data-placement="auto" title="Publish this resource"
                                          class="glyphicon glyphicon-book icon-button btn-edit"></span>
                                </a>
                            {% endif %}
                        {% endif %}

                        {% if page.perms.delete or cm.raccess.published %}
                            <a id="new-version" data-toggle="modal" data-target="#new-version-resource-dialog">
                                <span data-toggle="tooltip" data-placement="auto"
                                      title="Create a new version of this resource"
                                      class="glyphicon glyphicon-new-window icon-button btn-edit"></span>
                            </a>
                        {% endif %}

                        {% if page.perms.delete %}
                            <a id="delete" data-toggle="modal" data-target="#delete-resource-dialog">
                                <span data-toggle="tooltip" data-placement="auto" title="Delete this resource"
                                      class="glyphicon glyphicon-trash icon-button btn-remove"></span>
                            </a>
                        {% endif %}

                        {% if page.perms.change %}
                            <input name="resource-mode" type="hidden" value="edit"/>
                            <button id="edit-metadata" type="submit" data-toggle="tooltip" data-placement="auto"
                                    title="Edit this resource"
                                    class="glyphicon glyphicon-pencil icon-button btn-edit"></button>
                        {% endif %}
                    </form>
                {% endif %}
            {% endif %}
        {% else %}
            <a href="{{ cm.get_absolute_url }}">
                    <span data-toggle="tooltip" data-placement="auto" title="View resource"
                          class="glyphicon glyphicon-circle-arrow-left icon-button btn-edit"></span>
            </a>
        {% endif %}

        {% if show_manage_access %}
        <a data-toggle="modal" data-target="#manage-access">
            <span data-toggle="tooltip" data-placement="auto" title="Manage who has access. Use this button to share your resource with specific HydroShare users. You can give other users the ability to view or edit this resource. You can also add additional owners who will have full permissions."
                  class="glyphicon glyphicon-lock icon-button btn-edit"></span>
        </a>
        {% endif %}
    </div>
</div><commit_msg>[#1145] Add to My Resources button no longer appears when not signed in<commit_after>{#        ======= Top right buttons =======#}
<div class="col-sm-12 height-fix">
    <div class="lined-wrapper"></div>
    <div class="custom-btn-toolbar">
        {% if not metadata_form %}
            {% if not is_owner_user and not is_edit_user and not is_view_user %}
                {% if cm.is_mine %}
                    <form class="pull-right" data-id="form-add-to-my-resources"
                          action="/hsapi/_internal/{{ cm.short_id }}/label-resource-action/"
                          method="post">
                        {% csrf_token %}
                        <input type="hidden" name="label_type" value="MINE">
                        <input type="hidden" name="action" value="DELETE">
                        <button id="btnMyResources" data-toggle="tooltip" data-placement="auto"
                                title="Remove from my resources" data-form-id="form-add-to-my-resources"
                                class="glyphicon glyphicon-inbox icon-button btn-resource-remove"></button>
                    </form>
                {% elif user.pk %}
                    <form class="pull-right" data-id="form-add-to-my-resources"
                          action="/hsapi/_internal/{{ cm.short_id }}/label-resource-action/"
                          method="post">
                        {% csrf_token %}
                        <input type="hidden" name="label_type" value="MINE">
                        <input type="hidden" name="action" value="CREATE">
                        <button id="btnMyResources" data-toggle="tooltip" data-placement="auto"
                                title="Add to my resources" data-form-id="form-add-to-my-resources"
                                class="glyphicon glyphicon-inbox icon-button btn-resource-add"></button>
                    </form>
                {% endif %}
            {% endif %}

            {% if not is_replaced_by %}
                {% if page.perms.change or is_owner_user and cm.raccess.published %}
                    <form class="inline pull-right" action="{{ cm.get_absolute_url }}" method="post">
                        {% csrf_token %}
                        {% if page.perms.delete and cm.can_be_public_or_discoverable %}
                            {% if cm.resource_type|lower == "collectionresource" and cm.are_all_contained_resources_published or cm.resource_type|lower != "collectionresource" %}
                                 <a id="publish" data-toggle="modal" data-target="#submit-for-publication-dialog">
                                    <span data-toggle="tooltip" data-placement="auto" title="Publish this resource"
                                          class="glyphicon glyphicon-book icon-button btn-edit"></span>
                                </a>
                            {% endif %}
                        {% endif %}

                        {% if page.perms.delete or cm.raccess.published %}
                            <a id="new-version" data-toggle="modal" data-target="#new-version-resource-dialog">
                                <span data-toggle="tooltip" data-placement="auto"
                                      title="Create a new version of this resource"
                                      class="glyphicon glyphicon-new-window icon-button btn-edit"></span>
                            </a>
                        {% endif %}

                        {% if page.perms.delete %}
                            <a id="delete" data-toggle="modal" data-target="#delete-resource-dialog">
                                <span data-toggle="tooltip" data-placement="auto" title="Delete this resource"
                                      class="glyphicon glyphicon-trash icon-button btn-remove"></span>
                            </a>
                        {% endif %}

                        {% if page.perms.change %}
                            <input name="resource-mode" type="hidden" value="edit"/>
                            <button id="edit-metadata" type="submit" data-toggle="tooltip" data-placement="auto"
                                    title="Edit this resource"
                                    class="glyphicon glyphicon-pencil icon-button btn-edit"></button>
                        {% endif %}
                    </form>
                {% endif %}
            {% endif %}
        {% else %}
            <a href="{{ cm.get_absolute_url }}">
                    <span data-toggle="tooltip" data-placement="auto" title="View resource"
                          class="glyphicon glyphicon-circle-arrow-left icon-button btn-edit"></span>
            </a>
        {% endif %}

        {% if show_manage_access %}
        <a data-toggle="modal" data-target="#manage-access">
            <span data-toggle="tooltip" data-placement="auto" title="Manage who has access. Use this button to share your resource with specific HydroShare users. You can give other users the ability to view or edit this resource. You can also add additional owners who will have full permissions."
                  class="glyphicon glyphicon-lock icon-button btn-edit"></span>
        </a>
        {% endif %}
    </div>
</div>
{'fraction_non_alphanumeric': 0.12249187846359641, 'fraction_numerical': 0.0007643798968087139, 'mean_word_length': 1.4056538726729488, 'pattern_counts': {'":': 0, '<': 89, '<?xml version=': 0, '>': 89, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7149012', 'n_tokens_mistral': 2697, 'n_tokens_neox': 2423, 'n_words': 546}