<commit_before>{% extends 'site_base.html' %}

{% load i18n %}
{% load bootstrap %}
{% load thumbnail %}

{% block head_title %}{{project}}{% endblock %}

{% block body %}
    <div class="row">
        <div class="col-md-12">
<h1>{{project}}
{% if project.private_flag %}
<i class="fa fa-lock"></i>
{% endif %}

{% if not project.active_flag %}
   <span class="label label-primary">Closed</span>
{% endif %}

</h1>

<ul class="nav nav-tabs">
  <li role="presentation" {% if show_page == 'title' %} class="active" {% endif %}><a href="{{project.get_absolute_url}}">{% trans "Project" %}</a></li>
  <li role="presentation" {% if show_page == 'files' %} class="active" {% endif %}><a href="{{project.get_absolute_url}}files/">{% trans "Files" %}</a></li>
  <li role="presentation" {% if show_page == 'milestones' %} class="active" {% endif %}><a href="{{project.get_absolute_url}}milestones/">{% trans "Milestones" %}</a></li>
</ul>

{% if show_page == 'title' %}

<p>Project description</p>

{% if project.description %}
{{ project.description_html|safe }}
{% endif %}

{% if user_can_admin %}
<a class="btn btn-default" href="{{project.get_absolute_url}}project_edit"><i class="fa fa-pencil-square-o"></i> {% trans "Edit projects" %}</a>
{% endif %}

{% if project.created_at == project.modified_at %}
no history to view

{% else %}
<a href="{{project.get_absolute_url}}history">History</a>
{% endif %}

<h2>{% trans "Tasks" %} {% if user_can_admin or user_can_work %}<a class="btn btn-default" href="/project/task_add/{{project.id}}/"><i class="fa fa-plus"></i> {% trans "Create task" %}</a>{% endif %}</h2>

<ul class="nav nav-tabs">
  <li role="presentation" {% if filter_type == '' %} class="active" {% endif %}><a href="{{project.get_absolute_url}}">{% trans "Open" %}</a></li>
  <li role="presentation" {% if filter_type == 'filter_task_closed' %} class="active" {% endif %}><a href="{{project.get_absolute_url}}closed_task/">{% trans "Closed" %}</a></li>
  <li role="presentation" {% if filter_type == 'filter_task_search' %} class="active" {% endif %}><a href="{{project.get_absolute_url}}search_task/">{% trans "Search" %}</a></li>
</ul>

{% if filter_type == 'filter_task_search' %}
    <div class="row">
        <div class="col-md-5">
        
    <form action="" method="get">
        {{ filter.form|bootstrap }}
        <input type="submit" class="btn btn-info" />
    </form>
</div>
</div>
{% endif %}

{% include "project/task_list.html" with table_mode='project' %}

<h2>{% trans "Members" %} {% if user_can_admin %}<a class="btn btn-default" href="/project/member_add/{{project.id}}/"><i class="fa fa-plus"></i> {% trans "Add member" %}</a>{% endif %}</h2>

<ul>
{% for m in members %}
<li>{{m.member_profile.user}}

{% if m.admin_flag %}
{% trans "(admin)" %}
{% endif %}

{% if not m.team_accept %}
{% trans "(team not accept)" %}
{% endif %}

{% if not m.member_accept %}
{% trans "(member not accept)" %}

{% if request.user.is_authenticated and request.user == m.member_profile.user %}
<a class="btn btn-primary" href="/project/member/{{m.pk}}/member_accept/"><i class="fa fa-chevron-down"></i> {% trans "Accept membership" %}</a>
{% endif %}
{% endif %}

</li>
{% endfor %}
</ul>

{% comment %} end if TITLE {% endcomment %}
{% endif %}

{% if show_page == 'files' %}
<h2>Files</h2>

{% if project.repo_name %}
{{repo_info}}
<br>
<br>
<table border=1>
{%for k,v in repo_info.items %}
<tr>
<td>{{k}}</td>
<td>{{v}}</td>
</tr>
{%endfor%}
</table>

