eviltnan/freeturn

View on GitHub
crm/templates/cv/front_page.html

Summary

Maintainability
Test Coverage
{% load wagtailcore_tags %}
{% load wagtailimages_tags %}

<table {% if instance.include_portfolio %}style="page-break-after: always;" {% endif %}>
    <tbody>
    <tr>
        {% with relevant_skills=instance.relevant_skills.all %}
        <td valign="top" style="padding-right: 20px">
            <h1> {{ instance.full_name }}</h1>
            <h2>{{ instance.title }}</h2>

            {% if instance.project %}
            Application for: {{ instance.project}}, strictly confidential
            {% endif %}

            {{ instance.experience_overview | richtext }}
            <hr>

            <h1>{{ instance.project_listing_title }}</h1>

            {% for project in relevant_project_pages %}
            {% if forloop.first and not project.highlighted  %} <br> {% endif %}
            {% if project.highlighted  %} <h3> {% else %} <h4> {% endif %}
                <a href="{{ project.get_site.root_url }}{% pageurl project %}" target="_blank"
                style="color: darkgreen">
                    <i class="fa  fa-{% if project.highlighted  %}star{%else%}chevron-right{%endif%}"></i>
                    {{project.title }}
                    <i class="fa fa-link"></i>
                </a>
            {% if project.highlighted  %} </h3> {% else %} </h4> {% endif %}
            {% if project.duration %}
                <h4 class="my-3">{{ project.start_date | date:"M Y" }}, {{ project.duration }}
                    month{{project.duration|pluralize}}</h4>
            {% else %}
                <h4 class="my-3">Since {{ project.start_date | date:"M Y" }}</h4>
            {% endif %}

            <p>
                <strong>{{project.position }}</strong>,
                {{project.summary | safe}}
            </p>
            <p>
                {% if relevant_skills %} <i class="fa fa-cog"></i> {% endif %}
                {% for technology in project.technologies.all %}
                {% if technology in relevant_skills %}
                <span class="label label-default">{{ technology }}</span>
                {% endif %}
                {% endfor %}
            </p>
            <hr>
            {% endfor %}
            <h2><i class="fa fa-graduation-cap"></i> Education</h2>
            {{ instance.education_overview | richtext }}
        </td>

        <td width="30%" style="font-size: 4mm" valign="top">
            {% image instance.picture fill-235x235-c80 class="img-fluid"%}
            {% if instance.rate_overview %}
            <h3><i class="fa fa-credit-card"></i> Pay rate</h3>
            {{ instance.rate_overview | richtext }}
            {% endif %}

            <h3><i class="fa fa-calendar"></i> Availability </h3>
            {{ instance.earliest_available | date:"F Y" }}

            <h3><i class="fa fa-user"></i> Contact</h3>
            {{ instance.contact_details | richtext }}

            <h3><i class="fa fa-globe"></i> Languages</h3>
            {{ instance.languages_overview | richtext }}

            {% if instance.working_permit %}
            <h3><i class="fa fa-balance-scale"></i> Working permit</h3>
            {{ instance.working_permit | richtext }}
            {% endif %}

            <h3><i class="fa fa-cogs"></i> Skills</h3>

            <div style="font-size: 3.5mm">
            {% for skill in skills %}
            <a href="{{root_url}}{% pageurl portfolio %}?technology={{skill}}" style="color: darkgreen">
                {% if skill in relevant_skills %}
                <span class="label label-default">{{ skill }}</span>
                {% else %}
                {{ skill }}
                {% endif %}
                {% endfor %}
            </a>
            </div>
        </td>
        {% endwith %}
    </tr>
    </tbody>
</table>