<commit_before>{% extends "pages/page.html" %}

{% load hydroshare_tags %}

{% block main %}

    <div class="collaborate-header">
        <div class="container">
            <div class="col-sm-12">
                <div class="collaborate-nav">
                    <a href="{% url "Collaborate" %}" class="collaborate-nav-item">Find Groups</a>
                    <a href="{% url "MyGroups" %}" class="collaborate-nav-item active">My Groups</a>
                </div>
            </div>
        </div>
    </div>

    <div class="container">
        <div class="col-sm-3">
            <h3>My Groups</h3>
            <a class="btn btn-success" data-toggle="modal" data-target="#create-group-dialog"><i class="fa fa-plus"></i> Create Group</a>

            <br>
            <br>

            <div>
                <h4><span class="glyphicon glyphicon-send"></span>&nbsp;Pending Requests</h4>
                <hr class="solid">
                {% if not my_pending_requests and not group_membership_requests %}
                    <i>No pending requests.</i>
                {% endif %}
                {% if my_pending_requests %}
                    {% for request in my_pending_requests %}
                        <div class="request-block">
                            {% if request.invitation_to %}
                                <span>You invited </span><a>{{ request.invitation_to|contact|safe }}</a>
                                <span> to join </span><strong>{{ request.group_to_join.name }}</strong>
                            {% else %}
                                <span>You asked to join <strong>{{ request.group_to_join.name }}</strong>
                            {% endif %}
                            <div class="text-muted">{{ request.date_requested }}</div>
                            <br>
                            <table>
                                <tr>
                                    <form id="act-on-request"
                                          action="/hsapi/_internal/act-on-group-membership-request/{{ request.id }}/reject/"
                                          method="POST">
                                        {% csrf_token %}
                                        <button type="submit" class="btn btn-default">Cancel Request</button>
                                    </form>
                                </tr>
                            </table>
                        </div>
                    {% endfor %}
                {% endif %}

                {% if group_membership_requests %}
                    {% for request in group_membership_requests %}

                        <div class="request-block">
                            <form></form>
                            <div class="activity-block height-fix">
                                {% if request.request_from.userprofile.picture and request.request_from.userprofile.picture.url %}
                                    <div style="background-image: url('{{ request.request_from.userprofile.picture.url }}');"
                                         class="profile-pic-thumbnail round-image pull-left">
                                    </div>
                                {% else %}
                                    <div class="profile-pic-thumbnail round-image user-icon"></div>
                                {% endif %}

                                <div class="metadata-wrapper">
                                    <div class="shared-resource-info">
                                        <a>{{ request.request_from|contact|safe }}</a>

                                        <span class="text-muted"> invites you to join </span>
                                        <strong>{{ request.group_to_join.name }}</strong>
                                    </div>
                                </div>

                                <form class="act-on-request height-fix"
                                      action="/hsapi/_internal/act-on-group-membership-request/{{ request.id }}/accept/"
                                      method="POST">
                                    {% csrf_token %}
                                    <button type="submit" class="btn btn-success btn-act-on-request" data-user-action="Accept">Accept</button>
                                </form>

                                <form class="act-on-request height-fix"
                                      action="/hsapi/_internal/act-on-group-membership-request/{{ request.id }}/reject/"
                                      method="POST">
                                    {% csrf_token %}
                                    <button type="submit" class="btn btn-default btn-act-on-request">
                                        Decline
                                    </button>
                                </form>
                            </div><commit_msg>Minor style changes<commit_after>{% extends "pages/page.html" %}

{% load hydroshare_tags %}

{% block main %}

    <div class="collaborate-header">
        <div class="container">
            <div class="col-sm-12">
                <div class="collaborate-nav">
                    <a href="{% url "Collaborate" %}" class="collaborate-nav-item">Find Groups</a>
                    <a href="{% url "MyGroups" %}" class="collaborate-nav-item active">My Groups</a>
                </div>
            </div>
        </div>
    </div>

    <div class="container">
        <div class="col-sm-3">
            <h3>My Groups</h3>
            <a class="btn btn-success" data-toggle="modal" data-target="#create-group-dialog"><i class="fa fa-plus"></i> Create Group</a>

            <br>
            <br>

            <div>
                <h4><span class="glyphicon glyphicon-send"></span>&nbsp;Pending Requests</h4>
                <hr class="solid">
                {% if not my_pending_requests and not group_membership_requests %}
                    <i>No pending requests.</i>
                {% endif %}
                {% if my_pending_requests %}
                    {% for request in my_pending_requests %}
                        <div class="request-block">
                            {% if request.invitation_to %}
                                <span>You invited </span><a>{{ request.invitation_to|contact|safe }}</a>
                                <span> to join </span><strong>{{ request.group_to_join.name }}</strong>
                            {% else %}
                                <span>You asked to join <strong>{{ request.group_to_join.name }}</strong>
                            {% endif %}
                            <div class="text-muted">{{ request.date_requested }}</div>
                            <br>
                            <table>
                                <tr>
                                    <form id="act-on-request"
                                          action="/hsapi/_internal/act-on-group-membership-request/{{ request.id }}/reject/"
                                          method="POST">
                                        {% csrf_token %}
                                        <button type="submit" class="btn btn-warning">Cancel Request</button>
                                    </form>
                                </tr>
                            </table>
                        </div>
                    {% endfor %}
                {% endif %}

                {% if group_membership_requests %}
                    {% for request in group_membership_requests %}

                        <div class="request-block">
                            <form></form>
                            <div class="activity-block height-fix">
                                {% if request.request_from.userprofile.picture and request.request_from.userprofile.picture.url %}
                                    <div style="background-image: url('{{ request.request_from.userprofile.picture.url }}');"
                                         class="profile-pic-thumbnail round-image pull-left">
                                    </div>
                                {% else %}
                                    <div class="profile-pic-thumbnail round-image user-icon"></div>
                                {% endif %}

                                <div class="metadata-wrapper">
                                    <div class="shared-resource-info">
                                        <a>{{ request.request_from|contact|safe }}</a>

                                        <span class="text-muted"> invites you to join </span>
                                        <strong>{{ request.group_to_join.name }}</strong>
                                        <div class="text-muted">{{ request.date_requested }}</div>
                                    </div>
                                </div>

                                <form class="act-on-request height-fix"
                                      action="/hsapi/_internal/act-on-group-membership-request/{{ request.id }}/accept/"
                                      method="POST">
                                    {% csrf_token %}
                                    <button type="submit" class="btn btn-success btn-act-on-request" data-user-action="Accept">Accept</button>
                                </form>

                                <form class="act-on-request height-fix"
                                      action="/hsapi/_internal/act-on-group-membership-request/{{ request.id }}/reject/"
                                      method="POST">
                                    {% csrf_token %}
                                    <button type="submit" class="btn btn-default btn-act-on-request">
                                        Decline
                                    </button>
                                </form>
                            </div>
{'fraction_non_alphanumeric': 0.11888743849784116, 'fraction_numerical': 0.0014057636308866352, 'mean_word_length': 0.9453125, 'pattern_counts': {'":': 0, '<': 167, '<?xml version=': 0, '>': 167, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 72, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5309931', 'n_tokens_mistral': 2376, 'n_tokens_neox': 2153, 'n_words': 409}