{{repo_list}}
<ul>
{% for rl in repo_list %}
<li>{{rl}}</li>
{% endfor %}
</ul>

{% else %}
<p class="bg-warning">File repo is not created for this project.</p>

{% if user_can_admin %}
<a class="btn btn-default" href="{{project.get_absolute_url}}create_repo"><i class="fa fa-file-o"></i> {% trans "Create repo" %}</a>
{%else%}
<p>Project admin can create the repo.</p>
{% endif %}
{% endif %}


{% comment %} end if FILES {% endcomment %}
{% endif %}

{% if show_page == 'milestones' %}
<h2>{% trans "Milestones" %}{% if user_can_admin %} <a class="btn btn-default" href="/project/milestone_add/{{project.id}}/"><i class="fa fa-plus"></i> {% trans "Create milestone" %}</a>{% endif %}</h2>

<table class="table table-striped">
<thead>
<tr>
<th>{% trans "Milestone" %}</th>
<th>{% trans "Plan date" %}</th>
<th>{% trans "Fact finish date" %}</th>
</tr>
</thead>
<tbody>

{% for m in milestones %}
<tr>
<td><a href="{{m.get_absolute_url }}">{{m}}</a></td>
<td>{% if m.planned_at %}{{m.planned_at|date}} {% endif %}</td>
<td>{% if m.finished_at %}{{m.finished_at|date}} {% endif %}</td>

</tr>
{% endfor %}


</tbody>
</table>
{% comment %} end if MILESTONES {% endcomment %}
{% endif %}

</div>
</div>

<small>This page was last modified on {{ project.modified_at }}</small>
    
{% endblock %}<commit_msg>#26 repo info shrinked to basic info on File repo page<commit_after>{% extends 'site_base.html' %}

{% load i18n %}
{% load bootstrap %}
{% load thumbnail %}

{% block head_title %}{{project}}{% endblock %}

{% block body %}
    <div class="row">
        <div class="col-md-12">
<h1>{{project}}
{% if project.private_flag %}
<i class="fa fa-lock"></i>
{% endif %}

{% if not project.active_flag %}
   <span class="label label-primary">Closed</span>
{% endif %}

</h1>

<ul class="nav nav-tabs">
  <li role="presentation" {% if show_page == 'title' %} class="active" {% endif %}><a href="{{project.get_absolute_url}}">{% trans "Project" %}</a></li>
  <li role="presentation" {% if show_page == 'files' %} class="active" {% endif %}><a href="{{project.get_absolute_url}}files/">{% trans "Files" %}</a></li>
  <li role="presentation" {% if show_page == 'milestones' %} class="active" {% endif %}><a href="{{project.get_absolute_url}}milestones/">{% trans "Milestones" %}</a></li>
</ul>

{% if show_page == 'title' %}

<p>Project description</p>

{% if project.description %}
{{ project.description_html|safe }}
{% endif %}

{% if user_can_admin %}
<a class="btn btn-default" href="{{project.get_absolute_url}}project_edit"><i class="fa fa-pencil-square-o"></i> {% trans "Edit projects" %}</a>
{% endif %}

{% if project.created_at == project.modified_at %}
no history to view

{% else %}
<a href="{{project.get_absolute_url}}history">History</a>
{% endif %}

<h2>{% trans "Tasks" %} {% if user_can_admin or user_can_work %}<a class="btn btn-default" href="/project/task_add/{{project.id}}/"><i class="fa fa-plus"></i> {% trans "Create task" %}</a>{% endif %}</h2>

