{% set mainChildren = (lsDoc.topLsItemIds is not empty) %}
[
    {
        "title": {{ lsDoc.title|json_encode|raw }},
        "key": "doc-{{ lsDoc.id|raw }}",
        "active": true,	// document node is active when first loaded
        "folder": true,
        "expanded": true, // document node is expanded when first loaded
        "children": [
            {% for itemId in lsDoc.topLSItemIds %}
                {% if not loop.first %}, {% endif %}
                {% set item = items[itemId] %}
                {% include 'CftfBundle:DocTree:render_child.json.twig' with { 'lsItem':item, 'lsDoc':lsDoc, 'items':items } %}
            {% endfor %}
            {% if orphaned is not empty %}
                {% if mainChildren %}, {% endif %}
                {% for item in orphaned %}
                    {% if not loop.first %}, {% endif %}
                    {% include 'CftfBundle:DocTree:render_child.json.twig' with { 'lsItem':item, 'lsDoc':lsDoc, 'items':items } %}
                {% endfor %}
            {% endif %}
        ]
    }
]

Move comments to twig instead of being rendered in js

{% set mainChildren = (lsDoc.topLsItemIds is not empty) %}
[
    {
        "title": {{ lsDoc.title|json_encode|raw }},
        "key": "doc-{{ lsDoc.id|raw }}",
        "active": true,{# document node is active when first loaded #}
        "folder": true,
        "expanded": true,{# document node is expanded when first loaded #}
        "children": [
            {% for itemId in lsDoc.topLSItemIds %}
                {% if not loop.first %}, {% endif %}
                {% set item = items[itemId] %}
                {% include 'CftfBundle:DocTree:render_child.json.twig' with { 'lsItem':item, 'lsDoc':lsDoc, 'items':items } %}
            {% endfor %}
            {% if orphaned is not empty %}
                {% if mainChildren %}, {% endif %}
                {% for item in orphaned %}
                    {% if not loop.first %}, {% endif %}
                    {% include 'CftfBundle:DocTree:render_child.json.twig' with { 'lsItem':item, 'lsDoc':lsDoc, 'items':items } %}
                {% endfor %}
            {% endif %}
        ]
    }
]


{
	{% if lsItem.abbreviatedStatement is not empty %}
		"title":{{ lsItem.abbreviatedStatement|json_encode|raw }},
	{% else %}
		"title":{{ lsItem.fullStatement|json_encode|raw }},
	{% endif %}
    "humanCoding":{{ lsItem.humanCodingScheme|json_encode|raw }},
    "key":{{ lsItem.id|json_encode|raw }}
    {% if lsItem.children is not empty %}
        , "folder": true,
        "expanded": false, // lower nodes are not expanded by default
        "children": [
            {% for childWithId in lsItem.children %}
                {% if not loop.first %}, {% endif %}
                {% set child = items[childWithId.id] %}
                {% include 'CftfBundle:DocTree:render_child.json.twig' with { 'lsItem':child, 'lsDoc':lsDoc, 'items':items} %}
            {% endfor %}
        ]
    {% endif %}
}

Send more data for each listed in to tree javascript for tree view

{
    "abbrStmt":{{ lsItem.abbreviatedStatement|json_encode|raw }},
    "fullStmt":{{ lsItem.fullStatement|json_encode|raw }},
    "humanCoding":{{ lsItem.humanCodingScheme|json_encode|raw }},
    "listEnum":{{ lsItem.listEnumInSource|json_encode|raw}},
    "key":{{ lsItem.id|json_encode|raw }}
    {% if lsItem.children is not empty %}
        , "folder": true,
        "expanded": false,{# lower nodes are not expanded by default #}
        "children": [
            {% for childWithId in lsItem.children %}
                {% if not loop.first %}, {% endif %}
                {% set child = items[childWithId.id] %}
                {% include 'CftfBundle:DocTree:render_child.json.twig' with { 'lsItem':child, 'lsDoc':lsDoc, 'items':items} %}
            {% endfor %}
        ]
    {% endif %}
}


{% set empty_cell %}
    -- {{ 'oro.entity_merge.form.empty'|trans }} --
{% endset %}

{% if convertedValue|length %}
    {{ convertedValue }}
    {#{{ 'oro.activitylist.merge.items.label'|trans }}#}
    {#{{ 'oro.activitylist.merge.items.label'|trans }}#}
    {{ 'oro.activitylist.merge.items.label'|transchoice(convertedValue) }}
{% else %}
    {{ empty_cell }}
{% endif %}

Append or replace activities on account merge

{% set empty_cell %}
    -- {{ 'oro.entity_merge.form.empty'|trans }} --
{% endset %}

{% if convertedValue|length %}
    {{ convertedValue }}
    {{ 'oro.activitylist.merge.items.label'|transchoice(convertedValue) }}
{% else %}
    {{ empty_cell }}
{% endif %}


{# Σελίδα Στοιχείων Πελάτη #}
{% extends "::base.html.twig" %}

{% block title %}Στοιχεία Πελάτη{% endblock %}

{% block body %}

Αναγνωριστικό Πελάτη: {{ client.id }}

e-mail: {{ client.email }}

Τίτλος: {{ client.appTitle }}

URI ανακατεύθυνσης: {{ client.redirectionUri }}

{% endblock %}

Increase the "users" table "id" field's length to 43.

{# Σελίδα Στοιχείων Πελάτη #}
{% extends "::base.html.twig" %}

{% block title %}Στοιχεία Πελάτη{% endblock %}

{% block body %}

Στοιχεία Πελάτη

Αναγνωριστικό Πελάτη: {{ client.id }}

e-mail: {{ client.email }}

Τίτλος: {{ client.appTitle }}

URI ανακατεύθυνσης: {{ client.redirectionUri }}

{% endblock %}


{% extends "::base.html.twig" %}

{% block body %}
    {{ form(form) }}
{% endblock %}

Add a title for index view

{% extends "::base.html.twig" %}

{% block body %}

Extra Form Render

    {{ form(form) }}
{% endblock %}


      {{ siteTitle }}

    <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbar-collapse" aria-controls="navbar-collapse" aria-expanded="false" aria-label="Toggle navigation">

    </button>

      {{ getnavigation('page', 0, 1) }}

      {% for top in positions.top %}
        {% if top.html %}
          {{ top.html|raw }}
        {% endif %}
      {% endfor %}

      {% include 'Core/Layout/Templates/Languages.html.twig' %}

Remove role on nav list


        {% for route in routes %}

                {{ route.label|trans }}

        {% endfor %}

Debug menu : size 4


{% set prefix = "c-bolt-" %}
{% set componentName = "background-shapes" %}
{% set baseClass = prefix ~ componentName %}

{% set classes = [
  baseClass
] %}

{% set colors = ["yellow", "orange", "teal", "blue"] %}

{% set shapeGroups = source("shape-groups.json") | json_decode %}

{# If a valid shapeGroup was specified, select its shapes.  Otherwise, get the shapes from the default shapeGroup. #}
{% set elements = attribute(shapeGroups, shapeGroup) ? attribute(shapeGroups, shapeGroup) : shapeGroups.A %}

<bolt-{{ componentName }} bolt-component>

      {% grid "o-bolt-grid--center o-bolt-grid--full" %}
        {% for element in  elements %}
          {% set attributes = create_attribute({}) %}

          {% set classes = [
            baseClass ~ "__shape",
            element.color in colors ? baseClass ~ "__shape--" ~ element.color,
            element.interiorColor in colors ? baseClass ~ "__shape--interior-" ~ element.interiorColor
          ] %}

          {% cell "u-bolt-width-1/3" %}

              {{ source(element.shape ~ '.svg') }}

          {% endcell %}
        {% endfor %}
      {% endgrid %}

</bolt-{{ componentName }}>

Add support for svgs with relative paths

{% set prefix = "c-bolt-" %}
{% set componentName = "background-shapes" %}
{% set baseClass = prefix ~ componentName %}

{% set classes = [
  baseClass
] %}

{% set colors = ["yellow", "orange", "teal", "blue"] %}

{% set shapeGroups = source("shape-groups.json") | json_decode %}

{# If a valid shapeGroup was specified, select its shapes.  Otherwise, get the shapes from the default shapeGroup. #}
{% set elements = attribute(shapeGroups, shapeGroup) ? attribute(shapeGroups, shapeGroup) : shapeGroups.A %}

<bolt-{{ componentName }} bolt-component>

      {% grid "o-bolt-grid--center o-bolt-grid--full" %}
        {% for element in  elements %}
          {% set attributes = create_attribute({}) %}

          {% set classes = [
            baseClass ~ "__shape",
            element.color in colors ? baseClass ~ "__shape--" ~ element.color,
            element.interiorColor in colors ? baseClass ~ "__shape--interior-" ~ element.interiorColor
          ] %}

          {% cell "u-bolt-width-1/3" %}

              {{ source('@bolt/' ~ element.shape ~ '.svg') }}

          {% endcell %}
        {% endfor %}
      {% endgrid %}

</bolt-{{ componentName }}>


{% extends '@SyliusAdmin/layout.html.twig' %}

{% block title %}{{ 'sylius.ui.shipment'|trans }} | {{ shipment.id }}{% endblock %}

{% block content %}
    {% include '@SyliusAdmin/Shipment/Show/_header.html.twig' %}
    {% include '@SyliusAdmin/Shipment/Show/_breadcrumb.html.twig' %}

                    {{ 'sylius.ui.product'|trans }}
                    {{ 'sylius.ui.variant'|trans }}

                {% for unit in shipment.units %}

                        {{ unit.orderItem.product.name }}
                        {{ unit.orderItem.variant.name }}

                {% endfor %}

{% endblock %}

Add back button on shipment show page

{% extends '@SyliusAdmin/layout.html.twig' %}

{% import '@SyliusUi/Macro/buttons.html.twig' as buttons %}

{% block title %}{{ 'sylius.ui.shipment'|trans }} | {{ shipment.id }}{% endblock %}

{% block content %}

            {% include '@SyliusAdmin/Shipment/Show/_header.html.twig' %}

            {{ buttons.default(app.request.headers.get('referer'), '', 'back', 'arrow alternate circle left outline') }}

    {% include '@SyliusAdmin/Shipment/Show/_breadcrumb.html.twig' %}

                    {{ 'sylius.ui.product'|trans }}
                    {{ 'sylius.ui.variant'|trans }}

                {% for unit in shipment.units %}

                        {{ unit.orderItem.product.name }}
                        {{ unit.orderItem.variant.name }}

                {% endfor %}

{% endblock %}


{% block page_heading %}{% endblock %}

    {% block body_container %}

        {% block body %}{% endblock %}

    {% endblock %}


{% extends 'KorobiWebBundle::layout.html.twig' %}

{% set page_title = channel_name ~ " on " ~ network_name ~ " - Commands" %}

{% block body %}

Commands for {{ channel_name }} on {{ network_name }}

                Name
                Content

            {% for command in commands %}

                    {% if command.aliases or command.is_action %}
                        <abbr title="{% if command.aliases %}Aliases: {{ command.aliases }}{% endif %}{% if command.is_action %}{% if command.aliases %}
{% endif %}Action: {% if command.is_action %}yes{% else %}no{% endif %}{% endif %}" rel="tooltip">{{ command.name }}
                        {{ command.value|ircformat|raw }}
                    {% else %}
                        {{ command.name }}

                            {% for value in command.value %}
                                {{ value|ircformat|raw }}{% if not loop.last %}
{% endif %}
                            {% endfor %}

                    {% endif %}

            {% endfor %}

    Hover over a command name for more info.
{% endblock %}

Fix array to string conversion

{% extends 'KorobiWebBundle::layout.html.twig' %}

{% set page_title = channel_name ~ " on " ~ network_name ~ " - Commands" %}

{% block body %}

Commands for {{ channel_name }} on {{ network_name }}

                Name
                Content

            {% for command in commands %}

                    {% if command.aliases or command.is_action %}
                        <abbr title="{% if command.aliases %}Aliases: {{ command.aliases }}{% endif %}{% if command.is_action %}{% if command.aliases %}
{% endif %}Action: {% if command.is_action %}yes{% else %}no{% endif %}{% endif %}" rel="tooltip">{{ command.name }}

                            {% for value in command.value %}
                                {{ value|ircformat|raw }}{% if not loop.last %}
{% endif %}
                            {% endfor %}

                    {% else %}
                        {{ command.name }}

                            {% for value in command.value %}
                                {{ value|ircformat|raw }}{% if not loop.last %}
{% endif %}
                            {% endfor %}

                    {% endif %}

            {% endfor %}

    Hover over a command name for more info.
{% endblock %}


{% set visible = options.visible is defined ? options.visible : true %}

{% if visible %}

        {% if options.icon is defined %}{% endif %}
        {{ action.label|trans }}

            {% if options.header is defined %}

                {% if options.header.icon is defined %}{% endif %}
                {{ options.header.label|trans }}

            {% endif %}
            {% for link in options.links %}
                {% include '@SyliusUi/Grid/Action/_link.html.twig' %}
            {% endfor %}

{% endif %}

Add possibility to set visible parameter for each link in links action

{% set visible = options.visible is defined ? options.visible : true %}

{% if visible %}

        {% if options.icon is defined %}{% endif %}
        {{ action.label|trans }}

            {% if options.header is defined %}

                {% if options.header.icon is defined %}{% endif %}
                {{ options.header.label|trans }}

            {% endif %}
            {% for link in options.links %}
                {% set is_link_visible = link.visible is defined ? link.visible : true %}

                {% if is_link_visible %}
                    {% include '@SyliusUi/Grid/Action/_link.html.twig' %}
                {% endif %}
            {% endfor %}

{% endif %}


The import command just ran!  \o/   Please log in as admin and process any newly imported items.

One day I hope to be able to tell you how many items were imported and how many were rejected.  Something to look forward to, eh?


Hola {{ name }},

Puedes proporcionar este enlace público de votacion a los votantes para que procedan
rellenando el formulario que les aparecerá:

http://municipales2015.listabierta.org/{{ address_slug }}/vota

Update mail candidacy vote address template

{{ 'mail.candidacy_vote_address.hello'|trans }} {{ name }},

{{ 'mail.candidacy_vote_address.can_public'|trans }}:

{{ path('town_candidacy_vote_step1', { 'address' : address_slug }) }}


{% extends 'admin/layout.html.twig' %}

{% block body_id 'admin_post_new' %}

{% block main %}

{{ 'title.post_new'|trans }}

    {{ form_start(form) }}
        {{ form_row(form.title) }}
        {{ form_row(form.summary) }}
        {{ form_row(form.content) }}
        {{ form_row(form.authorEmail) }}
        {{ form_row(form.publishedAt) }}

        <input type="submit" value="{{ 'label.create_post'|trans }}" class="btn btn-primary" />

        {{ form_widget(form.saveAndCreateNew, { label: 'label.save_and_create_new'|trans, attr: { class: 'btn btn-primary' } }) }}

            {{ 'action.back_to_list'|trans }}

    {{ form_end(form) }}
{% endblock %}

{% block sidebar %}
    {{ parent() }}

    {{ show_source_code(_self) }}
{% endblock %}

Fix invalid translation key for label name

{% extends 'admin/layout.html.twig' %}

{% block body_id 'admin_post_new' %}

{% block main %}

{{ 'title.post_new'|trans }}

    {{ form_start(form) }}
        {{ form_row(form.title) }}
        {{ form_row(form.summary) }}
        {{ form_row(form.content) }}
        {{ form_row(form.authorEmail) }}
        {{ form_row(form.publishedAt) }}

        <input type="submit" value="{{ 'label.create_post'|trans }}" class="btn btn-primary" />

        {{ form_widget(form.saveAndCreateNew, { label: 'label.save_and_create_new', attr: { class: 'btn btn-primary' } }) }}

            {{ 'action.back_to_list'|trans }}

    {{ form_end(form) }}
{% endblock %}

{% block sidebar %}
    {{ parent() }}

    {{ show_source_code(_self) }}
{% endblock %}


{% include 'WebProfilerBundle:Profiler:base_js.html.twig' %}


{% if wo_breadcrumbs()|length %}

    {% for b in breadcrumbs %}

        {% if b.url and not loop.last %}{% endif %}
        {{- b.text | trans(b.translationParameters, translation_domain, locale) -}}
        {% if b.url and not loop.last %}{% endif %}

        {% if separator is not null and not loop.last %}
          {{ separator }}
      {% endif %}

    {% endfor %}

{% endif %}

Add spaceless to avoid spaces after links

{% if wo_breadcrumbs()|length %}
  {% spaceless %}

      {% for b in breadcrumbs %}

          {% if b.url and not loop.last %}{% endif %}
          {{- b.text | trans(b.translationParameters, translation_domain, locale) -}}
          {% if b.url and not loop.last %}{% endif %}

          {% if separator is not null and not loop.last %}
            {{ separator }}
        {% endif %}

      {% endfor %}

  {% endspaceless %}
{% endif %}


{% form_theme form 'KoalaContentBundle:Form:fields.html.twig' %}

<form action="{{block('action')}}" method="post" {{ form_enctype(form) }} style="width: 600px">

			<fieldset class="inputs">
				<legend>Page options</legend>

				    {{ form_errors(form) }}
					{{form_row(form.parent)}}
					{{form_row(form.menuTitle)}}
					{{form_row(form.url)}}
					{{form_row(form.slug)}}
					{{form_row(form.layout)}}

			</fieldset>
			{{form_rest(form)}}

		<fieldset class="buttons">

				{% block buttons %}{% endblock %}

					<input class="submit" name="commit" type="submit" value="{{block('commit_text')}}" />

		</fieldset>

</form>

Fix Add/Edit form for latest version of Mercury

{% form_theme form 'KoalaContentBundle:Form:fields.html.twig' %}

<form action="{{block('action')}}" method="post" {{ form_enctype(form) }} class="mercury-form" style="width: 600px">

			<fieldset class="inputs">
				<legend>Page options</legend>

				    {{ form_errors(form) }}
					{{form_row(form.parent)}}
					{{form_row(form.menuTitle)}}
					{{form_row(form.url)}}
					{{form_row(form.slug)}}
					{{form_row(form.layout)}}

			</fieldset>
			{{form_rest(form)}}

		<fieldset class="buttons">

				{% block buttons %}{% endblock %}

					<input class="submit" name="commit" type="submit" value="{{block('commit_text')}}" />

		</fieldset>

</form>


{#
/**
 * @file
 * Theme override to display a block.
 *
 * Available variables:
 * - plugin_id: The ID of the block implementation.
 * - label: The configured label of the block if visible.
 * - configuration: A list of the block's configuration values.
 *   - label: The configured label for the block.
 *   - label_display: The display settings for the label.
 *   - provider: The module or other provider that provided this block plugin.
 *   - Block plugin specific settings will also be stored here.
 * - content: The content of this block.
 * - attributes: array of HTML attributes populated by modules, intended to
 *   be added to the main container tag of this template.
 *   - id: A valid HTML ID and guaranteed unique.
 * - title_attributes: Same as attributes, except applied to the main title
 *   tag that appears in the template.
 * - title_prefix: Additional output populated by modules, intended to be
 *   displayed in front of the main title tag that appears in the template.
 * - title_suffix: Additional output populated by modules, intended to be
 *   displayed after the main title tag that appears in the template.
 *
 * @see template_preprocess_block()
 */
#}


{% block benefits %}

{{section.acf_block_title}}

    {{section.acf_block_content}}
    {% if benefits %}

        {% for benefit in benefits %}

{{loop.index}}. {{benefit.post_title}}

{{benefit.post_content|wpautop}}

        {% endfor %}

    {% endif %}

{% endblock %}

Add post title as class

{% block benefits %}

{{section.acf_block_title}}

    {{section.acf_block_content}}
    {% if benefits %}

        {% for benefit in benefits %}

              {% if benefit.acf_benefit_illustration %}

              {% endif %}

{{loop.index}}. {{benefit.post_title}}

{{benefit.post_content | wpautop}}

        {% endfor %}

    {% endif %}

{% endblock %}


    {##}

                    {{ tip.translation(app.request.locale).content }}

Use alert instead of label. Clean up layout.

        {{ tip.translation(app.request.locale).content }}

            <button type="button" class="close" data-dismiss="alert" style="margin-left: 1em">×</button>


{% form_theme form '@SyliusUi/Form/theme.html.twig' %}

        {{ sylius_template_event('sylius.admin.login.before_form', {'form': form}) }}

        {{ sylius_template_event('sylius.admin.login.logo', _context) }}

        {{ sylius_template_event('sylius.admin.login.error', _context) }}

        {{ form_start(form, {'action': action|default('/'), 'attr': {'class': 'ui large loadable form', 'novalidate': 'novalidate'}}) }}

                {{ sylius_template_event('sylius.admin.login.form.content', _context) }}

        {{ form_end(form) }}

Use already created event in login form

{% form_theme form '@SyliusUi/Form/theme.html.twig' %}

        {{ sylius_template_event('sylius.admin.login.before_form', _context) }}

        {{ form_start(form, {'action': action|default('/'), 'attr': {'class': 'ui large loadable form', 'novalidate': 'novalidate'}}) }}

                {{ sylius_template_event('sylius.admin.login.form.content', _context) }}

        {{ form_end(form) }}


{% extends "base.twig" %}

{% block content %}
    {% if post.parent %}
        <svg class="icon icon-chevron-left animated"><use xlink:href="#icon-chevron-left"></use></svg>
    {% endif %}

{{ post.title }}

        {% if post.get_children(['page']) %}

            {% for child in post.get_children(['page']) %}

{{ child.title }}

            {% endfor %}

        {% endif %}

{% endblock content %}

Change back button to go back in history.


{% extends "GameScoreBundle::layout.html.twig" %}

{% block title %}
    Auteur : [{{ author.getId() }}] - {{ parent() }}
{% endblock %}

{% block rightside %}
    Auteurs populaires :
{% endblock %}

{% block mainsection %}

Auteur : {{ author.firstname ~ ' ' ~ author.lastname }}

...

        Maj

{% endblock %}

Update : use of btn class for update in author view

{% extends "GameScoreBundle::layout.html.twig" %}

{% block title %}
    Auteur : [{{ author.getId() }}] - {{ parent() }}
{% endblock %}

{% block rightside %}
    Auteurs populaires :
{% endblock %}

{% block mainsection %}

Auteur : {{ author.firstname ~ ' ' ~ author.lastname }}
        {{ 'update'|trans|capitalize }}

{% endblock %}


{% set lowestTopChild = adminmenu.lowestTopChild %}
{% set navigationChildren = lowestTopChild.navigationChildren %}

{% if lowestTopChild and navigationChildren | length > 0 %}

            <form id="treeform">
        	    <input type="text" id="searchVal" value="" />
        	    <button id="search" class="btn search"></button>
            </form>

                {% set currentMenuItem = adminmenu.current %}

{{ lowestTopChild.internalname | trans }}

                		{% for menuitem in navigationChildren %}
                            {% include 'KunstmaanAdminBundle:Default:rectreeview.html.twig' %}
                        {% endfor %}

{% endif %}

Fix when lowestTopChild does not exist

{% set lowestTopChild = adminmenu.lowestTopChild %}
{% if lowestTopChild %}
    {% set navigationChildren = lowestTopChild.navigationChildren %}
{% endif %}

{% if lowestTopChild and navigationChildren | length > 0 %}

            <form id="treeform">
        	    <input type="text" id="searchVal" value="" />
        	    <button id="search" class="btn search"></button>
            </form>

                {% set currentMenuItem = adminmenu.current %}

{{ lowestTopChild.internalname | trans }}

                		{% for menuitem in navigationChildren %}
                            {% include 'KunstmaanAdminBundle:Default:rectreeview.html.twig' %}
                        {% endfor %}

{% endif %}


                Made with  by Wanjee.

                {% include 'partial/social.html.twig' %}

Fix footer alignment on mobile


---
section: documentation
sectiontitle: Developer Docs
permalink: /documentation/developer/bzfs_api/events/
title: bzfs API Events
parent:
---

{% extends "_layouts/page-sidebar.html.twig" %}

{% set events = collections.bzfs_api_events | group('category') %}
{% set categories = events | keys | sort %}

{% block aside %}

Categories

            {% for category in categories %}

{{ category }}

            {% endfor %}

{% endblock %}

{% block content %}

BZFS API Events

These API events are bzfs callbacks that plugins can listen for in response to specific actions or changes in the state of the server. Events exist for nearly all actions that occur during a game of BZFlag.

    {% for category in categories %}

{{ category }}

            {% for event in events[category] | order('filename') %}

                        {{- event.basename -}}()

            {% endfor %}

    {% endfor %}
{% endblock %}

Remove the parentheses from the event names.

---
section: documentation
sectiontitle: Developer Docs
permalink: /documentation/developer/bzfs_api/events/
title: bzfs API Events
parent:
---

{% extends "_layouts/page-sidebar.html.twig" %}

{% set events = collections.bzfs_api_events | group('category') %}
{% set categories = events | keys | sort %}

{% block aside %}

Categories

            {% for category in categories %}

{{ category }}

            {% endfor %}

{% endblock %}

{% block content %}

BZFS API Events

These API events are bzfs callbacks that plugins can listen for in response to specific actions or changes in the state of the server. Events exist for nearly all actions that occur during a game of BZFlag.

    {% for category in categories %}

{{ category }}

            {% for event in events[category] | order('filename') %}

                        {{- event.basename -}}

            {% endfor %}

    {% endfor %}
{% endblock %}


{% extends 'base.html.twig' %}

{% block body %}

    <?php $connected = true; ?>

                Vous êtes connecté aux palteformes suivantes:

            {{ include('account/login.html.twig') }}
            {{ include('account/connexion.html.twig') }}

{% endblock %}

{% block stylesheets %}
    {{ parent() }}
    <link rel="stylesheet" href="{{ asset('css/account.css') }}" />
{% endblock %}

{% block javascripts %}
    {{ parent() }}

{% endblock %}

FIX bug on account index

{% extends 'base.html.twig' %}

{% block body %}

    <?php $connected = true; ?>

                Vous êtes connecté aux palteformes suivantes:

{% endblock %}

{% block stylesheets %}
    {{ parent() }}
    <link rel="stylesheet" href="{{ asset('css/account.css') }}" />
{% endblock %}

{% block javascripts %}
    {{ parent() }}

{% endblock %}


<!DOCTYPE html>

	<meta charset="{{ site.charset }}">
	<meta http-equiv="x-ua-compatible" content="ie=edge">
	<meta name="description" content="{{ site.description }}">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="author" content="Yes We Work - http://yeswework.com/">
	{{ function('wp_head') }}

	{% block header %}

			{{ site.name }}

Main menu

					{% for item in menus.main.get_items %}

{{ item.title }}

					{% endfor %}

	{% endblock %}

	{% block content %}

	{% endblock %}

	{% block footer %}

			{{ function('wp_footer') }}

	{% endblock %}

Convert HTML to extended (BEML) format


{% extends '::base.html.twig' %}

{% block metaTitle %}
  All tickets - {{ parent() }}
{% endblock %}

{% block title %}Viewing all tickets{% endblock %}

{% block content %}
  {% for ticket in tickets %}

{{ ticket.title }}

{{ ticket.created_at }}

{{ ticket.description }}

  {% endfor %}
{% endblock %}


{% extends "layout.html.twig" %}

{% block title %}Home{% endblock %}

{% block content %}
{% for article in articles %}

{{ article.title }}

{{ article.content }}

{% endfor %}
{% endblock %}

Add route name for article details


{% extends "CanalTPMttBundle::base.html.twig" %}

{% block container %}

                {% block left_menu %}
                    {{ render(controller('CanalTPMttBundle:Default:navigation', { 'externalNetworkId': externalNetworkId, 'current_route': current_route, 'current_season': selectedSeason.id })) }}
                {% endblock %}

            {% block main_content %}
            {% endblock %}

{% endblock %}

FIX current season was lost when using left menu

{% extends "CanalTPMttBundle::base.html.twig" %}

{% block container %}

                {% block left_menu %}
                    {{ render(controller('CanalTPMttBundle:Default:navigation', { 'externalNetworkId': externalNetworkId, 'current_route': current_route, 'current_season': currentSeasonId })) }}
                {% endblock %}

            {% block main_content %}
            {% endblock %}

{% endblock %}


{% extends 'base.html.twig' %}

{% block body %}
    {% for flashMessage in app.session.flashbag.get('winner') %}
        <div>
            {{ flashMessage }}
        </div>
    {% endfor %}
    {{ form_start(form) }}
    {{ form_widget(form) }}
    <input type="submit" value="Submit">
    {{ form_end(form) }}
{% endblock %}

Make the grid look a little like a tic-tac-toe grid

{% extends 'base.html.twig' %}

{% block body %}
    {% for flashMessage in app.session.flashbag.get('winner') %}

            {{ flashMessage }}

    {% endfor %}
    {{ form_start(form) }}

            {{ form_widget(form.sq0) }}
            {{ form_widget(form.sq1) }}
            {{ form_widget(form.sq2) }}

            {{ form_widget(form.sq3) }}
            {{ form_widget(form.sq4) }}
            {{ form_widget(form.sq5) }}

            {{ form_widget(form.sq6) }}
            {{ form_widget(form.sq7) }}
            {{ form_widget(form.sq8) }}

    {{ form_rest(form) }}
    <input type="submit" value="Submit">
    {{ form_end(form) }}
{% endblock %}


{% extends '_layouts/base.html.twig' %}

{% block content_root %}
    <main class="container background-dark s-documentation">
        <div class="py-3 px-md-3">
            {% block content %}{% endblock %}
        </div>
    </main>
{% endblock %}

Allow regular pages to be "editable"

{% extends '_layouts/base.html.twig' %}

{% block content_root %}
    <main class="container background-dark s-documentation">
        <div class="py-3 px-md-3">
            {% block content %}{% endblock %}
        </div>

        {% if this.editable %}
            {% include "_includes/edit_me.html.twig" %}
        {% endif %}
    </main>
{% endblock %}


{% if app['google.analytics.id'] %}
    <script type="text/javascript">
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', '{{ app["google.analytics.id"] }}']);
        _gaq.push(['_trackPageview']);

        (function(){
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();
    </script>
{% endif %}

Check for Google Analytics key with isset()

{% if app['google.analytics.id']|default(false) %}
    <script type="text/javascript">
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', '{{ app["google.analytics.id"] }}']);
        _gaq.push(['_trackPageview']);

        (function(){
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();
    </script>
{% endif %}


{% extends "GitonomyFrontendBundle::layout.html.twig" %}

{% block title 'Welcome to Gitonomy' %}

{% block content %}

{{ gitonomy.name }}

{{ gitonomy.baseline }}

            Connect
            {% if gitonomy.open_registration%}
                Register
            {% endif %}

{% endblock %}

Change the homepage for connected user

{% extends "GitonomyFrontendBundle::layout.html.twig" %}

{% block title 'Welcome to Gitonomy' %}

{% block content %}

        {% if is_granted('AUTHENTICATED') %}

You are connected! Quick! Navigate with the menu!

        {% else %}

{{ gitonomy.name }}

{{ gitonomy.baseline }}

                Connect
                {% if gitonomy.open_registration%}
                    Register
                {% endif %}

        {% endif %}

{% endblock %}


<script type="text/javascript" src="http://platform.twitter.com/anywhere.js?id={{ config.keys.key }}"></script>
<script type="text/javascript">
//twttr.anywhere(function (T) {
//    if (T.isConnected()) {
//        currentUser = T.currentUser;
//    }
//});
</script>


{% extends 'AppBundle:Default:base.html.twig' %}
{% block body %}

{{ 'Organizations' | trans }}

        {% if organizations is not empty %}
        {% set last_initial = '' %}
        {% for organization in organizations %}
            {% set name = organization.nameLocalized(app.request.locale) %}
            {% set initial = name|first|upper %}
            {% if initial != last_initial %}
                {% if last_initial != '' %}

                {% endif %}

{{ initial }}

            {% set last_initial = initial %}

            {% endif %}

                {{ name }}

        {% endfor %}

        {% else %}
            Es wurden keine Organisationen gefunden
        {% endif %}

{% endblock %}

Adjust initial as long as we don't localize sort

{% extends 'AppBundle:Default:base.html.twig' %}
{% block body %}

{{ 'Organizations' | trans }}

        {% if organizations is not empty %}
        {% set last_initial = '' %}
        {% for organization in organizations %}
            {% set name = organization.nameLocalized(app.request.locale) %}
            {# TODO: sort in solr and move to name|first|upper #}
            {% set initial = slugify.slugify(organization.name)|first|upper %}
            {% if initial != last_initial %}
                {% if last_initial != '' %}

                {% endif %}

{{ initial }}

            {% set last_initial = initial %}

            {% endif %}

                {{ name }}

        {% endfor %}

        {% else %}
            Es wurden keine Organisationen gefunden
        {% endif %}

{% endblock %}


{% if optionList is defined %}
<style>

	.bgdSoftColorAs { background-color: #484848 }
  .borderSoftColorAs { border-color: #484848 }
  .bgdColorAs { background-color: #484848 }
  .colorAs { color:#484848 }

  {% for option in optionList %}
     {% if option.useColorForMarker or option.useIconForMarker %}
	    .bgdSoftColorAs[option-id="{{ option.id }}"] { background-color: {{ option.softColor }} }
	    .borderSoftColorAs[option-id="{{ option.id }}"] { border-color: {{ option.softColor }} }
	    .bgdColorAs[option-id="{{ option.id }}"] { background-color: {{ option.color }} }
	    .colorAs[option-id="{{ option.id }}"] { color: {{ option.color }} }
    {% endif %}
  {% endfor %}
</style>
{% endif %}

Change condition to generate option colorisation

{% if optionList is defined %}
<style>

	.bgdSoftColorAs { background-color: #484848 }
  .borderSoftColorAs { border-color: #484848 }
  .bgdColorAs { background-color: #484848 }
  .colorAs { color:#484848 }

  {% for option in optionList %}
     {% if option.icon or option.softColor %}
	    .bgdSoftColorAs[option-id="{{ option.id }}"] { background-color: {{ option.softColor }} }
	    .borderSoftColorAs[option-id="{{ option.id }}"] { border-color: {{ option.softColor }} }
	    .bgdColorAs[option-id="{{ option.id }}"] { background-color: {{ option.color }} }
	    .colorAs[option-id="{{ option.id }}"] { color: {{ option.color }} }
    {% endif %}
  {% endfor %}
</style>
{% endif %}


{% extends "base/class.php.twig" %}

{% block file_path %}
Drupal\{{module_name}}\Command\{{ name.class }}.
{% endblock %}

{% block namespace_class %}
namespace Drupal\{{module_name}}\Command;
{% endblock %}

{% block use_class %}
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
{% endblock %}

{% block class_declaration %}
class {{ name.class }} extends Command
{% endblock %}

{% block class_methods %}
  /**
   * {@inheritdoc}
   */
  protected function configure() {
    $this
      ->setName('{{ command }}')
      ->setDescription('Greet someone')
      ->addArgument('name', InputArgument::OPTIONAL, 'Who do you want to greet?')
      ->addOption('yell', NULL, InputOption::VALUE_NONE, 'If set, the task will yell in uppercase letters');
  }

  /**
   * {@inheritdoc}
   */
  protected function execute(InputInterface $input, OutputInterface $output) {
    $name = $input->getArgument('name');
    if ($name) {
      $text = 'Hello ' . $name;
    }
    else {
      $text = 'Hello';
    }

    if ($input->getOption('yell')) {
      $text = strtoupper($text);
    }

    $output->writeln($text);
  }
{% endblock %}

Make command extends from ContainerAwareCommand

{% extends "base/class.php.twig" %}

{% block file_path %}
Drupal\{{module_name}}\Command\{{ name.class }}.
{% endblock %}

{% block namespace_class %}
namespace Drupal\{{module_name}}\Command;
{% endblock %}

{% block use_class %}
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Drupal\AppConsole\Command\ContainerAwareCommand;
{% endblock %}

{% block class_declaration %}
class {{ name.class }} extends ContainerAwareCommand
{% endblock %}

{% block class_methods %}
  /**
   * {@inheritdoc}
   */
  protected function configure() {
    $this
      ->setName('{{ command }}')
      ->setDescription('Greet someone')
      ->addArgument('name', InputArgument::OPTIONAL, 'Who do you want to greet?')
      ->addOption('yell', NULL, InputOption::VALUE_NONE, 'If set, the task will yell in uppercase letters');
  }

  /**
   * {@inheritdoc}
   */
  protected function execute(InputInterface $input, OutputInterface $output) {
    $name = $input->getArgument('name');
    if ($name) {
      $text = 'Hello ' . $name;
    }
    else {
      $text = 'Hello';
    }

    if ($input->getOption('yell')) {
      $text = strtoupper($text);
    }

    $output->writeln($text);
  }
{% endblock %}


{% extends 'VlRadRestBundle:Default:skeleton.html.twig' %}
{% block radrest_content %}

View

            {% for key in data|radrest_object_keys %}

{{ key|humanize }}

{{ attribute(data, key)|radrest_object_stringify }}

            {% endfor %}

    {% include 'VlRadRestBundle:Default:links.html.twig' %}
{% endblock %}

Allow default get view to show elements in an array

{% extends 'VlRadRestBundle:Default:skeleton.html.twig' %}
{% block radrest_content %}

View

            {% for key in data|radrest_object_keys %}

{{ key|humanize }}

                {% if attribute(data, key)|radrest_object_stringify == '(Array)' %}

                        {% for elem in attribute(data, key) %}
                            {{ elem|radrest_object_stringify }}

                        {% else %}
                            None
                        {% endfor %}

                {% else %}

{{ attribute(data, key)|radrest_object_stringify }}

                {% endif %}
            {% endfor %}

    {% include 'VlRadRestBundle:Default:links.html.twig' %}
{% endblock %}


{% extends "IntractoSecretSantaBundle::base.html.twig" %}
{% block main %}

Only 1 step to go

		To prevent abuse, we need the list administrator ({{ pool.ownername }}) to confirm his email. We've sent a mail to {{ pool.owneremail }} with further instructions.

		Once confirmed your Secret Santa list will be scrambled and all users will receive your message along with the person they're in charge off buying a present.

		In the confirmation email the list administrator will also find a link to keep track of all users in this list who've already found out which person they'll be in charge off, making sure every Secret Santa knows his duty.

{% endblock %}

Debug code added, manage page now visible in dev env

{% extends "IntractoSecretSantaBundle::base.html.twig" %}
{% block main %}

Only 1 step to go

		To prevent abuse, we need the list administrator ({{ pool.ownername }}) to confirm his email. We've sent a mail to {{ pool.owneremail }} with further instructions.

		Once confirmed your Secret Santa list will be scrambled and all users will receive your message along with the person they're in charge off buying a present.

		In the confirmation email the list administrator will also find a link to keep track of all users in this list who've already found out which person they'll be in charge off, making sure every Secret Santa knows his duty.

{% if app.debug %}

Debug mode:

			Manage pool page (url: {{ pool.listurl }})

		{% endif %}
{% endblock %}


<img src="{{ src }}" {% if width > 0 %}width="{{ width }}"{% endif %} {% if height > 0 %}height="{{ height }}"{% endif %} title="{{ title }}" alt="{{ title }}">

Add data id to template

<img data-media-id="{{ media.id }}" src="{{ src }}" {% if width > 0 %}width="{{ width }}"{% endif %} {% if height > 0 %}height="{{ height }}"{% endif %} title="{{ title }}" alt="{{ title }}">


{% trans_default_domain 'admin' %}

{% import _self as breadcrumbs %}

{% macro render_crumb_link(url, title) %}
    {{ title | trans }}
{% endmacro %}

{% macro render_crumb(crumb, route_type, title) %}
    {% import _self as breadcrumbs %}

    {{ breadcrumbs.render_crumb_link(
        admin_path(
            crumb.entity,
            route_type,
            crumb.meta.parent ? { (crumb.meta.parent.associationParameterName): app.request.query.get(crumb.meta.parent.associationParameterName) } : {}
        ),
        title
    ) }}
{% endmacro %}

    {{ breadcrumbs.render_crumb_link(path('darvin_admin_homepage'), 'homepage.action.homepage.link') }}
    {% if menu_group %}{{ ('menu.group.' ~ menu_group ~ '.title') | trans }}{% endif %}
    {% for crumb in crumbs %}
        {{ breadcrumbs.render_crumb(
            crumb,
            constant('Darvin\\AdminBundle\\Route\\AdminRouter::TYPE_INDEX'),
            crumb.meta.baseTranslationPrefix ~ 'action.index.link'
        ) }}
        {% if not loop.last or render_last %}
            {{ breadcrumbs.render_crumb(crumb, entity_route, crumb.entity) }}
        {% endif %}
    {% endfor %}

Allow empty route types in breadcrumbs template.

{% trans_default_domain 'admin' %}

{% import _self as breadcrumbs %}

{% macro render_crumb_link(url, title) %}
    {{ title | trans }}
{% endmacro %}

{% macro render_crumb_span(title) %}
    {{ title | trans }}
{% endmacro %}

{% macro render_crumb(crumb, route_type, title) %}
    {% import _self as breadcrumbs %}

    {% if not route_type %}
        {{ breadcrumbs.render_crumb_span(title) }}
    {% else %}
        {{ breadcrumbs.render_crumb_link(
            admin_path(
                crumb.entity,
                route_type,
                crumb.meta.parent ? { (crumb.meta.parent.associationParameterName): app.request.query.get(crumb.meta.parent.associationParameterName) } : {}
            ),
            title
        ) }}
    {% endif %}
{% endmacro %}

    {{ breadcrumbs.render_crumb_link(path('darvin_admin_homepage'), 'homepage.action.homepage.link') }}
    {% if menu_group %}{{ breadcrumbs.render_crumb_span('menu.group.' ~ menu_group ~ '.title') }}{% endif %}
    {% for crumb in crumbs %}
        {{ breadcrumbs.render_crumb(
            crumb,
            constant('Darvin\\AdminBundle\\Route\\AdminRouter::TYPE_INDEX'),
            crumb.meta.baseTranslationPrefix ~ 'action.index.link'
        ) }}
        {% if not loop.last or render_last %}
            {{ breadcrumbs.render_crumb(crumb, entity_route, crumb.entity) }}
        {% endif %}
    {% endfor %}


Transform the rabbit config into templates

#!/bin/sh
set -e

ROOT_PATH="$( cd "$( dirname "$0" )" && pwd )"

echo "# Enable rabbitmq_management plugin"
rabbitmq-plugins enable rabbitmq_management

if ! type "rabbitmqadmin" > /dev/null
then
    echo "# Installing rabbitmqadmin"
    curl -X GET http://127.0.0.1:15672/cli/rabbitmqadmin > /usr/local/bin/rabbitmqadmin
    chmod +x /usr/local/bin/rabbitmqadmin
fi

echo "# Importing mapping"
rabbitmqadmin import "$ROOT_PATH/config-rabbit.json"


@name = user_impersonate
@entityName = Oro\Bundle\UserBundle\Entity\User
@subject = Impersonation
@isSystem = 1
@isEditable = 1

            Hi, {{ entity|oro_format_name }},

                Please be aware that you’ve been impersonated in order to get access to the system. If this happened
                without your consent, please contact your system administrator.

Access to the application on behalf of the user

@name = user_impersonate
@entityName = Oro\Bundle\UserBundle\Entity\User
@subject = Impersonation
@isSystem = 1
@isEditable = 1

            Hi, {{ entity|oro_format_name }},

                You have been impersonated. This means another user has accessed the system under your profile&emdash;most likely they are troubleshooting an issue you have reported. However, if it isn’t the case, please contact your system administrator immediately.


{#
  variables that are available:
  - {{ isLoggedIn }}
  - {{ profile }}: only available when logged in
#}

{% if isLoggedIn %}
  {{ 'msg.ProfilesLoggedInAs'|trans|format(profile.display_name, profile.url.dashboard)|raw }}
{% endif %}

{% if not isLoggedIn %}
  {{ 'lbl.Login'|trans|ucfirst }}
{% endif %}

Use If else statement instead of 2 if statements

{#
  variables that are available:
  - {{ isLoggedIn }}
  - {{ profile }}: only available when logged in
#}

{% if isLoggedIn %}
  {{ 'msg.ProfilesLoggedInAs'|trans|format(profile.display_name, profile.url.dashboard)|raw }}
{% else %}
  {{ 'lbl.Login'|trans|ucfirst }}
{% endif %}


{% extends 'QaSystemCoreBundle::base.html.twig' %}

{% block headline %}Project{% endblock %}

{% block content_content %}

        Back to the list

        Edit

    {# @TODO: ugly hack #}

                    Id
                    {{ entity.id }}

                    Name
                    {{ entity.name }}

                    Uri
                    {{ entity.uri }}

        {{ form(delete_form) }}

{% endblock %}

Fix bug after PR reintegration The project detail view was trying to access a removed attribute

{% extends 'QaSystemCoreBundle::base.html.twig' %}

{% block headline %}Project{% endblock %}

{% block content_content %}

        Back to the list

        Edit

    {# @TODO: ugly hack #}

                    Id
                    {{ entity.id }}

                    Name
                    {{ entity.name }}

        {{ form(delete_form) }}

{% endblock %}


{% if record %}
    {% set suffix = '-' ~ record.id %}
{% else %}
    {% set suffix = '' %}
{% endif %}
<input
    type="range"
    min="0" max="{{ max }}"
    value="0"
    step="{{ inc }}"
    id="boltrateit{{ suffix }}"/>
<div
    class="rateit {{ config['class'] }}"
    data-bolt-record-id="{{ record.id|default('') }}"
    data-rateit-backingfld="#boltrateit{{ suffix }}"
    data-rateit-starwidth="{{ config['px'] }}"
    data-rateit-starheight="{{ config['px'] }}"
    {% if readonly %}
    data-rateit-readonly="true"
    {% endif %}
    data-bolt-record-id="{{ bolt_record_id }}"
    data-bolt-contenttype="{{ bolt_contenttype }}"
    data-bolt-rateit-value="{{ current_val }}">
</div>
<div
    class="{{ config['response_class'] }}"
    id="rateit_response{{ suffix }}"
    hidden >
</div>

Duplicate attribute in RateIt HTML output fixed.

{% if record %}
    {% set suffix = '-' ~ record.id %}
{% else %}
    {% set suffix = '' %}
{% endif %}
<input
    type="range"
    min="0" max="{{ max }}"
    value="0"
    step="{{ inc }}"
    id="boltrateit{{ suffix }}"/>
<div
    class="rateit {{ config['class'] }}"
    data-bolt-record-id="{{ record.id|default('') }}"
    data-rateit-backingfld="#boltrateit{{ suffix }}"
    data-rateit-starwidth="{{ config['px'] }}"
    data-rateit-starheight="{{ config['px'] }}"
    {% if readonly %}
    data-rateit-readonly="true"
    {% endif %}
    data-bolt-contenttype="{{ bolt_contenttype }}"
    data-bolt-rateit-value="{{ current_val }}">
</div>
<div
    class="{{ config['response_class'] }}"
    id="rateit_response{{ suffix }}"
    hidden >
</div>


Create an empty layout for basic user interaction

{% extends '::empty.html.twig' %}

{% block main -%}

            {% block header_title %}
            {% endblock %}

          {{ include('SumoCodersFrameworkCoreBundle::notifications.html.twig') }}

          {% block sumocoders_multi_user_content %}
          {% endblock sumocoders_multi_user_content %}

{% endblock %}


{% extends "base.twig" %}
{% block title %}Résumé{% endblock %}
{% block content %}

Spencer Rinehart
Web Programmer and DevOps Engineer

Summary of Qualifications

Work Experience

Web Programmer Dominion Enterprises

Location

Norfolk, Virginia

Time

June 2006–Present

Education

Computer Science Virginia Tech

Location

Blackbsurg, Virginia

Time

August 2003–May 2006

{% endblock %}

Add blurbs about VT and DE.

{% extends "base.twig" %}
{% block title %}Résumé{% endblock %}
{% block content %}

Spencer Rinehart
Web Programmer and DevOps Engineer

Summary of Qualifications

Work Experience

Web Programmer Dominion Enterprises

Worked for a variety of web applications, backend processes, APIs, and DevOps/Systems applications.  Primarily a PHP software engineer with a focus on APIs and core functionality.  Secondary roles focused on release management and server/process automation.  Instrumental in introducing version control, including Git (via Github) and previously Subversion.  I also had years of experience working with HTML, CSS/Less, JavaScript, Ruby, Puppet, Chef, Linux, Solaris, Oracle, MongoDB, SOLR, Python, and Coldfusion.

Location

Norfolk, Virginia

Time

June 2006–Present

Education

Computer Science Virginia Tech

Received a B.S. in Computer Science.  Gained experience in C++, C#, and PHP; and in Linux systems.

Location

Blackbsurg, Virginia

Time

August 2003–May 2006

{% endblock %}


<!DOCTYPE html>

        <meta charset="utf-8"/>
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="apple-touch-icon" href="apple-touch-icon.png">
        <link rel="home" href="{{ siteUrl }}"/>
        {% seomaticRender %}
        {% mix('styles/main.css') %}
        {{ getHeadHtml() }}

            {% include '_partials/_header' %}

                {% block content %}{% endblock %}

            {% include '_partials/footer' %}

Fix SEOMatic render hook in layout

<!DOCTYPE html>

        <meta charset="utf-8"/>
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="apple-touch-icon" href="apple-touch-icon.png">
        <link rel="home" href="{{ siteUrl }}"/>
        {% hook 'seomaticRender' %}
        {% mix('styles/main.css') %}
        {{ getHeadHtml() }}

            {% include '_partials/_header' %}

                {% block content %}{% endblock %}

            {% include '_partials/footer' %}


{% extends 'base.html.twig' %}
{% set page_title = 'Logi: rozmowy' %}
{% block content_class_name %}logs-chats{% endblock %}

{% block content %}
    {{ parent() }}

    Daty są datami zamieszczenia logów na stronie a nie datami logowania.

    {% for dateLogs in chats %}
        <time class="title timeago" datetime="{{ dateLogs['date'] }}" id="{{ dateLogs['date']|date('Y-m-d') }}">{{ dateLogs['date']|localizeddate('full', 'none', 'pl')|capitalize }}</time>
        ¶

            {% for filename,title in dateLogs['logs'] %}

{{ title }}

            {% endfor %}

    {% endfor %}
{% endblock %}

Fix logs/chats view when there's no log available.

{% extends 'base.html.twig' %}
{% set page_title = 'Logi: rozmowy' %}
{% block content_class_name %}logs-chats{% endblock %}

{% block content %}
    {{ parent() }}

    {% if chats|length > 0 %}
        Daty są datami zamieszczenia logów na stronie a nie datami logowania.

        {% for dateLogs in chats %}
            <time class="title timeago" datetime="{{ dateLogs['date'] }}" id="{{ dateLogs['date']|date('Y-m-d') }}">{{ dateLogs['date']|localizeddate('full', 'none', 'pl')|capitalize }}</time>
            ¶

                {% for filename,title in dateLogs['logs'] %}

{{ title }}

                {% endfor %}

        {% endfor %}
    {% else %}
        Brak logów.
    {% endif %}
{% endblock %}


{% if admin.hasAjouterAccess is defined %}

	{% if admin.hasRoute('create') and admin.isGranted('CREATE') and admin.hasAjouterAccess() %}
	    {{ 'link_action_create'|trans({}, 'SonataAdminBundle') }}
	{% endif %}

{% else %}

	{% if admin.hasRoute('create') and admin.isGranted('CREATE') %}
	    {{ 'link_action_create'|trans({}, 'SonataAdminBundle') }}
	{% endif %}
{% endif %}

{% if virement_form is defined and virement_form %}

{% include 'ApplicationSonataClientBundle::Form/form_virement.html.twig' with {'form': virement_form} %}
{% endif %}

Remove rules to hide ajouter button.

{% if admin.hasRoute('create') and admin.isGranted('CREATE') %}
    {{ 'link_action_create'|trans({}, 'SonataAdminBundle') }}
{% endif %}

{% if virement_form is defined and virement_form %}

{% include 'ApplicationSonataClientBundle::Form/form_virement.html.twig' with {'form': virement_form} %}
{% endif %}


                •
                •
                •
                •
                •
                •
                •
                •
                •
                •
                •
                •
                {{ user_summary.stripeCustomer.activeCard.last4 }}
                expiring {{ card_expiry_month }} {{ user_summary.stripeCustomer.activeCard.expiryYear }}

        Change your card details

Fix 'change card details' link placement for different screen sizes


{% if action.allowAclAction %}

            {{ 'entity.list.action.acl'|trans }}

{% endif %}

Change icon for edit idp whitelist


{% extends 'GeekhubResourceBundle::layout.html.twig' %}

{% block content %}

    {{ include('GeekhubDreamBundle:includes:homePageSlider.html.twig', {completedDreams: completedDreams}) }}

{% endblock %}
{% block javascript %}
    {{ parent() }}

{% endblock %}

Sort dreams at homepage by favoriteCout


{% extends 'MunicipalesBundle:theme:layout.html.twig' %}

{% block title %}{{ 'census.step_verify.html_title'|trans }}{% endblock %}
{% from 'MunicipalesBundle:macros:steps.html.twig' import steps_widget %}
{% form_theme form 'MunicipalesBundle:theme:forms.html.twig' %}

{% block content %}

{{ 'home.step_h2'|trans }} 1

 {{ 'census.step_conditions.h1_title'|trans }}

        {{ form_start(form, { 'attr': {'class': 'form_settings'}}) }}

                  {{ steps_widget(4) }}

				  {% if not form.vars.valid and form.vars.errors|length > 0 %}

                          <button data-dismiss="alert" class="close" type="button">

                          </button>
                          {{ form_errors(form) }}

                  {% endif %}

{{ 'census.step_verify.h1_title'|trans }}

						{{ 'census.verify_msg'|trans({'%sms_inbound_number%': sms_inbound_number}) }}

						{{ 'census.verify_extra'|trans }}

				  <button class="btn btn-prev" onclick="location.href='{{ path('municipales_census_step1') }}'; return false;">

                    {{ 'census.step_verify.previous'|trans }}
                  </button>

                  {{ form_widget(form.continue, { 'label': 'census.step_verify.continue'|trans|raw, 'attr' : { 'class' : 'submit btn btn-success btn-next'} }) }}

        {{ form_rest(form) }}

			  {{ form_end(form) }}

{% endblock %}


<?php

namespace Drupal\{{module}}\Controller;

{% if services is defined %}
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
{% set params = '' %}
{% for service in services %}use {{ service.class }};
{% set params = params ~ service.short ~ ' $' ~ service.machine_name %}
{% if loop.last == false %}
{% set params = params ~ ', '%}
{% endif %}
{% endfor %}
{% endif %}

class {{ name }} {% if services is defined%}implements ContainerInjectionInterface {% endif %}{

{% if services is defined %}
{% for service in services %}
  protected ${{service.machine_name}};
{% endfor %}

  public function __constructor({{params}}) {
{% for service in services %}
    $this->{{service.machine_name}} = ${{service.machine_name}};
{% endfor %}
  }

  public static function create(ContainerInterface $container){
    return new static(
{% for service in services %}
      $container->get('{{service.name}}'),
{% endfor %}
    );
  }
  {% endif %}

  /**
   * helloAction
   * @param  string $name Get
   * @return [type]       [description]
   */
  public function helloAction($name) {
    return "Hello" . $name . "!";
  }
}

Remove comma on last injected service

<?php

namespace Drupal\{{module}}\Controller;

{% if services is defined %}
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
{% set params = '' %}
{% for service in services %}use {{ service.class }};
{% set params = params ~ service.short ~ ' $' ~ service.machine_name %}
{% if loop.last == false %}
{% set params = params ~ ', '%}
{% endif %}
{% endfor %}
{% endif %}

class {{ name }} {% if services is defined%}implements ContainerInjectionInterface {% endif %}{

{% if services is defined %}
{% for service in services %}
  protected ${{service.machine_name}};
{% endfor %}

  public function __constructor({{params}}) {
{% for service in services %}
    $this->{{service.machine_name}} = ${{service.machine_name}};
{% endfor %}
  }

  public static function create(ContainerInterface $container){
    return new static(
{% for service in services %}
      $container->get('{{service.name}}'){% if loop.last == false %},{% endif %}
{% endfor %}
    );
  }
  {% endif %}

  /**
   * helloAction
   * @param  string $name Get
   * @return [type]       [description]
   */
  public function helloAction($name) {
    return "Hello " . $name . "!";
  }
}


{% import 'OroWorkflowBundle::macros.html.twig' as workflowMacros %}

    {% for workflow in workflows %}
        {% if workflow.stepsData.steps|length %}

{{ workflow.label|trans }}

                                {% set isOrdered = workflow.stepsData.is_ordered %}
                                {% set steps = workflow.stepsData.steps %}
                                {% for step in steps %}
                                    {% set active = step.active %}
                                    {% set possibleStepsCount = step.possibleStepsCount %}
                                    {{ step.label|trans }}
                                {% endfor %}

                                {% include 'OroWorkflowBundle::Widget/widget/button.html.twig' with {'workflow': workflow, 'entity_id': entityId} %}

        {% endif %}
    {% endfor %}

Create base workflow table - removed unnecessary condition

{% import 'OroWorkflowBundle::macros.html.twig' as workflowMacros %}

    {% for workflow in workflows %}

{{ workflow.label|trans }}

                                {% set isOrdered = workflow.stepsData.is_ordered %}
                                {% set steps = workflow.stepsData.steps %}
                                {% for step in steps %}
                                    {% set active = step.active %}
                                    {% set possibleStepsCount = step.possibleStepsCount %}
                                    {{ step.label|trans }}
                                {% endfor %}

                                {% include 'OroWorkflowBundle::Widget/widget/button.html.twig' with {'workflow': workflow, 'entity_id': entityId} %}

    {% endfor %}


{% extends "FormGenerator/modal.html.twig" %}

{% block scripts_page %}
{{ parent() }}

<script>
    $("input[name='{{typeaheadInput}}']").typeahead({
	    source: function(query, process) {
	      return $.getJSON('{{typeaheadUrl}}', { name : query}, function(data) {
		      return process(data);
	      });
	    }
    });
</script>
{% endblock %}

Change typeahead query for generic form

{% extends "FormGenerator/modal.html.twig" %}

{% block scripts_page %}
{{ parent() }}

<script>
    $("input[name='{{typeaheadInput}}']").typeahead({
	    source: function(query, process) {
	      return $.getJSON('{{typeaheadUrl}}', { input : query}, function(data) {
		      return process(data);
	      });
	    }
    });
</script>
{% endblock %}


        {% for row in table %}

                {% for template in row %}
                     1 %} rowspan="{{ template.rowspan }}"{% endif %}
                            {% if template.colspan > 1 %} colspan="{{ template.colspan }}"{% endif %}
                            {% if not template.exists %}
                                class="empty">
                            {% elseif template.large %}
                                id="templatePosition-{{ template.value }}" data-position="{{ template.value }}" class="box templatePosition">
                            {% else %}
                                >
                            {% endif %}
                        {% endspaceless %}

                        {% if not template.exists %}

                        {% elseif template.large %}

{{ template.title }}

                                                {{ 'lbl.AddBlock'|trans|capitalize }}

                        {% else %}
                            {{ template.title }}
                        {% endif %}

                {% endfor %}

        {% endfor %}

Use plus icon for button add block


<?php

namespace {{ namespace }}\Controller;

{% block use_statements %}
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
{% if 'annotation' == format -%}
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
{% endif %}
{% endblock use_statements %}

{% block class_definition %}
class DefaultController extends Controller
{% endblock class_definition %}
{
{% block class_body %}
    {% if 'annotation' == format -%}
    /**
     * @Route("/")
     * @Template()
     */
    {% endif -%}
    public function indexAction()
    {
        $request = $this->container->get('request');
        $bundleName = $request->attributes->get('_template')->get('bundle');

        {% if 'annotation' != format -%}
        return $this->render('{{ bundle }}:Default:index.html.twig', array('bundleName' => $bundleName));
        {%- else -%}
        return array('bundleName' => $bundleName);
        {%- endif %}

    }
{% endblock class_body %}
}

Add name property to default controller skeleton

<?php

namespace {{ namespace }}\Controller;

{% block use_statements %}
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
{% if 'annotation' == format -%}
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
{% endif %}
{% endblock use_statements %}

{% block class_definition %}
class DefaultController extends Controller
{% endblock class_definition %}
{
{% block class_body %}
    {% if 'annotation' == format -%}
    /**
     * @Route("/", "home")
     * @Template()
     */
    {% endif -%}
    public function indexAction()
    {
        $request = $this->container->get('request');
        $bundleName = $request->attributes->get('_template')->get('bundle');

        {% if 'annotation' != format -%}
        return $this->render('{{ bundle }}:Default:index.html.twig', array('bundleName' => $bundleName));
        {%- else -%}
        return array('bundleName' => $bundleName);
        {%- endif %}

    }
{% endblock class_body %}
}


{% extends 'KorobiWebBundle::layout.html.twig' %}

{% set page_title = 'Revisions' %}

{% block body %}

Korobi/{{ repository }}

                Revision
                Author
                Description
                When

        {% for revision in revisions %}

                {% if app.user and is_granted('ROLE_ADMIN') %}
                    {{ revision.sha|slice(0, 7) }}
                {% else %}
                    {{ revision.sha|slice(0, 7) }}
                {% endif %}
                {{ revision.commit.author.name }}
                {{ revision.commit.message }}
                {{ revision.commit.author.date|date('d/m/Y H:m:s') }}

        {% endfor %}

{% endblock %}

Fix GitHub 404 for author's profile in revisions


{% if craft.config.devMode != 1 %}
<script>
	(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
	(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
	m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
	})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

	ga('create', '{{ globalVars.googleAnalyticsProfileId }}', '{{ globalVars.siteDomain }}');
	ga('send', 'pageview');

</script>
{% endif %}

Set analytics domain to 'auto'

{% if craft.config.devMode != 1 %}
<script>
	(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
	(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
	m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
	})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

	ga('create', '{{ globalVars.googleAnalyticsProfileId }}', 'auto');
	ga('send', 'pageview');

</script>
{% endif %}


{% extends 'layout.html.twig' %}

{% block content %}

{{ title }}

<newslist>
    {% for news in newslist %}
        <news id="{{ news.id }}">
            <uparrow>▲</uparrow>

{{ news.title }}

            <address>
            {% if news | news_domain %}
                at {{ news | news_domain }}
            {% endif %}
            </address>
            <downarrow>▼</downarrow>

                {{ news.up }} up and {{ news.down }} down, posted by
                <username>{{ news.username }}</username>
                {{ news.ctime | time_elapsed }}
                {{ news.comments }} comments

        </news>
    {% endfor %}
</newslist>

{% endblock %}

Fix the generation of links for URL-less news.


{% block breadcrumb %}
{% if breadcrumb is defined and breadcrumb|length %}

    {% block breadcrumb_items %}
        {% for item in breadcrumb %}

                {% if item.url|default('')|length and item.url != app.request.requestUri %}
                    {{ item.text|trans(item.parameters|default([]), domain|default(null), locale|default(null))|capitalize }}
                {% else %}
                    {{ item.text|trans(item.parameters|default([]), domain|default(null), locale|default(null))|capitalize }}
                {% endif %}
                {% if not loop.last %}{{ separator|default('/') }}{% endif %}

        {% endfor %}
    {% endblock breadcrumb_items %}

{% endif %}
{% endblock breadcrumb %}

Add icon in breadcrumb items

{% block breadcrumb %}
{% if breadcrumb is defined and breadcrumb|length %}

    {% block breadcrumb_items %}
        {% for item in breadcrumb %}
            {% set islink = item.url|default('')|length and item.url != app.request.requestUri %}

                {% if item.icon|default('')|length %}

                {% endif %}
                {% if islink %}

                {% endif %}
                {{ item.text|trans(item.parameters|default([]), domain|default(null), locale|default(null))|capitalize }}
                {% if islink %}

                {% endif %}
                {% if not loop.last %}{{ separator|default('/') }}{% endif %}

        {% endfor %}
    {% endblock breadcrumb_items %}

{% endif %}
{% endblock breadcrumb %}


{% extends 'base.twig' %}

{% block content %}

{{ title }}

        {% if categories %}
          {% for category in categories %}

{{ category.name }}

          {% endfor %}
        {% endif %}

      {% for post in posts %}
        {% include 'post-preview.twig' %}
      {% endfor %}

{% endblock %}

Disable category tags for now

{% extends 'base.twig' %}

{% block content %}

{{ title }}

        {#{% if categories %}#}
          {#{% for category in categories %}#}
            {#
{{ category.name }}
#}
          {#{% endfor %}#}
        {#{% endif %}#}

      {% for post in posts %}
        {% include 'post-preview.twig' %}
      {% endfor %}

{% endblock %}


{% if class_name is defined %}
{{ module_name }}.{{form_id}}_form:
  path: '/{{ module_name }}/settings/{{ class_name }}'
  defaults:
    _form: '\Drupal\{{ module_name }}\Form\{{ class_name }}'
    _title: '{{ module_name }} Form'
  requirements:
    _permission: 'access administration pages'
{% endif %}

Update form route id remove post-append

{% if class_name is defined %}
{{ module_name }}.{{form_id}}:
  path: '/{{ module_name }}/settings/{{ class_name }}'
  defaults:
    _form: '\Drupal\{{ module_name }}\Form\{{ class_name }}'
    _title: '{{ module_name }} Form'
  requirements:
    _permission: 'access administration pages'
{% endif %}


Convert to Twig: SP's /admin/categories/edit

{% extends 'admin/layouts/default_sp.twig' %}
{% block title %}{{ _('I edit a category') }}{% endblock %}

{% block content %}

{{ _('I edit a category') }}

{{ _('Edit category') }}

    <form method="POST" class="admin-form">
        <input type="hidden" name="id" value="{{ req.get('id') }}"/>
        <input type="hidden" name="sig" value="{{ sig }}"/>

{{ _('Parent category') }}

                {{ input(req, 'category[parent_id]', 'select', {'options': category_parents}) }}
                {% if errors.parent_id %}
{{ errors.parent_id }}
{% endif %}

{{ _('Category name') }}

{{ input(req, 'category[name]', 'text') }}

                {% if errors.name %}
{{ errors.name }}
{% endif %}

{{ _('Sort by category') }}

                {{ input(req, 'category[category_order]', 'select', {'options': categories_model_order_list}) }}
                {% if errors.category_order %}
{{ errors.category_order }}
{% endif %}

                    <button type="submit" class="btn_contents positive touch">{{ _('Update') }}</button>

    </form>

                {{ _('I Back to List') }}

            {% if req.get('id') != 1 %}

                    {{ _('Delete') }}

            {% endif %}

{% endblock %}


        timer
        {{ entry.readingTime / app.user.config.readingSpeed|round }} min

        today
         {{ entry.createdAt|date('Y-m-d') }}

            {% if entry.isArchived == 0 %}done{% else %}redo{% endif %}
            {% if entry.isStarred == 0 %}star_border{% else %}star{% endif %}
            delete

Hide creation date in mobile view


---
title: David Buchmann
identifier: davidbu
avatar: https://miro.medium.com/fit/c/256/256/0*5ti667chDSfm_2B4
twitter: dbu
bio: Symfony CMF and working at Liip, doing PHP development. And occasionally hacking on other stuff.
use:
- posts
---

Use the same server/format as other Medium profile images

---
title: David Buchmann
identifier: davidbu
avatar: https://cdn-images-1.medium.com/fit/c/100/100/0*5ti667chDSfm_2B4
twitter: dbu
bio: Symfony CMF and working at Liip, doing PHP development. And occasionally hacking on other stuff.
use:
- posts
---


{% block tetranz_select2entity_widget %}
    {% set attr = attr|merge({
    'data-ajax--url':remote_path,
    'data-ajax--cache': cache ? 'true' : 'false',
    'data-ajax--cache-timeout': cache_timeout|default(0),
    'data-ajax--delay':delay,
    'data-ajax--data-type':"json",
    'data-language':language,
    'data-minimum-input-length':minimum_input_length,
    'data-placeholder':placeholder|trans({}, translation_domain),
    'class' : (attr.class|default('') ~ ' select2entity form-control')|trim
    }) %}

    {% if multiple %}
        {% set attr = attr|merge({'multiple':'multiple'}) %}
    {% endif %}

    {% if allow_clear %}
        {% set attr = attr|merge({'data-allow-clear': 'true'}) %}
    {% endif %}

    {% spaceless %}
        <select {{ block('widget_attributes') }}>
            {% if value is iterable %}
                {% for id, label in value %}
                    {% block tetranz_select2entity_widget_select_option %}
                        <option value="{{ id }}" selected="selected">{{ label }}</option>
                    {% endblock %}
                {% endfor %}
            {% endif %}
        </select>
    {% endspaceless %}
{% endblock %}

Append empty option if allow_clear set to true - required by select2.js

{% block tetranz_select2entity_widget %}
    {% set attr = attr|merge({
    'data-ajax--url':remote_path,
    'data-ajax--cache': cache ? 'true' : 'false',
    'data-ajax--cache-timeout': cache_timeout|default(0),
    'data-ajax--delay':delay,
    'data-ajax--data-type':"json",
    'data-language':language,
    'data-minimum-input-length':minimum_input_length,
    'data-placeholder':placeholder|trans({}, translation_domain),
    'class' : (attr.class|default('') ~ ' select2entity form-control')|trim
    }) %}

    {% if multiple %}
        {% set attr = attr|merge({'multiple':'multiple'}) %}
    {% endif %}

    {% if allow_clear %}
        {% set attr = attr|merge({'data-allow-clear': 'true'}) %}
    {% endif %}

    {% spaceless %}
        <select {{ block('widget_attributes') }}>
            {% if value is iterable %}
                {% if allow_clear %}
                        <option>{{ placeholder|trans({}, translation_domain) }}</option>
                {% endif %}
                {% for id, label in value %}
                    {% block tetranz_select2entity_widget_select_option %}
                        <option value="{{ id }}" selected="selected">{{ label }}</option>
                    {% endblock %}
                {% endfor %}
            {% endif %}
        </select>
    {% endspaceless %}
{% endblock %}


{% import 'OroEmailBundle::macros.html.twig' as EA %}

{% set folders = record.getValue('folders') %}
{% set thread = record.getValue('thread') %}
{% if thread is not null  %}
    {% set recipients = oro_get_email_thread_recipients(thread) %}
{% else %}
    {% set recipients = record.getValue('recipients') %}
{% endif %}

{% if folders|length > 0 %}
    {% set folder = folders[0] %}
    {% if folder.type == 'sent' %}

    {% elseif folder.type == 'inbox' %}

    {% endif %}
{% endif %}

{% if (recipients|length > 0 and recipients|length < 3) %}
    {{ EA.email_participants_name(recipients, true, false) }}
{% else %}

        {% set firstEmail = recipients[0] %}
        {% set lastEmail = recipients[recipients|length - 1] %}
        {{
            EA.email_participant_name_or_me(firstEmail.emailAddress, firstEmail.name, true, false)
        }}..{{
            EA.email_participant_name_or_me(lastEmail.emailAddress, lastEmail.name, true, false)
        }}
        ({{ recipients|length }})

{% endif %}

Prepare data for my emails grid

{% import 'OroEmailBundle::macros.html.twig' as EA %}

{% set folders = record.getValue('folders') %}
{% set thread = record.getValue('thread') %}
{% if thread is not null  %}
    {% set recipients = oro_get_email_thread_recipients(thread) %}
{% else %}
    {% set recipients = record.getValue('recipients') %}
{% endif %}

{% if folders|length > 0 %}
    {% set folder = folders[0] %}
    {% if folder.type == 'sent' %}

    {% elseif folder.type == 'inbox' %}

    {% endif %}
{% endif %}

{% if (recipients|length > 0 and recipients|length < 3) %}
    {{ EA.email_participants_name(recipients, true, false) }}
{% else %}

        {% set firstEmail = recipients[0] %}
        {% set lastEmail = recipients[recipients|length - 1] %}
        {{
            EA.email_participant_name_or_me(firstEmail.emailAddress, firstEmail.name, true, false)
        }}..{{
            EA.email_participant_name_or_me(lastEmail.emailAddress, lastEmail.name, true, false)
        }}

{% endif %}
{% if thread is not null and thread.emails|length > 1 %}
    ({{ thread.emails|length }})
{% endif %}


{% extends 'email.html.twig' %}

{% block heading %}{{ subject|trans }}{% endblock %}

{% block content %}
    {% trans with {
        '%expire_at%': password_reset_token.expireAt|localizeddate('medium', 'short'),
        '%url%':       url('darvin_user_security_reset_password', {'token': password_reset_token.base64EncodedId}),
    } %}
        email.password_reset.text
    {% endtrans %}
{% endblock %}

Replace "localizeddate" Twig filter with "date".

{% extends 'email.html.twig' %}

{% block heading %}{{ subject|trans }}{% endblock %}

{% block content %}
    {% trans with {
        '%expire_at%': password_reset_token.expireAt|date('d.m.Y H:i'),
        '%url%':       url('darvin_user_security_reset_password', {'token': password_reset_token.base64EncodedId}),
    } %}
        email.password_reset.text
    {% endtrans %}
{% endblock %}


Add a new macro that gets translations for contentypes

{##
 # Get a translation from contentypes.xx.yml based on contentype and key
 #
 # @param string  contentype (e.g. 'pages')
 # @param string  select (e.g. 'name.plural')
 # @param string  default (defaults to the requested key)
 #}
{% macro ct_trans(contentype, select, default) -%}
    {% spaceless %}
        {% set key = 'contenttypes.' ~ contentype ~ '.' ~ select %}
        {% set trans = key|trans([], 'contenttypes') %}
        {{ (trans == key) ? default|default(key) : trans }}
    {% endspaceless %}
{% endmacro %}


{% macro select_all() %}

    <input type="checkbox" data-action="select-all" />

{% endmacro %}

{% macro select_item(id) %}

    <input type="checkbox" name="datagrid-items" data-action="select" data-id="{{ id }}" />

{% endmacro %}

Add title attribute to datagrid helpers

{% macro select_all() %}

    <input type="checkbox" data-action="select-all" title="Select all" />

{% endmacro %}

{% macro select_item(id) %}

    <input type="checkbox" name="datagrid-items" data-action="select" data-id="{{ id }}" title="Select this item" />

{% endmacro %}


{% extends "layout.html.twig" %}

{% block content %}

List of tasks

                    #
                    Task title
                    Task description

                {% for task in tasks %}

                        {{ loop.index }}
                        {{ task.title }}
                        {{ task.description }}

                        <form action="{{ path('removetask') }}" method="POST">
                            <input type="hidden" id="_method" name="_method" value="DELETE" />
                            <input type="hidden" name="task" value="{{ task.id }}"/>
                            <input class="btn btn-primary" type="submit" value="Submit">
                        </form>

                {% endfor %}

            Add task

{% endblock %}

Update remove task button style

{% extends "layout.html.twig" %}

{% block content %}

List of tasks

                    #
                    Task title
                    Task description

                {% for task in tasks %}

                        {{ loop.index }}
                        {{ task.title }}
                        {{ task.description }}

                        <form action="{{ path('removetask') }}" method="POST">
                            <input type="hidden" id="_method" name="_method" value="DELETE" />
                            <input type="hidden" name="task" value="{{ task.id }}"/>
                            <input class="btn btn-outline-danger btn-sm" type="submit" value="X">
                        </form>

                {% endfor %}

            Add task

{% endblock %}


Upcoming events

    {% for event in upcoming_events %}
        {{ include('meetup/event.html.twig') }}
    {% endfor %}

Past events

    {% for event in past_events %}
        {{ include('meetup/event.html.twig') }}
    {% endfor %}

Allow for no upcoming events.

Upcoming events

    {% for event in upcoming_events %}
        {{ include('meetup/event.html.twig') }}
    {% else %}

            Nothing to announce right now,

                follow us on Twitter

            for updates.

    {% endfor %}

Past events

    {% for event in past_events %}
        {{ include('meetup/event.html.twig') }}
    {% endfor %}


        {% if is_granted('ROLE_USER') %}

Logged in as {{ app.security.token.user }}

        {% endif %}

            {% if not is_granted('ROLE_USER') %}

Login

            {% endif %}

            {% if is_granted('ROLE_USER') %}

Logout

            {% endif %}

Supinfo backoffice

Home
        {% if is_granted('ROLE_ADMIN') %}

Place

Article

Family

SubFamily

Structure

SubFamilyField

User

        {% endif %}

Fix for User with no toString

        {% if is_granted('ROLE_USER') %}

Logged in as {{ app.security.token.user.username }}

        {% endif %}

            {% if not is_granted('ROLE_USER') %}

Login

            {% endif %}

            {% if is_granted('ROLE_USER') %}

Logout

            {% endif %}

Supinfo backoffice

Home
        {% if is_granted('ROLE_ADMIN') %}

Place

Article

Family

SubFamily

Structure

SubFamilyField

User

        {% endif %}


      {{ area('mainHeader') }}

      {{ area('pageHeader') }}
      {{ area('pageComponents') }}

      {{ area('mainFooter') }}

Use HTML5 Markup but keep role attributes


{% if method.phpdoc %}{% include 'phpdoc/method_phpdoc.twig' with {'method_phpdoc': method.phpdoc} %}{% endif %}
    {{ method.visibility ~ (method.visibility is not empty ? ' ') -}}
    function {{ method.name }}({% include 'collection/argument_collection.twig' with {
        'argument_collection': method.allArguments,
        'length_restriction': 22 + method.name | length
    } only %});
{#- Trimming lines -#}

Add return type template for interface methods.

{% if method.phpdoc %}{% include 'phpdoc/method_phpdoc.twig' with {'method_phpdoc': method.phpdoc} %}{% endif %}
    {{ method.visibility ~ (method.visibility is not empty ? ' ') -}}
    function {{ method.name }}({% include 'collection/argument_collection.twig' with {
        'argument_collection': method.allArguments,
        'length_restriction': 22 + method.name | length
    } only %}){{ method.returnType is not empty ? ' : ' ~ method.returnType : '' -}};
{#- Trimming lines -#}


{% import 'macros.twig' as scat %}
<form class="add-item" action="/cart/add-item" method="POST">
  <input type="hidden" name="item" value="{{ item.code }}">
  <input type="hidden" name="name" value="{{ item.name }}">
  <input type="hidden" name="brand" value="{{ item.brand_name }}">
  <input type="hidden" name="category" value="{{ item.category }}">
  <input type="hidden" name="sale_price" value="{{ item.sale_price }}">
  {% if not fixed_quantity and not quantity %}

        Quantity

      <input type="text" class="input"
             id="quantity" name="quantity"
             value="{{ item.purchase_quantity ?: 1 }}">

    {% if item.purchase_quantity > 1 %}

        Must be multiple of {{ item.purchase_quantity }}.

    {% endif %}
  {% else %}
    <input type="hidden" name="quantity"
            value="{{ quantity ?? item.purchase_quantity ?: 1}}">
  {% endif %}
  <button type="submit" class="button {{ button_size ?? 'block' }}">

    Add to Cart
  </button>
</form>

Use <input type="number"> with constraints

{% import 'macros.twig' as scat %}
<form class="add-item" action="/cart/add-item" method="POST">
  <input type="hidden" name="item" value="{{ item.code }}">
  <input type="hidden" name="name" value="{{ item.name }}">
  <input type="hidden" name="brand" value="{{ item.brand_name }}">
  <input type="hidden" name="category" value="{{ item.category }}">
  <input type="hidden" name="sale_price" value="{{ item.sale_price }}">
  {% if not fixed_quantity and not quantity %}

        Quantity

      <input type="number" class="input"
             id="quantity" name="quantity"
             min="{{ item.purchase_quantity ?: 1 }}"
             step="{{ item.purchase_quantity ?: 1 }}"
             value="{{ item.purchase_quantity ?: 1 }}">

    {% if item.purchase_quantity > 1 %}

        Must be multiple of {{ item.purchase_quantity }}.

    {% endif %}
  {% else %}
    <input type="hidden" name="quantity"
            value="{{ quantity ?? item.purchase_quantity ?: 1}}">
  {% endif %}
  <button type="submit" class="button {{ button_size ?? 'block' }}">

    Add to Cart
  </button>
</form>


{% extends 'adminbase.html.twig' %}

{% block breadcrumbs %}

        Home
        Admin
        People
        {{ person.name }}

{% endblock %}

{% block body %}

Person: Stats

{% endblock %}

Add height to the grid


<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Project • {{ title }}</title>

  <link rel="stylesheet" href="css/main.css">

  <script src="bower_components/jquery/jquery.min.js"></script>

  <script src="bower_components/requirejs/require.js" data-main="../js/modules/main.js"></script>
</head>
<body>

{% block content %}{% endblock %}

</body>
</html>

Add meta-viewport tag in layout.twig

<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>Project • {{ title }}</title>

  <link rel="stylesheet" href="css/main.css">

  <script src="bower_components/jquery/jquery.min.js"></script>

  <script src="bower_components/requirejs/require.js" data-main="../js/modules/main.js"></script>
</head>
<body>

{% block content %}{% endblock %}

</body>
</html>


{% extends '@SyliusAdmin/layout.html.twig' %}

{% block title %}{{ 'sylius.ui.shipment'|trans }} | {{ shipment.id }}{% endblock %}

{% block content %}
    {% include '@SyliusAdmin/Shipment/Show/_header.html.twig' %}
    {% include '@SyliusAdmin/Shipment/Show/_breadcrumb.html.twig' %}

                    {{ 'sylius.ui.product'|trans }}
                    {{ 'sylius.ui.variant'|trans }}

                {% for unit in shipment.units %}

                        {{ unit.orderItem.product.name }}
                        {{ unit.orderItem.variant.name }}

                {% endfor %}

{% endblock %}

Add back button on shipment show page

{% extends '@SyliusAdmin/layout.html.twig' %}

{% import '@SyliusUi/Macro/buttons.html.twig' as buttons %}

{% block title %}{{ 'sylius.ui.shipment'|trans }} | {{ shipment.id }}{% endblock %}

{% block content %}

            {% include '@SyliusAdmin/Shipment/Show/_header.html.twig' %}

            {{ buttons.default(app.request.headers.get('referer'), '', 'back', 'arrow alternate circle left outline') }}

    {% include '@SyliusAdmin/Shipment/Show/_breadcrumb.html.twig' %}

                    {{ 'sylius.ui.product'|trans }}
                    {{ 'sylius.ui.variant'|trans }}

                {% for unit in shipment.units %}

                        {{ unit.orderItem.product.name }}
                        {{ unit.orderItem.variant.name }}

                {% endfor %}

{% endblock %}


<select
        name="{{ field_type.input_name }}"
        {{ html_attributes(field_type.attributes) }}
        {{ field_type.disabled ? 'disabled' }}
        {{ field_type.readonly ? 'readonly' }}>

    {% if field_type.placeholder %}
        <option value disabled>{{ trans(field_type.placeholder) }}</option>
    {% endif %}

    {% for value, option in field_type.options %}
        {% if option is iterable %}
            <optgroup label="{{ trans(value) }}">
                {% for value, option in option %}
                    <option value="{{ value }}" {{ value == field_type.key ? 'selected' }}>{{ trans(option) }}</option>
                {% endfor %}
            </optgroup>
        {% else %}
            <option value="{{ value }}" {{ value == field_type.key ? 'selected' }}>{{ trans(option) }}</option>
        {% endif %}
    {% endfor %}

</select>

Disable the placeholder if required

<select
        name="{{ field_type.input_name }}"
        {{ html_attributes(field_type.attributes) }}
        {{ field_type.disabled ? 'disabled' }}
        {{ field_type.readonly ? 'readonly' }}>

    {% if field_type.placeholder %}
        <option value {{ field_type.required ? 'disabled' }}>{{ trans(field_type.placeholder) }}</option>
    {% endif %}

    {% for value, option in field_type.options %}
        {% if option is iterable %}
            <optgroup label="{{ trans(value) }}">
                {% for value, option in option %}
                    <option value="{{ value }}" {{ value == field_type.key ? 'selected' }}>{{ trans(option) }}</option>
                {% endfor %}
            </optgroup>
        {% else %}
            <option value="{{ value }}" {{ value == field_type.key ? 'selected' }}>{{ trans(option) }}</option>
        {% endif %}
    {% endfor %}

</select>


{% extends "GameScoreBundle::layout.html.twig" %}

{% block title %}
    Auteurs : Collection - {{ parent() }}
{% endblock %}

{% block rightside %}
    Auteurs populaires :
{% endblock %}

{% block mainsection %}

Authors collection

        {% if is_granted('ROLE_ADMIN') %}

Nouvel auteur

        {% endif %}

            {% for p in alphapageArray %}
                {% if p != "" %}

                        {{ p }}

                {% endif %}
            {% endfor %}

            {% for author in authors %}

                    {{ author.firstname ~ ' ' ~ author.lastname }}
                    -
                    Fiche
                    -
                    Maj

            {% endfor %}

{% endblock %}

Update : use of btn gp in author collection

{% extends "GameScoreBundle::layout.html.twig" %}

{% block title %}
    Auteurs : Collection - {{ parent() }}
{% endblock %}

{% block rightside %}
    Auteurs populaires :
{% endblock %}

{% block mainsection %}

Authors collection

        {% if is_granted('ROLE_ADMIN') %}

Nouvel auteur

        {% endif %}

            {% for p in alphapageArray %}
                {% if p != "" %}

                        {{ p }}

                {% endif %}
            {% endfor %}

            {% for author in authors %}

                    {{ author.firstname ~ ' ' ~ author.lastname }}

                        {{ 'see card'|trans|capitalize }}
                        {{ 'update'|trans|capitalize }}

            {% endfor %}

{% endblock %}


{{ url }}

Add preview link view widget.

{% set classes = {
    'default': 'table-row__btn-show',
    'footer':  'page-footer__btn-hide',
    'header':  'page-header__btn-hide',
} %}

{{ url }}


{% set pagetitle = 'Authenticate'|trans %}
{% extends "@core/base.twig" %}

{% block content %}

{{ pagetitle|trans }}

Please choose one of the following authentication methods:

{% if sources is empty -%}

Please check your SimpleSAML configuration.

        Follow the link and log in with administrator credentials. Admin login.

{% else %}

            {% for id, config in sources -%}

                      {{ config.name|translateFromArray|default(id) }}

            {% endfor -%}

{% endif %}
{% endblock %}

Fix for broken URLs in the new auth source selection page.


{{ data.footer.copyright | escape }}

                Copyright © {{ 'now' | date('Y') }}

            {% for link in data.footer.links %}
                {%- set url = link.url[0] == '/' ? url(link.url) : link.url -%}

                        {{- link.name -}}

            {% endfor %}

Expand the copyright information in the footer.

                Website Copyright © {{ 'now' | date('Y') }} {{ data.footer.copyright | escape }}

                BZFlag Copyright © 1993-{{ 'now' | date('Y') }} Tim Riker

            {% for link in data.footer.links %}
                {%- set url = link.url[0] == '/' ? url(link.url) : link.url -%}

                        {{- link.name -}}

            {% endfor %}


Introduce Bolt User Interface Components - this time: checkbox

{##
 # Renders a checkbox component.
 #
 # Options:
 #    class     []:          Classname added to the component container.
 #    disabled  [false]:     Input is disabled.
 #    id        [name]:      Id of the checkbox.
 #    name      <required>:  Name of the checkbox.
 #    required  [false]:     Input is required.
 #
 # @param array opt Options defining the component
 #}
{% macro checkbox(opt) %}
    {% spaceless %}
        {% from '_macro/_macro.twig' import attr %}

        {% set attributes = {
            'checked':   opt.checked|default(false),
            'class':     'form-control',
            'disabled':  opt.disabled|default(false),
            'id':        opt.id|default(opt.name),
            'name':      opt.name,
            'required':  opt.required|default(false),
            'type':      'checkbox',
            'value':     '1',
        } %}

        <div class="{{ ('checkbox ' ~ opt.class|default())|trim }}">
            <label>
                <input{{ attr(attributes) }}>
                <button type="button" onclick="var x=$(this).prev();x.prop('checked', !x.prop('checked'));"></button>
            </label>
        </div>
    {% endspaceless %}
{% endmacro %}


{% extends 'EDBlogBundle:Layout:blog_admin_main.html.twig' %}
{% form_theme form '@EDBlog/Global/forms.html.twig' %}

{% block content %}

Import new blog user

        <form action="{{ path('ed_blog_user_edit', { 'username' : user.username}) }}" method="post">
            {{ form_errors(form) }}

                {{ form_label(form.blogDisplayName) }}
                {{ form_widget(form.blogDisplayName) }}
                {{ form_errors(form.blogDisplayName) }}

                {{ form_label(form.role) }}
                {{ form_widget(form.role) }}
                {{ form_errors(form.role) }}

            {{ form_rest(form) }}
        </form>

{% endblock content %}

Edit user page heading correction

{% extends 'EDBlogBundle:Layout:blog_admin_main.html.twig' %}
{% form_theme form '@EDBlog/Global/forms.html.twig' %}

{% block content %}

Edit blog user

        <form action="{{ path('ed_blog_user_edit', { 'username' : user.username}) }}" method="post">
            {{ form_errors(form) }}

                {{ form_label(form.blogDisplayName) }}
                {{ form_widget(form.blogDisplayName) }}
                {{ form_errors(form.blogDisplayName) }}

                {{ form_label(form.role) }}
                {{ form_widget(form.role) }}
                {{ form_errors(form.role) }}

            {{ form_rest(form) }}
        </form>

{% endblock content %}


{% block list_scopes %}
    {{ echo_block("list_scopes") }}
    {% if scopes|default is not empty %}

                {% for groupName, group in scopes %}
                    {{ echo_block("list_scopes_"~(groupName|lower)) }}

                        {% for scopeName, params in group %}
                        <a class="{{ 'btn btn-sm ' ~ params.class|default('btn-default') }} {{ echo_twig("scopes['" ~ groupName ~ "'] == '" ~ scopeName ~ "' ? 'active': 'inactive'") }}"
                           href="{{ echo_path(
                               builder.routePrefixWithSubfolder ~ '_' ~ bundle_name ~ ( builder.BaseGeneratorName ? "_" ~ builder.BaseGeneratorName : "" ) ~ '_scopes',
                               "{ 'group': '" ~  groupName ~ "', 'scope': '" ~ scopeName ~ "' }") }}
                           ">
                            {%- if params.icon is defined %} {% endif -%}
                            {{- echo_trans(scopeName, {}, i18n_catalog|default("Admin")) -}}

                        {% endfor %}

                    {{ echo_endblock() }}
                {% endfor %}

    {% endif %}
    {{ echo_endblock() }}
{% endblock %}

FIX Scopes templates: sanitize scope groupName. TODO: design scopes

{% block list_scopes %}
    {{ echo_block("list_scopes") }}
    {% if scopes|default is not empty %}

                {% for groupName, group in scopes %}
                    {{ echo_block("list_scopes_"~(groupName|classify|replace({'.': '_'})|lower)) }}

                        {% for scopeName, params in group %}
                        <a class="{{ 'btn btn-sm ' ~ params.class|default('btn-default') }} {{ echo_twig("scopes['" ~ groupName ~ "'] == '" ~ scopeName ~ "' ? 'active': 'inactive'") }}"
                           href="{{ echo_path(
                               builder.routePrefixWithSubfolder ~ '_' ~ bundle_name ~ ( builder.BaseGeneratorName ? "_" ~ builder.BaseGeneratorName : "" ) ~ '_scopes',
                               "{ 'group': '" ~  groupName ~ "', 'scope': '" ~ scopeName ~ "' }") }}
                           ">
                            {%- if params.icon is defined %} {% endif -%}
                            {{- echo_trans(scopeName, {}, i18n_catalog|default("Admin")) -}}

                        {% endfor %}

                    {{ echo_endblock() }}
                {% endfor %}

    {% endif %}
    {{ echo_endblock() }}
{% endblock %}


<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>{% block title %}{{ gluggi.config.title }}{% endblock %}</title>

        <link rel="stylesheet" href="{{ coreAsset("/css/preview.css") }}">
        {% block stylesheets %}
            <link rel="stylesheet" href="{{ asset("/css/app.css") }}">
        {% endblock %}

        {% block javascripts %}
            <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
            <script>
                var gluggi = {
                    baseUrl: "{{ path("index") }}"
                };
            </script>
            <script src="{{ coreAsset("js/navigation.js") }}"></script>
        {% endblock %}
    </head>
    <body class="{{ bodyClass|default("") }}">
        {% block body %}
            {% block content %}{% endblock %}
        {% endblock %}
    </body>
</html>

Move JavaScripts to the end of the body

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>{% block title %}{{ gluggi.config.title }}{% endblock %}</title>

        <link rel="stylesheet" href="{{ coreAsset("/css/preview.css") }}">
        {% block stylesheets %}
            <link rel="stylesheet" href="{{ asset("/css/app.css") }}">
        {% endblock %}
    </head>
    <body class="{{ bodyClass|default("") }}">
        {% block body %}
            {% block content %}{% endblock %}
            {% block javascripts %}
                <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
                <script>
                    var gluggi = {
                        baseUrl: "{{ path("index") }}"
                    };
                </script>
                <script src="{{ coreAsset("js/navigation.js") }}"></script>
            {% endblock %}
        {% endblock %}
    </body>
</html>


{% extends 'MunicipalesBundle:theme:layout.html.twig' %}

{% block title %}{{ 'candidacy.step8.html_title'|trans }}{% endblock %}
{% block content %}

{{ 'candidacy.step8.h1_title'|trans }}

		Explicación del sellado de tiempo de Tractis y su verificación externa

{% endblock %}

Update widgets template for step 8

{% extends 'MunicipalesBundle:theme:layout.html.twig' %}

{% block title %}{{ 'candidacy.step8.html_title'|trans }}{% endblock %}
{% block content %}

{{ 'candidacy.step8.h1_title'|trans }}

    	{{ 'candidacy.step8.explanation'|trans }}

{% endblock %}