<div class="package-sheet{% if primaryIsExpanded %} is-expanded{% endif %} row{% if hasPrimary %} has-primary{% endif %}" content-id="{{ packageObj.id }}" content-primary-id="{{ packageObj.primaryContent.id }}" data-hub="{{ packageObj.hub }}" data-vertical="{{ verticalSlug }}" data-all-people="{{ allPeople }}" data-full-text="" has-url="{{ packageHasURL }}">

    <div class="minimal-card column small-11 medium-11 large-11">
        {% if packageObj %}{% if packageObj.publishedUrl %}<a href="{{ packageObj.publishedUrl }}" target="_blank">{% endif %}{% endif %}
        <div class="readiness-indicator">
            <div class="indicator-inner">
                <i class="fa fa-check"></i>
            </div>
        </div>
        {% if packageObj %}{% if packageObj.publishedUrl %}</a>{% endif %}{% endif %}

        <div class="slug-bar row">
            <div class="date-slug-budget-line column small-7 medium-9 large-9">
                <div class="color-dot" style="background-color: {{ hubDotColor }};"></div>
                <h2 class="date-header">{{ verticalName }}&nbsp;/&nbsp;{{ hubName }}</h2>
                <h1 class="primary-slug might-overflow">{{ packageObj.primaryContent.budgetLine }}</h1>
                <h4 class="budget-line-truncated might-overflow"><i class="fa fa-fw fa-desktop"></i>{% if packageObj %}{% if packageObj.publishedUrl %}Published{% else %}Expected{% endif %}{% else %}Expected{% endif %} {{ publishDate }}</h4>
            </div>
            <div class="author-info column small-5 medium-3 large-3">
                <h3 class="additional-info-line package-slug"><span>{{ packageObj.slugKey }}.{{ packageObj.slugDate }}</span></h3>

                <h3 class="might-overflow">
                {% if packageObj.primaryContent.authors|length > 0 %}
                {% if packageObj.primaryContent.authors|length == 1 %}Author{% else %}Authors{% endif %}: {% for author in packageObj.primaryContent.authors %}{{ author.formattedName }}{% if not loop.last %}, {% endif %}{% endfor %}
                {% endif %}
                </h3>

                <h3 class="additional-info-line might-overflow">
                {% if packageObj.primaryContent.editors|length > 0 %}
                {% if packageObj.primaryContent.editors|length == 1 %}Editor{% else %}Editors{% endif %}: {% for editor in packageObj.primaryContent.editors %}{{ editor.formattedName }}{% if not loop.last %}, {% endif %}{% endfor %}
                {% endif %}
                </h3>
            </div>
        </div>
        <div class="contents-bar row">
            <div class="primary-type column small-6 medium-6 large-6 text-left">
                <div class="additional-info-line"><i class="{{ primaryTypeMeta.icon }}"></i>&thinsp;&nbsp;{{ primaryTypeMeta.verboseName }}{% if packageObj.primaryContent.length %} ({{ packageObj.primaryContent.length|numberWithCommas }} words){% endif %}</div>
            </div>
            <div class="related-types column small-6 medium-6 large-6 text-right"><div class="additional-info-line">{% if additionalItemTypes|length > 0 %}Includes {% for type in additionalItemTypes %}<i class="{{ type.icon }}"></i>{% endfor %}{% endif %}</div>
            </div>
        </div>

        <div class="primary-description row{% if primaryIsExpanded %} overflow-visible{% endif %}">
            <div class="budget-line collapsed column small-12 medium-12 large-12">
                <div class="item-options">
                    <div class="option-list">
                        <div class="web-info option">
                            <i class="fa fa-fw fa-desktop"></i>
                            <span class="hover-info">Web publishing</span>
                        </div>
                        <div class="print-info option">
                            <i class="fa fa-fw fa-newspaper-o"></i>
                            <span class="hover-info">Print publishing</span>
                        </div>
                    </div>
                </div>

                <div class="mobile-author-info">
                    <p>{% if packageObj.primaryContent.authors|length > 0 %}{% if packageObj.primaryContent.authors|length == 1 %}Author{% else %}Authors{% endif %}: {% for author in packageObj.primaryContent.authors %}{{ author.formattedName }}{% if not loop.last %}, {% endif %}{% endfor %}{% endif %}{% if packageObj.primaryContent.editors|length > 0 %}&nbsp;/&nbsp;{% if packageObj.primaryContent.editors|length == 1 %}Editor{% else %}Editors{% endif %}: {% for editor in packageObj.primaryContent.editors %}{{ editor.formattedName }}{% if not loop.last %}, {% endif %}{% endfor %}{% endif %}</p>
                </div>

                <p>{{ packageObj.primaryContent.budgetLine }}</p>

                <div class="mobile-action-buttons">
                    <div class="action-button material-button edit-package">
                        <a href="{{ homeViewLink }}edit/{{ packageObj.id }}/">
                            <div class="button-contents">
                                <div class="button-innermost">
                                    <i class="fa fa-fw fa-pencil-square-o"></i>
                                    <div class="action-text">Edit</div>
                                    <div class="clearer"></div>
                                </div>
                            </div>
                        </a>
                    </div>
                    <div class="action-button material-button view-notes">
                        <div class="button-contents">
                            <div class="button-innermost">
                                <i class="fa fa-fw fa-paragraph"></i>
                                <div class="action-text">Notes</div>
                                <div class="clearer"></div>
                            </div>
                        </div>
                    </div>
                    <div class="action-button material-button subscribe">
                        <div class="button-contents">
                            <div class="button-innermost">
                                <i class="fa fa-fw fa-slack"></i>
                                <div class="action-text">Subscribe</div>
                                <div class="clearer"></div>
                            </div>
                        </div>
                    </div>
                    <div class="clearer"></div>
                </div>

                <div class="clearer"></div>
            </div>
        </div>
    </div>
    <div class="action-buttons column small-1 medium-1 large-1 text-center">
        <div class="edit-package action-button">
            <a href="{{ homeViewLink }}edit/{{ packageObj.id }}/">
                <i class="fa fa-pencil-square-o"></i>
                <span class="hover-info">Edit</span>
            </a>
        </div>
        <div class="view-notes action-button">
            <i class="fa fa-paragraph"></i>
            <span class="hover-info">Notes</span>
        </div>
        <div class="subscribe action-button">
            <i class="fa fa-slack"></i>
            <span class="hover-info">Subscribe</span>
        </div>
        <div class="expand-package action-button">
            <i class="fa fa-plus"></i>
            <i class="fa fa-minus"></i>
            <span class="hover-info">More info</span>
        </div>
    </div>
    <div class="clearer"></div>
</div>
{% if packageObj.additionalContent|length > 0 %}
<div class="extra-sheet">
    <ul class="related-content">
        {% for item in additionalWithTypeMetas %}
            {% include "budget/package-item-web-additionalcontent" %}
        {% endfor %}
    </ul>
</div>
{% endif %}
