{% extends 'develop/template.html' %}
{% block subcontent %}
    <form action="/develop/create/9" method="post">
        <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
        {% if GroupIdContext != None %}<input type="hidden" name="groupIdContext" value="{{GroupIdContext}}">{%endif%}
        <button type="submit" class="btn btn-success btn-sm w-100">Create Game</button>
    </form>
    <div class="mt-2">
        {% for place in UserPlaces: %}
            <div class="w-100 m-1 p-1 d-flex">
                <img src="/Thumbs/PlaceIcon.ashx?assetId={{place.id}}&x=100&y=100" class="rounded" height="100px" width="100px">
                <div class="ms-2">
                    <a class="text-body text-decoration-none" href="/games/{{place.id}}/"><h5 class="mb-1">{{place.name}}</h5></a>
                    <p class="text-secondary m-0" style="font-size:13px;">Visits: <span class="text-body">{{place.place.visitcount}}</span></p>
                </div>
                <div class="ms-auto mt-auto mb-auto">
                    <a class="btn btn-outline-primary btn-sm" href="/develop/universes/{{GetPlaceUniverse(place).id}}/manage">Manage</a>
                </div>
            </div>
        {%endfor%}
        {% if len(UserPlaces) == 0 %}
        <p class="mt-5 mb-5 text-secondary w-100 text-center">No games found</p>
        {%endif%}
    </div>
{% endblock %}