Files
iTop/templates/components/quick-create/layout.html.twig
Molkobain 1f0211b45a N°2847 - Rework iTopWebPage layout (WIP Part VI)
- iTopWebPage: Restore "open search" feature
- iTopWebPage: Change all resources URL to absolute in order to benefit from the "duplicate removal" benefits
- iTopWebPage: Remove obsolete method IsMenuPaneVisible()
- Config: Add new parameters quick_create.enabled / global_search.enabled / breadcrumb.enabled
- utils: Add new GetAppRevisionNumber() method
- Introduce iUIBlock interface for UI layouts, components, ...
- Introduce BlockRenderer to properly render blocks
- Add "render_block" function to TwigHelper to render blocks directly from TWIG
- Refactor layouts and components into proper block classes to fit the new architecture
2020-07-30 15:22:17 +02:00

36 lines
2.2 KiB
Twig

<div id="{{ oQuickCreate.Id }}" class="ibo-quick-create" data-role="ibo-quick-create">
<form action="{{ oQuickCreate.Endpoint }}" method="get" class="ibo-quick-create--head" data-role="ibo-quick-create--head">
<input type="hidden" name="operation" value="new" />
<a href="#" class="ibo-quick-create--icon fas fa-plus" data-role="ibo-quick-create--icon" data-tooltip-content="{{ 'UI:Component:QuickCreate:Tooltip'|dict_s }}" data-tooltip-placement="bottom-start" data-tooltip-distance-offset="25"></a>
<select name="class" class="ibo-quick-create--input" data-role="ibo-quick-create--input" placeholder="{{ 'UI:Component:QuickCreate:Input:Placeholder'|dict_s }}">
<option value="">{{ 'UI:Component:QuickCreate:Input:Placeholder'|dict_s }}</option>
{% for sClassCode, sClassLabel in oQuickCreate.AvailableClasses %}
<option value="{{ sClassCode }}">{{ sClassLabel }}</option>
{% endfor %}
</select>
</form>
<div class="ibo-quick-create--drawer" data-role="ibo-quick-create--drawer">
<div class="ibo-quick-create--compartment">
<div class="ibo-quick-create--compartment-title" data-role="ibo-quick-create--compartment-title">
<span>{{ 'UI:Component:QuickCreate:Recents:Title'|dict_s }}</span>
</div>
<div class="ibo-quick-create--compartment-content" data-role="ibo-quick-create--compartment-content">
{% if oQuickCreate.LastClasses|length > 0 %}
{% for aClass in oQuickCreate.LastClasses %}
<a href="{{ aClass.target_url }}" class="ibo-quick-create--compartment-element" data-role="ibo-quick-create--compartment-element" data-class-code="{{ aQuery.class }}">
{% if aClass.icon_url is defined %}
<img src="{{ aClass.icon_url}}" class="ibo-quick-create--compartment-element-image" />
{% endif %}
{{ aClass.label_html|raw }}
</a>
{% endfor %}
{% else %}
<div class="ibo-quick-create--compartment--placeholder">
<img class="ibo-quick-create--compartment--placeholder-image" src="{{ aPage.sAbsoluteUrlAppRoot }}images/illustrations/quick-create-empty-history.svg" />
<div class="ibo-quick-create--compartment--placeholder-hint">{{ 'UI:Component:QuickCreate:LastClasses:NoClass:Placeholder'|dict_s }}</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>