<commit_before>{% extends "base.html" %}
{% load i18n %}

{% block title %}
    {% trans "Horas - Todos ayudando a todos" %}
{% endblock title %}

{% block content %}
    <div class="container">
        <div class="row">
            {% include "profiles/profile_sidebar.html" %}

            <div class="col-sm-9 profile-content-wrapper">
                {% if object.meetings.available %}
                    <section class="profile-content-section">
                        <h3 class="text-section-header">{% trans "Hora disponible" %}</h3>
                        {% for meeting in object.meetings.available %}
                            <div class="row profile-meeting-row">
                                <div class="col-xs-4 col-md-2">
                                    <a href="{% url 'meeting_detail' profile_user meeting.id %}" class="btn btn-lg btn-success">{% trans "Reservar" %}</a>
                                </div>
                                <div class="col-xs-5">
                                    <strong>{{ meeting.datetime|date:"DATE_FORMAT" }}</strong><br>
                                    {{ meeting.get_time_range_string }}
                                </div>
                                <div class="col-xs-3">
                                    <strong>{% trans "Formatos" %}</strong><br>
                                    {{ object.user.get_meeting_formats_string }}
                                </div>
                            </div> <!-- /.row profile-meeting-row -->
                        {% endfor %}
                    </section> <!-- /.row profile-content-section -->
                {% endif %}

                {% if object.meetings.next %}
                    <section class="profile-content-section">
                        <h3 class="text-section-header">{% trans "Próximas reuniones" %}</h3>
                        {% for meeting in object.meetings.next %}
                            <div class="row profile-meeting-row">
                                {% include "profiles/meeting_row_gravatars.html" %}
                                {% include "profiles/meeting_row_dates.html" %}
                                <div class="col-sm-3">
                                    {% if meeting.state == 'reserved' %}
                                        <a href="#" class="btn btn-default btn-grey">{% trans "Confirmar" %}</a>
                                    {% elif meeting.state == 'confirmed' %}
                                        <span class="glyphicon glyphicon-ok-circle icon-success"></span> {% trans "Confirmada" %}
                                    {% endif %}
                                </div>
                            </div> <!-- /.row profile-meeting-row -->
                        {% endfor %}
                    </section> <!-- /.row profile-content-section -->
                {% endif %}

                {% if object.meetings.past %}
                    <section class="profile-content-section">
                        <h3 class="text-section-header">{% trans "Historia" %}</h3>
                        {% for meeting in object.meetings.past %}
                            <div class="row profile-meeting-row">
                                {% include "profiles/meeting_row_gravatars.html" %}
                                {% include "profiles/meeting_row_dates.html" %}
                                <div class="col-sm-3">
                                    {% if meeting.state == 'cancelled' %}
                                        <span class="glyphicon glyphicon-remove-circle icon-cancelled"></span> {% trans "Cancelada por" %} {{ meeting.cancelled_by.get_tiny_name }}
                                    {% elif meeting.state == 'didnt_happened' %}
                                        <span class="glyphicon glyphicon-remove-circle icon-cancelled"></span> {% trans "No fue celebrada" %}
                                    {% elif meeting.state == 'completed' %}
                                        <span class="glyphicon glyphicon-ok-circle icon-success"></span> {% trans "Celebrada" %}
                                    {% endif %}
                                </div>
                            </div> <!-- /.row profile-meeting-row --><commit_msg>Adds display logic for cancel and confirm buttons<commit_after>{% extends "base.html" %}
{% load i18n %}

{% block title %}
    {% trans "Horas - Todos ayudando a todos" %}
{% endblock title %}

{% block content %}
    <div class="container">
        <div class="row">
            {% include "profiles/profile_sidebar.html" %}

            <div class="col-sm-9 profile-content-wrapper">
                {% if object.meetings.available %}
                    <section class="profile-content-section">
                        <h3 class="text-section-header">{% trans "Hora disponible" %}</h3>
                        {% for meeting in object.meetings.available %}
                            <div class="row profile-meeting-row">
                                <div class="col-xs-4 col-md-2">
                                    <a href="{% url 'meeting_detail' profile_user meeting.id %}" class="btn btn-lg btn-success">{% trans "Reservar" %}</a>
                                </div>
                                <div class="col-xs-5">
                                    <strong>{{ meeting.datetime|date:"DATE_FORMAT" }}</strong><br>
                                    {{ meeting.get_time_range_string }}
                                </div>
                                <div class="col-xs-3">
                                    <strong>{% trans "Formatos" %}</strong><br>
                                    {{ profile_user.get_meeting_formats_string }}
                                </div>
                            </div> <!-- /.row profile-meeting-row -->
                        {% endfor %}
                    </section> <!-- /.row profile-content-section -->
                {% endif %}

                {% if object.meetings.next %}
                    <section class="profile-content-section">
                        <h3 class="text-section-header">{% trans "Próximas reuniones" %}</h3>
                        {% for meeting in object.meetings.next %}
                            <div class="row profile-meeting-row">
                                {% include "profiles/meeting_row_gravatars.html" %}
                                {% include "profiles/meeting_row_dates.html" %}
                                <div class="col-sm-3">
                                    {% if meeting.state == 'reserved' and user == meeting.mentor %}
                                        <a href="#" class="btn btn-default btn-grey">{% trans "Confirmar" %}</a>
                                    {% endif %}
                                    {% if meeting.state == 'reserved' %}
                                        {% if user == meeting.mentor or user == meeting.protege %}
                                            <a href="#" class="btn btn-default btn-grey">{% trans "Cancelar" %}</a>
                                        {% endif %}
                                    {% endif %}
                                    {% if meeting.state == 'confirmed' %}
                                        <span class="glyphicon glyphicon-ok-circle icon-success"></span> {% trans "Confirmada" %}
                                    {% endif %}
                                </div>
                            </div> <!-- /.row profile-meeting-row -->
                        {% endfor %}
                    </section> <!-- /.row profile-content-section -->
                {% endif %}

                {% if object.meetings.past %}
                    <section class="profile-content-section">
                        <h3 class="text-section-header">{% trans "Historia" %}</h3>
                        {% for meeting in object.meetings.past %}
                            <div class="row profile-meeting-row">
                                {% include "profiles/meeting_row_gravatars.html" %}
                                {% include "profiles/meeting_row_dates.html" %}
                                <div class="col-sm-3">
                                    {% if meeting.state == 'cancelled' %}
                                        <span class="glyphicon glyphicon-remove-circle icon-cancelled"></span> {% trans "Cancelada por" %} {{ meeting.cancelled_by.get_tiny_name }}
                                    {% elif meeting.state == 'didnt_happened' %}
                                        <span class="glyphicon glyphicon-remove-circle icon-cancelled"></span> {% trans "No fue celebrada" %}
                                    {% elif meeting.state == 'completed' %}
                                        <span class="glyphicon glyphicon-ok-circle icon-success"></span> {% trans "Celebrada" %}
                                    {% endif %}
                                </div>
                            </div> <!-- /.row profile-meeting-row -->
{'fraction_non_alphanumeric': 0.1310519366197183, 'fraction_numerical': 0.003301056338028169, 'mean_word_length': 1.0365225184853237, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 111, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 58, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '522831', 'n_tokens_mistral': 2339, 'n_tokens_neox': 2035, 'n_words': 416}