<ul class="nav nav-tabs">
  <li role="presentation" {% if filter_type == '' %} class="active" {% endif %}><a href="{{project.get_absolute_url}}">{% trans "Open" %}</a></li>
  <li role="presentation" {% if filter_type == 'filter_task_closed' %} class="active" {% endif %}><a href="{{project.get_absolute_url}}closed_task/">{% trans "Closed" %}</a></li>
  <li role="presentation" {% if filter_type == 'filter_task_search' %} class="active" {% endif %}><a href="{{project.get_absolute_url}}search_task/">{% trans "Search" %}</a></li>
</ul>

{% if filter_type == 'filter_task_search' %}
    <div class="row">
        <div class="col-md-5">
        
    <form action="" method="get">
        {{ filter.form|bootstrap }}
        <input type="submit" class="btn btn-info" />
    </form>
</div>
</div>
{% endif %}

{% include "project/task_list.html" with table_mode='project' %}

<h2>{% trans "Members" %} {% if user_can_admin %}<a class="btn btn-default" href="/project/member_add/{{project.id}}/"><i class="fa fa-plus"></i> {% trans "Add member" %}</a>{% endif %}</h2>

<ul>
{% for m in members %}
<li>{{m.member_profile.user}}

{% if m.admin_flag %}
{% trans "(admin)" %}
{% endif %}

{% if not m.team_accept %}
{% trans "(team not accept)" %}
{% endif %}

{% if not m.member_accept %}
{% trans "(member not accept)" %}

{% if request.user.is_authenticated and request.user == m.member_profile.user %}
<a class="btn btn-primary" href="/project/member/{{m.pk}}/member_accept/"><i class="fa fa-chevron-down"></i> {% trans "Accept membership" %}</a>
{% endif %}
{% endif %}

</li>
{% endfor %}
</ul>

{% comment %} end if TITLE {% endcomment %}
{% endif %}

{% if show_page == 'files' %}
<h2>Files</h2>

{% if project.repo_name %}

<p>Repo url: <code>{{repo_info.url}}</code></p>
<p>Last commit # {{repo_info.commit_revision}} from <strong>{{repo_info.commit_author}}</strong> at {{repo_info.commit_date}}</p>

<p>File list:</p>
<ul>
{% for rl in repo_list %}
<li>{{rl}}</li>
{% endfor %}
</ul>

{% else %}
<p class="bg-warning">File repo is not created for this project.</p>

{% if user_can_admin %}
<a class="btn btn-default" href="{{project.get_absolute_url}}create_repo"><i class="fa fa-file-o"></i> {% trans "Create repo" %}</a>
{%else%}
<p>Project admin can create the repo.</p>
{% endif %}
{% endif %}


{% comment %} end if FILES {% endcomment %}
{% endif %}

{% if show_page == 'milestones' %}
<h2>{% trans "Milestones" %}{% if user_can_admin %} <a class="btn btn-default" href="/project/milestone_add/{{project.id}}/"><i class="fa fa-plus"></i> {% trans "Create milestone" %}</a>{% endif %}</h2>

<table class="table table-striped">
<thead>
<tr>
<th>{% trans "Milestone" %}</th>
<th>{% trans "Plan date" %}</th>
<th>{% trans "Fact finish date" %}</th>
</tr>
</thead>
<tbody>

{% for m in milestones %}
<tr>
<td><a href="{{m.get_absolute_url }}">{{m}}</a></td>
<td>{% if m.planned_at %}{{m.planned_at|date}} {% endif %}</td>
<td>{% if m.finished_at %}{{m.finished_at|date}} {% endif %}</td>

</tr>
{% endfor %}


</tbody>
</table>
{% comment %} end if MILESTONES {% endcomment %}
{% endif %}

</div>
</div>

{% endblock %}
{'fraction_non_alphanumeric': 0.24667852285803954, 'fraction_numerical': 0.0034522439585730723, 'mean_word_length': 4.710872162485066, 'pattern_counts': {'":': 0, '<': 259, '<?xml version=': 0, '>': 259, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1995519', 'n_tokens_mistral': 3830, 'n_tokens_neox': 3374, 'n_words': 814}