<NME> _panel-actions_overview.twig
<BEF> {##
 # Sidebar-Panel: Displays actions for contenttype
 #}
{% extends '@bolt/_base/_panel.twig' %}

{% block panel_class 'panel-news' %}

{% block panel_icon 'fa-cog' %}

{% block panel_head __('contenttypes.generic.actions-all', {'%contenttypes%': context.contenttype.name}) %}

{% block panel_body %}
    {% if isallowed('contenttype:' ~ context.contenttype.slug ~ ':create') %}
        <a class="btn btn-primary" href="{{ path('editcontent', {'contenttypeslug': context.contenttype.slug}) }}">
            <i class="fa fa-plus"></i> {{ __('contenttypes.generic.new', {'%contenttype%': context.contenttype.singular_name}) }}
        </a>
    {% endif %}

    <form class="form-inline">
        <div class="form-group">

            {% set filter_query = global.request.query.get('filter') %}
            {% set order_query = global.request.query.get('order') %}
            {% set status_query = global.request.query.get('status') %}
            {% set taxonomyfilter = false %}

            {% if context.contenttype.taxonomy|default([]) %}
                <p style="margin-top: 15px;"><strong>{{ __('general.phrase.taxonomy') }}</strong>:
                    {% for taxonomy in context.contenttype.taxonomy %}
                        {% if config.get('taxonomy/' ~ taxonomy ~ '/options') is iterable %}
                            {% set tax_query = global.request.query.get('taxonomy-' ~ taxonomy ) %}
                            {% if tax_query %}
                                {% set taxonomyfilter = true %}
                            {% endif %}
                            <select name='taxonomy-{{taxonomy}}' class='form-control'>
                                <option value=''>
                                    ({{ config.get('taxonomy/' ~ taxonomy ~ '/name')|default(taxonomy) }})
                                </option>
                                {% for slug, name in config.get('taxonomy/' ~ taxonomy ~ '/options') %}
                                    <option value='{{slug}}' {% if tax_query == slug %}selected{% endif %}>
                                        {{name}}
                                    </option>
                                {% endfor %}
                            </select>
                        {% endif %}
                    {% endfor %}
                </p>
            {% endif %}

            <p style="margin-top: 15px;"><strong>{{ __('general.phrase.status') }}</strong>:
                <select name='status' class='form-control'>
                    <option value=''>All</option>
                    {% set status_list = { 'published' : 'Published', 'held' : 'Not Published', 'draft' : 'Draft' } %}

    </form>


    {% set description = __(['contenttypes', context.contenttype.slug, 'description'], {DEFAULT: context.contenttype.description|default()}) %}
    <div class="description">
        {% if description %}
            {{ description|markdown }}
        <div class="form-group" style="display: block; margin-top: 12px;">
            <button type="submit" class="btn btn-tertiary"><i class="fa fa-filter"></i> {{ __('general.phrase.filter') }}</button>

            {% if filter_query or order_query or taxonomyfilter or status_query %}
                <a class="btn btn-tertiary" href="?"><i class="fa fa-close"></i> {{ __('general.phrase.clear-filter-sort') }}</a>
            {% endif %}
        </div>
    </form>

    {# Use the `description:` from contenttypes.yml if set, otherwise fall back
       to the (localized) default descriptions that are available for the
       built-in contenttupes like 'pages' and 'blocks'. #}
    {% set description = context.contenttype.description|default(__(['contenttypes', context.contenttype.slug, 'description'], {DEFAULT: ''})) %}
    <div class="description">
        {% if description %}
            {{ description|markdown }}
        {% endif %}
    </div>

    <p><strong>{{ __('general.phrase.details') }}</strong></p>
    <ul>
        <li>{{ __('general.phrase.status-default') }}: {{ context.contenttype.default_status|default('published') }}</li>
        <li>{{ __('general.phrase.listing-template') }}: <code>{{ context.contenttype.listing_template|default( config.get('general/listing_template') ) }}</code></li>
        <li>{{ __('general.phrase.template-detail') }}: <code>{{ context.contenttype.record_template|default( config.get('general/record_template') ) }}</code></li>
        {% if context.contenttype.taxonomy|default('') is iterable %}
            <li>{{ __('general.phrase.taxonomy') }}: {{ context.contenttype.taxonomy|join(', ') }}</li>
        {% endif %}
        {% if context.contenttype.relations|default('') is iterable %}
            <li>
                {{ __('general.phrase.relationships') }}:
                {% for rel, data in context.contenttype.relations %}
                    {{ rel }}{% if not loop.last %}, {% endif %}
                {% endfor %}
            </li>
        {% endif %}
    </ul>

{% endblock panel_body %}

<MSG> Merge pull request #6609 from bolt/hotfix/allow-override-description-in-contenttypes

Allow overriding `description: ` in `contenttypes.yml`.
<DFF> @@ -54,8 +54,10 @@
 
     </form>
 
-
-    {% set description = __(['contenttypes', context.contenttype.slug, 'description'], {DEFAULT: context.contenttype.description|default()}) %}
+    {# Use the `description:` from contenttypes.yml if set, otherwise fall back
+       to the (localized) default descriptions that are available for the
+       built-in contenttupes like 'pages' and 'blocks'. #}
+    {% set description = context.contenttype.description|default(__(['contenttypes', context.contenttype.slug, 'description'], {DEFAULT: ''})) %}  
     <div class="description">
         {% if description %}
             {{ description|markdown }}

{'commit': 'diff --git a/app/view/twig/overview/_panel-actions_overview.twig b/app/view/twig/overview/_panel-actions_overview.twig\nindex 993517f6d..3e1dd4d80 100644\n--- a/app/view/twig/overview/_panel-actions_overview.twig\n+++ b/app/view/twig/overview/_panel-actions_overview.twig\n@@ -54,8 +54,10 @@\n \n     </form>\n \n-\n-    {% set description = __([\'contenttypes\', context.contenttype.slug, \'description\'], {DEFAULT: context.contenttype.description|default()}) %}\n+    {# Use the `description:` from contenttypes.yml if set, otherwise fall back\n+       to the (localized) default descriptions that are available for the\n+       built-in contenttupes like \'pages\' and \'blocks\'. #}\n+    {% set description = context.contenttype.description|default(__([\'contenttypes\', context.contenttype.slug, \'description\'], {DEFAULT: \'\'})) %}  \n     <div class="description">\n         {% if description %}\n             {{ description|markdown }}\n', 'commit_subject': 'Merge pull request #6609 from bolt/hotfix/allow-override-description-in-contenttypes', 'repo_name': 'bolt/bolt', 'committer': {'name': 'GitHub', 'email': '1505422b2465e9a84f6fdfaa161078890c593f06@github.com', 'time_sec': '1493656753', 'tz_offset': '120', 'date': {'seconds': '1493656753'}}, 'commit_tree': 'ef33a249e0ad024816f9f20834b738087da4ee51', 'commit_message': 'Merge pull request #6609 from bolt/hotfix/allow-override-description-in-contenttypes\n\nAllow overriding `description: ` in `contenttypes.yml`.', 'language_name': 'JavaScript', 'license': 'mit', 'hunks': '@@ -54,8 +54,10 @@\n \n     </form>\n \n-\n-    {% set description = __([\'contenttypes\', context.contenttype.slug, \'description\'], {DEFAULT: context.contenttype.description|default()}) %}\n+    {# Use the `description:` from contenttypes.yml if set, otherwise fall back\n+       to the (localized) default descriptions that are available for the\n+       built-in contenttupes like \'pages\' and \'blocks\'. #}\n+    {% set description = context.contenttype.description|default(__([\'contenttypes\', context.contenttype.slug, \'description\'], {DEFAULT: \'\'})) %}  \n     <div class="description">\n         {% if description %}\n             {{ description|markdown }}\n', 'addition_count': 4, 'deletion_count': 2, 'src_file': 'a/app/view/twig/overview/_panel-actions_overview.twig', 'tgt_file': 'b/app/view/twig/overview/_panel-actions_overview.twig', 'file_extension': '.twig', 'before_file': '{##\n # Sidebar-Panel: Displays actions for contenttype\n #}\n{% extends \'@bolt/_base/_panel.twig\' %}\n\n{% block panel_class \'panel-news\' %}\n\n{% block panel_icon \'fa-cog\' %}\n\n{% block panel_head __(\'contenttypes.generic.actions-all\', {\'%contenttypes%\': context.contenttype.name}) %}\n\n{% block panel_body %}\n    {% if isallowed(\'contenttype:\' ~ context.contenttype.slug ~ \':create\') %}\n        <a class="btn btn-primary" href="{{ path(\'editcontent\', {\'contenttypeslug\': context.contenttype.slug}) }}">\n            <i class="fa fa-plus"></i> {{ __(\'contenttypes.generic.new\', {\'%contenttype%\': context.contenttype.singular_name}) }}\n        </a>\n    {% endif %}\n\n    <form class="form-inline">\n        <div class="form-group">\n\n            {% set filter_query = global.request.query.get(\'filter\') %}\n            {% set order_query = global.request.query.get(\'order\') %}\n            {% set status_query = global.request.query.get(\'status\') %}\n            {% set taxonomyfilter = false %}\n\n            {% if context.contenttype.taxonomy|default([]) %}\n                <p style="margin-top: 15px;"><strong>{{ __(\'general.phrase.taxonomy\') }}</strong>:\n                    {% for taxonomy in context.contenttype.taxonomy %}\n                        {% if config.get(\'taxonomy/\' ~ taxonomy ~ \'/options\') is iterable %}\n                            {% set tax_query = global.request.query.get(\'taxonomy-\' ~ taxonomy ) %}\n                            {% if tax_query %}\n                                {% set taxonomyfilter = true %}\n                            {% endif %}\n                            <select name=\'taxonomy-{{taxonomy}}\' class=\'form-control\'>\n                                <option value=\'\'>\n                                    ({{ config.get(\'taxonomy/\' ~ taxonomy ~ \'/name\')|default(taxonomy) }})\n                                </option>\n                                {% for slug, name in config.get(\'taxonomy/\' ~ taxonomy ~ \'/options\') %}\n                                    <option value=\'{{slug}}\' {% if tax_query == slug %}selected{% endif %}>\n                                        {{name}}\n                                    </option>\n                                {% endfor %}\n                            </select>\n                        {% endif %}\n                    {% endfor %}\n                </p>\n            {% endif %}\n\n            <p style="margin-top: 15px;"><strong>{{ __(\'general.phrase.status\') }}</strong>:\n                <select name=\'status\' class=\'form-control\'>\n                    <option value=\'\'>All</option>\n                    {% set status_list = { \'published\' : \'Published\', \'held\' : \'Not Published\', \'draft\' : \'Draft\' } %}\n\n    </form>\n\n\n    {% set description = __([\'contenttypes\', context.contenttype.slug, \'description\'], {DEFAULT: context.contenttype.description|default()}) %}\n    <div class="description">\n        {% if description %}\n            {{ description|markdown }}\n        <div class="form-group" style="display: block; margin-top: 12px;">\n            <button type="submit" class="btn btn-tertiary"><i class="fa fa-filter"></i> {{ __(\'general.phrase.filter\') }}</button>\n\n            {% if filter_query or order_query or taxonomyfilter or status_query %}\n                <a class="btn btn-tertiary" href="?"><i class="fa fa-close"></i> {{ __(\'general.phrase.clear-filter-sort\') }}</a>\n            {% endif %}\n        </div>\n    </form>\n\n    {# Use the `description:` from contenttypes.yml if set, otherwise fall back\n       to the (localized) default descriptions that are available for the\n       built-in contenttupes like \'pages\' and \'blocks\'. #}\n    {% set description = context.contenttype.description|default(__([\'contenttypes\', context.contenttype.slug, \'description\'], {DEFAULT: \'\'})) %}\n    <div class="description">\n        {% if description %}\n            {{ description|markdown }}\n        {% endif %}\n    </div>\n\n    <p><strong>{{ __(\'general.phrase.details\') }}</strong></p>\n    <ul>\n        <li>{{ __(\'general.phrase.status-default\') }}: {{ context.contenttype.default_status|default(\'published\') }}</li>\n        <li>{{ __(\'general.phrase.listing-template\') }}: <code>{{ context.contenttype.listing_template|default( config.get(\'general/listing_template\') ) }}</code></li>\n        <li>{{ __(\'general.phrase.template-detail\') }}: <code>{{ context.contenttype.record_template|default( config.get(\'general/record_template\') ) }}</code></li>\n        {% if context.contenttype.taxonomy|default(\'\') is iterable %}\n            <li>{{ __(\'general.phrase.taxonomy\') }}: {{ context.contenttype.taxonomy|join(\', \') }}</li>\n        {% endif %}\n        {% if context.contenttype.relations|default(\'\') is iterable %}\n            <li>\n                {{ __(\'general.phrase.relationships\') }}:\n                {% for rel, data in context.contenttype.relations %}\n                    {{ rel }}{% if not loop.last %}, {% endif %}\n                {% endfor %}\n            </li>\n        {% endif %}\n    </ul>\n\n{% endblock panel_body %}\n', 'message': 'Merge pull request #6609 from bolt/hotfix/allow-override-description-in-contenttypes\n\nAllow overriding `description: ` in `contenttypes.yml`.', 'author_name': 'GitHub', 'lang': 'twig'}