{% load staticfiles %}
<style type="text/css">
.gray {
filter:alpha(Opacity=80);-moz-opacity:0.1;opacity: 0.2;
}

</style>
<div class="text-center">
    <div class="user_part_image" >
        {% if user_part.part.image %}
            <img src="{{ user_part.part.image.url }}"
                 alt="{{ user_part.part|default:'' }}"
                    {% if user_part.is_open or  user_part.is_pass %}{% else %} class="gray" {% endif %}/>
        {% else %}
            <img src="{% static 'bee_django_course_simple/img/part_image.jpg' %}"
                 alt="{{ user_part.part|default:'' }}"
                 {% if user_part.is_open or  user_part.is_pass %}{% else %} class="gray" {% endif %}/>
        {% endif %}
    </div>

    <div class="user_part_title">
        {{ user_part.part.title }}
        {% if user_part.is_pass %}
            {{ user_part.part.extra_title | default:'' }}
        {% endif %}
    </div>
</div>