<commit_before>{% extends "machiavelli/base.html" %}

{% load i18n %}
{% load machiavelli_tags %}
{% load condottieri_profiles_tags %}

{% block head_title %}
{% blocktrans %}Pending games{% endblocktrans %}
{% endblock %}

{% block left_column %}
{% if joinable %}
<h1>{% trans "Games you can join" %}</h1>
	<p>
	{% if game_list %}
		{% blocktrans %}The following games have not yet started, and you can join any of them.{% endblocktrans %}
	{% else %}
		{% blocktrans %}At this moment, there is no available games that you can join. Maybe you want to create a new game.{% endblocktrans %}
		<p><a href="{% url new-game %}">{% trans "New game" %}</a></p>
	{% endif %}
	</p>
{% else %}
<h1>{% trans "Your not started games" %}</h1>
	<p>
	{% if game_list %}
		{% blocktrans %}You are subscribed to the following games, but they still have not enough players to begin.{% endblocktrans %}
	{% else %}
		{% blocktrans %}All the games that you are subscribed to have already started.{% endblocktrans %}
	{% endif %}
	</p>
{% endif %}

{% if game_list %}

{% for game in game_list %}
<div class="game_info {% if game.fast %}fast{% endif %}">
<h2><span><a href="{{ game.get_absolute_url }}">{{ game.title }}</a></span>
	<span>
		({% trans "Slots" %}: {{ game.slots }})
	</span>
	{% if game.private %}
	<span class="feature private" title="{% trans "Private" %}">{% trans "Private" %}</span>
	{% endif %}
	{% if game.is_team_game %}
	<span class="feature team" title="{% trans "Team game" %}">{% trans "Team game" %}</span>
	{% endif %}
	{% if game.fast %}
	<span class="feature fast" title="{% trans "Fast game" %}">{% trans "Fast game" %}</span>
	{% endif %}
	</h2>
<div class="map">
<img src="{{ game.thumbnail_url }}" />
</div>
<dl>
<dt>{% trans "Average score" %}</dt><dd>{{ game.get_average_score|score_stars }}</dd>
<dt>{% trans "Average karma" %}</dt><dd>{{ game.get_average_karma|karma_stars }}</dd>
<dt>{% trans "Scenario" %}</dt><dd><a href="{% url scenario_detail game.scenario.name %}">{{ game.scenario.title }}</a></dd>
<dt>{% trans "Cities to win" %}</dt><dd>{{ game.cities_to_win }}</dd>
<dt>{% trans "Time limit" %}</dt><dd>{{ game.get_time_limit_display }}</dd>
<dt>{% trans "Creator" %}</dt><dd>{{ game.created_by.username }}</dd>
<dt>{% trans "Visible players?" %}</dt>
<dd>{{ game.visible|yesno }}</dd>
<dt>{% trans "Players" %}</dt>
<dd>
	<ul>
	{% for p in game.player_set.all %}
		{% if p.user %}
		<li><a href="{% url profile_detail username=p.user.username %}">{{ p.user.username }}</a></li>
		{% endif %}
	{% endfor %}
	</ul>
</dd><commit_msg>Show number of teams in pending games list<commit_after>{% extends "machiavelli/base.html" %}

{% load i18n %}
{% load machiavelli_tags %}
{% load condottieri_profiles_tags %}

{% block head_title %}
{% blocktrans %}Pending games{% endblocktrans %}
{% endblock %}

{% block left_column %}
{% if joinable %}
<h1>{% trans "Games you can join" %}</h1>
	<p>
	{% if game_list %}
		{% blocktrans %}The following games have not yet started, and you can join any of them.{% endblocktrans %}
	{% else %}
		{% blocktrans %}At this moment, there is no available games that you can join. Maybe you want to create a new game.{% endblocktrans %}
		<p><a href="{% url new-game %}">{% trans "New game" %}</a></p>
	{% endif %}
	</p>
{% else %}
<h1>{% trans "Your not started games" %}</h1>
	<p>
	{% if game_list %}
		{% blocktrans %}You are subscribed to the following games, but they still have not enough players to begin.{% endblocktrans %}
	{% else %}
		{% blocktrans %}All the games that you are subscribed to have already started.{% endblocktrans %}
	{% endif %}
	</p>
{% endif %}

{% if game_list %}

{% for game in game_list %}
<div class="game_info {% if game.fast %}fast{% endif %}">
<h2><span><a href="{{ game.get_absolute_url }}">{{ game.title }}</a></span>
	<span>
		({% trans "Slots" %}: {{ game.slots }})
	</span>
	{% if game.private %}
	<span class="feature private" title="{% trans "Private" %}">{% trans "Private" %}</span>
	{% endif %}
	{% if game.is_team_game %}
	<span class="feature team" title="{% trans "Team game" %}">{% trans "Team game" %}</span>
	{% endif %}
	{% if game.fast %}
	<span class="feature fast" title="{% trans "Fast game" %}">{% trans "Fast game" %}</span>
	{% endif %}
	</h2>
<div class="map">
<img src="{{ game.thumbnail_url }}" />
</div>
<dl>
<dt>{% trans "Average score" %}</dt><dd>{{ game.get_average_score|score_stars }}</dd>
<dt>{% trans "Average karma" %}</dt><dd>{{ game.get_average_karma|karma_stars }}</dd>
<dt>{% trans "Scenario" %}</dt><dd><a href="{% url scenario_detail game.scenario.name %}">{{ game.scenario.title }}</a></dd>
<dt>{% trans "Cities to win" %}</dt><dd>{{ game.cities_to_win }}</dd>
<dt>{% trans "Time limit" %}</dt><dd>{{ game.get_time_limit_display }}</dd>
<dt>{% trans "Creator" %}</dt><dd>{{ game.created_by.username }}</dd>
<dt>{% trans "Visible players?" %}</dt>
<dd>{{ game.visible|yesno }}</dd>
{% if game.is_team_game %}
<dt>{% trans "Teams" %}</dt>
<dd>{{ game.teams }}</dd>
{% endif %}
<dt>{% trans "Players" %}</dt>
<dd>
	<ul>
	{% for p in game.player_set.all %}
		{% if p.user %}
		<li><a href="{% url profile_detail username=p.user.username %}">{{ p.user.username }}</a></li>
		{% endif %}
	{% endfor %}
	</ul>
</dd>
{'fraction_non_alphanumeric': 0.23222116301239276, 'fraction_numerical': 0.003050524308865586, 'mean_word_length': 4.453222453222454, 'pattern_counts': {'":': 0, '<': 149, '<?xml version=': 0, '>': 149, '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': '7239850', 'n_tokens_mistral': 2130, 'n_tokens_neox': 1875, 'n_words': 558}