<div class="col-md-12 p1cm-post">
    <div class="row">
        <div class="col-md-12">
            <h4 class="p1cm-heading"><a href="{{ post.permalink|raw }}">{{ post.title }}</a></h4>
            <a href="{{ post.editLink|raw }}" class="p1cm-editBtn" type="button">- Edit</a>
            <i class="lastEdited">Last edited on {{ post.lastEditedAt }}</i>
        </div>
    </div>
    <table class="table">
        <thead>
        <tr>
            <th>Google Keywords</th>
            <th>Progress</th>
            <th>{{ post.trackedAt }}</th>
            <th>{{ post.lastTrackedAt }}</th>
        </tr>
        </thead>
        <tbody>
        {% if post.meta.primary_keyword %}
            <tr class="{{ post.primaryRowClass }}">
                <td>{{ post.meta.primary_keyword }}<i class="glyphicon glyphicon-star"></i></td>
                <td class="p1cm-variation{% if post.primaryVariation %} p1cm-{{ post.primaryVariation }}{% endif %}">
                    {{ post.primaryProgress }}
                    {% if post.primaryGlyphicon %}
                    <i class="glyphicon glyphicon-{{ post.primaryGlyphicon }}"></i>
                    {% endif %}
                </td>
                <td>{{ post.primaryRank }}</td>
                <td>{{ post.primaryLastRank }}</td>
            </tr>
        {% endif %}
        {% if post.secondaryKeywordsAvailable %}
            <tr id="p1cm-showKey">
                <td colspan="4">
                    <a><i class="glyphicon glyphicon-plus"></i> Show secondary keywords</a>
                </td>
            </tr>
            {% if post.meta.secondary_keyword1 %}
            <tr class="p1cm-secondary {{ post.secondaryRowClass1 }}">
                <td>{{ post.meta.secondary_keyword1 }}</td>
                <td class="p1cm-variation{% if post.secondaryVariation1 %} p1cm-{{ post.secondaryVariation1 }}{% endif %}">
                    {{ post.secondaryProgress1 }}
                    {% if post.secondaryGlyphicon1 %}
                    <i class="glyphicon glyphicon-{{ post.secondaryGlyphicon1 }}"></i>
                    {% endif %}
                </td>
                <td>{{ post.secondaryRank1 }}</td>
                <td>{{ post.secondaryLastRank1 }}</td>
            </tr>
            {% endif %}
            {% if post.meta.secondary_keyword2 %}
            <tr class="p1cm-secondary {{ post.secondaryRowClass2 }}">
                <td>{{ post.meta.secondary_keyword2 }}</td>
                <td class="p1cm-variation{% if post.secondaryVariation2 %} p1cm-{{ post.secondaryVariation2 }}{% endif %}">
                    {{ post.secondaryProgress2 }}
                    {% if post.secondaryGlyphicon2 %}
                    <i class="glyphicon glyphicon-{{ post.secondaryGlyphicon2 }}"></i>
                    {% endif %}
                </td>
                <td>{{ post.secondaryRank2 }}</td>
                <td>{{ post.secondaryLastRank2 }}</td>
            </tr>
            {% endif %}
            {% if post.meta.secondary_keyword3 %}
            <tr class="p1cm-secondary {{ post.secondaryRowClass3 }}">
                <td>{{ post.meta.secondary_keyword3 }}</td>
                <td class="p1cm-variation{% if post.secondaryVariation3 %} p1cm-{{ post.secondaryVariation3 }}{% endif %}">
                    {{ post.secondaryProgress3 }}
                    {% if post.secondaryGlyphicon3 %}
                    <i class="glyphicon glyphicon-{{ post.secondaryGlyphicon3 }}"></i>
                    {% endif %}
                </td>
                <td>{{ post.secondaryRank3 }}</td>
                <td>{{ post.secondaryLastRank3 }}</td>
            </tr>
            {% endif %}
            {% if post.meta.secondary_keyword4 %}
            <tr class="p1cm-secondary {{ post.secondaryRowClass4 }}">
                <td>{{ post.meta.secondary_keyword4 }}</td>
                <td class="p1cm-variation{% if post.secondaryVariation4 %} p1cm-{{ post.secondaryVariation4 }}{% endif %}">
                    {{ post.secondaryProgress4 }}
                    {% if post.secondaryGlyphicon4 %}
                    <i class="glyphicon glyphicon-{{ post.secondaryGlyphicon4 }}"></i>
                    {% endif %}
                </td>
                <td>{{ post.secondaryRank4 }}</td>
                <td>{{ post.secondaryLastRank4 }}</td>
            </tr>
            {% endif %}
        {% endif %}
        </tbody>
    </table>
    <p class="p1cm-schedule">Next tracking scheduled to run on {{ post.nextTrackingAt }}</p>
</div>