{% extends "mobile-layout.html" %} {% macro sentence_case(text) %} {{text[0]|upper}}{{text[1:] }} {% endmacro %} {% block header %} {% endblock header %} {% block content %}
{{ project.title }}
{{sentence_case(goal.description) }}
{% if not current_user.is_authenticated %}
{{ goal.star_count }}
{% elif current_user.id == goal.poster.id %}
{{ goal.star_count }}
{% elif not current_user.email_confirmed %}
{{ goal.star_count }}
{% elif goal.gave_star(current_user) %}
{{ goal.star_count }}
{% else %}
{{ goal.star_count }}
{% endif %}
{{ goal.comment_count }}
{{ goal.poster.username }} • {{ goal.elapsed_time() }}
{% if goal.can_delete(current_user) %} {% endif %}
{% if current_user.is_authenticated %} {% else %} {% endif %}
{% if current_user.is_authenticated %} {% else %} {% endif %}
{% for comment in goal.get_comments() %}
{% if not current_user.is_authenticated %}
{{ comment.star_count }}
{% elif current_user.id == comment.poster.id %}
{{ comment.star_count }}
{% elif not current_user.email_confirmed %}
{{ comment.star_count }}
{% elif comment.gave_star(current_user) %}
{{ comment.star_count }}
{% else %}
{{ comment.star_count }}
{% endif %}

{{ comment.poster.username }} • {{ comment.date_posted.strftime('%d %b %H:%M') }}

{% if comment.can_delete(current_user) %} {% endif %}
{% endfor %}
{% if goal.solutions|length == 0 %}
No solutions yet. Feel free to suggest a solution to this goal
{% else %}

{{goal.solutions|length}}

Solutions

{% for icon,count in goal.get_solution_types_counts('light').items() recursive %} {% if count != 0 %}

{{count}}

{% endif %} {% endfor %}
{% for solution in goal.solutions %}
{{solution.title}}
{% if not current_user.is_authenticated %}
{{solution.star_count }}
{% elif current_user.id == solution.poster.id %}
{{solution.star_count }}
{% elif not current_user.email_confirmed %}
{{solution.star_count }}
{% elif solution.gave_star(current_user) %}
{{ solution.star_count }}
{% else %}
{{ solution.star_count }}
{% endif %}
{{solution.description}}
{% if solution.attachment_type == SolutionType.Code %}



{% elif solution.attachment_type == SolutionType.Photo %}
{% for image in solution.images %} {% endfor %}
{% elif solution.attachment_type == SolutionType.PDF %} {% elif solution.link!=None %}
{% endif %}
{% if current_user.is_authenticated %} {% else %} {% endif %}
{% for comment in solution.get_comments() %}

{{ comment.poster.username }} • {{ comment.date_posted.strftime('%d %b %H:%M') }}

{% if comment.can_delete(current_user) %} {% endif %}
{% if current_user.id == comment.poster.id or not current_user.is_authenticated %}
{{ comment.star_count }}
{% else %}
{{ comment.star_count }}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% endblock content%}