Skip to content

Commit

Permalink
ref: dropdown-item
Browse files Browse the repository at this point in the history
  • Loading branch information
theus77 committed Feb 17, 2024
1 parent bf83ed7 commit 8434399
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
source: source
}) %}

<li class="{% if not link %}disabled{% endif %}"><a href="{{ link }}" target="_blank">
<li class="{% if not link %}disabled{% endif %}"><a href="{{ link }}" target="_blank" class="dropdown-item">
<i class="{{ template.icon|raw }}"></i>
{{ template.label}}
<i class="fa fa-external-link float-end"></i>
Expand All @@ -40,28 +40,28 @@
{%- endif -%}
{% elseif template.renderOption is constant('EMS\\CoreBundle\\Form\\Field\\RenderOptionType::NOTIFICATION') %}
{% if ( is_granted(template.role) and ((attribute(source, contentType.circlesField) is not defined) or (source and attribute(source, contentType.circlesField)|emsco_in_my_circles) or (environment.circles|emsco_in_my_circles and is_granted('ROLE_PUBLISHER')) ) ) %}
<li><a href='#' class="request-notification" data-template-id="{{template.id|e('html_attr')}}" data-environment-name="{{environment.name|e('html_attr')}}" data-content-type-id="{{contentType.id|e('html_attr')}}" data-ouuid="{{ouuid|e('html_attr')}}" href="#" data-url="{{ path('notification.ajaxnotification', {'objectId' : ouuid}) }}">
<li><a href='#' class="request-notification dropdown-item" data-template-id="{{template.id|e('html_attr')}}" data-environment-name="{{environment.name|e('html_attr')}}" data-content-type-id="{{contentType.id|e('html_attr')}}" data-ouuid="{{ouuid|e('html_attr')}}" href="#" data-url="{{ path('notification.ajaxnotification', {'objectId' : ouuid}) }}">
<i class="{{ template.icon|raw }}"></i>
{{ template.label }}
</a></li>
{% endif %}
{% elseif template.renderOption is constant('EMS\\CoreBundle\\Form\\Field\\RenderOptionType::JOB') %}
{% if (is_granted(template.role)) or template.role == "not-defined" %}
<li><a href="#" class="request_job" data-url="{{ path('ems_job_custom_view', {'environmentName': environment.name, 'templateId': template.id, 'ouuid': ouuid}) }}">
<li><a href="#" class="request_job dropdown-item" data-url="{{ path('ems_job_custom_view', {'environmentName': environment.name, 'templateId': template.id, 'ouuid': ouuid}) }}">
<i class="{{ template.icon|raw }}"></i>
{{ template.label }}
</a></li>
{% endif %}
{% elseif template.renderOption is constant('EMS\\CoreBundle\\Form\\Field\\RenderOptionType::IMPORT') %}
{%- if (is_granted(template.role)) or template.role == "not-defined" -%}
{%- set importModalUrl = path('emsco_data_action_import', { 'actionId': template.id, 'ouuid': ouuid}) -%}
<li><a href="#" data-ajax-modal-url="{{ importModalUrl }}" data-ajax-modal-size="md"><i class="{{ template.icon|raw }}"></i>{{ template.label }}</a></li>
<li><a href="#" data-ajax-modal-url="{{ importModalUrl }}" data-ajax-modal-size="md" class="dropdown-item"><i class="{{ template.icon|raw }}"></i>{{ template.label }}</a></li>
{%- endif -%}
{% else %}
<li><a href="{{ path(template.public?'ems_data_custom_template_public':'ems_data_custom_template_protected', {
environmentName: environment.name,
ouuid: ouuid,
templateId: template.id}) }}" >
templateId: template.id}) }}" class="dropdown-item">
<i class="{{ template.icon|raw }}"></i>
{{ template.label }}
</a></li>
Expand All @@ -73,7 +73,7 @@
{% endfor %}
{% if is_granted('ROLE_COPY_PASTE') %}
<li>
<a href="{{ path('revision.copy', {'environment': environment.name, 'type': contentType.name, 'ouuid': ouuid} ) }}">
<a href="{{ path('revision.copy', {'environment': environment.name, 'type': contentType.name, 'ouuid': ouuid} ) }}" class="dropdown-item">
<i class="{{ 'views.elements.object-views-button.copy-data-icon-class'|trans }}"></i>
{{ 'views.elements.object-views-button.copy-data'|trans }}
</a>
Expand All @@ -84,12 +84,12 @@
'url': path('emsco_duplicate_revision', {'environment': environment.name, 'type': contentType.name, 'ouuid': ouuid}),
'label': 'Duplicate',
'icon': 'clone',
'btnClass': ''
'btnClass': 'dropdown-item'
}%}
</li>
{% endif %}
<li>
<a href="{{ path('data.view', {'environmentName': environment.name, 'type': contentType.name, 'ouuid': ouuid} ) }}">
<a href="{{ path('data.view', {'environmentName': environment.name, 'type': contentType.name, 'ouuid': ouuid} ) }}" class="dropdown-item">
<i class="{{ 'views.elements.object-views-button.raw-view-icon-class'|trans }}"></i>
{{ 'views.elements.object-views-button.raw-view'|trans }}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</button>
<ul class="dropdown-menu">
<li>
<a href="{{ path('emsco_edit_json_revision', {'revision': revisionId}) }}">{{ 'views.elements.revision-toolbar-html.edit-revision-json'|trans }}</a>
<a href="{{ path('emsco_edit_json_revision', {'revision': revisionId}) }}" class="dropdown-item">{{ 'views.elements.revision-toolbar-html.edit-revision-json'|trans }}</a>
</li>
</ul>
</div>
Expand Down Expand Up @@ -94,13 +94,13 @@
{% if draft %}
<li>{% include '@EMSAdminUI/bootstrap5/elements/get-button.html.twig' with {
'url': path('emsco_edit_revision', {'revisionId': revisionId}),
'btnClass': '',
'btnClass': 'dropdown-item',
'label': 'views.elements.revision-toolbar-html.edit-draft-label'|trans,
'icon': 'pencil' }%}</li>
{% if autoSave %}
<li>{% include '@EMSAdminUI/bootstrap5/elements/post-button.html.twig' with {
'url': path('revision.cancel', {'revision': revisionId}),
'btnClass': '',
'btnClass': 'dropdown-item',
'label': 'views.elements.revision-toolbar-html.cancel-last-updates-label'|trans,
'icon': 'remove'
}%}</li>
Expand All @@ -109,29 +109,29 @@
{% if is_granted('ROLE_PUBLISHER') and revision.id|default(false) %}
<li>{% include '@EMSAdminUI/bootstrap5/elements/get-button.html.twig' with {
'url': path('emsco_pick_a_release', {revision: revision.id}),
'btnClass': '',
'btnClass': 'dropdown-item',
'label': 'views.elements.revision-toolbar-html.add-to-release'|trans(),
'icon': 'glyphicon glyphicon-pushpin' }%}</li>
'icon': 'fa fa-map-pin' }%}</li>
{% endif %}
{% if is_granted('ROLE_SUPER') and instance.contentType.environment not in environmentsRevision.environments %}
<li>{% include '@EMSAdminUI/bootstrap5/elements/get-button.html.twig' with {
'url': path('emsco_edit_revision', {'revisionId': revisionId}),
'btnClass': ' ',
'btnClass': 'dropdown-item',
'label': 'views.elements.revision-toolbar-html.edit-revision-label'|trans,
'icon': 'pencil' }%}</li>
{% endif %}
{% if autoSave %}
<li>{% include '@EMSAdminUI/bootstrap5/elements/post-button.html.twig' with {
'url': path('revision.cancel', {'revision': revisionId}),
'btnClass': '',
'btnClass': 'dropdown-item',
'message': 'views.elements.revision-toolbar-html.cancel-last-updates-message'|trans,
'label': 'views.elements.revision-toolbar-html.cancel-last-updates-label'|trans,
'icon': 'remove'
}%}</li>
{% endif %}
<li>{% include '@EMSAdminUI/bootstrap5/elements/post-button.html.twig' with {
'url': path('revision.revert', {'id': revisionId}),
'btnClass': '',
'btnClass': 'dropdown-item',
'label': 'views.elements.revision-toolbar-html.revert-revision-label'|trans,
'icon': 'undo' }%}</li>
{% endif %}
Expand All @@ -144,7 +144,7 @@
'compareId': rev.id < revision.id ? rev.id :revision.id,
'page': page
}),
'btnClass': '',
'btnClass': 'dropdown-item',
'label': 'views.elements.revision-toolbar-html.compare-label'|trans,
'icon': 'compress' }%}</li>
{% endif %}
Expand All @@ -164,7 +164,7 @@
</button>
<ul class="dropdown-menu">
{% for env in environmentsRevision.publish %}
<li><a href="{{ path('revision.publish_to', {'revisionId': revisionId, 'envId': env.id}) }}">{{ env.label }}</a></li>
<li><a href="{{ path('revision.publish_to', {'revisionId': revisionId, 'envId': env.id}) }}" class="dropdown-item">{{ env.label }}</a></li>
{% endfor %}
</ul>
</div>
Expand All @@ -179,7 +179,7 @@
</button>
<ul class="dropdown-menu">
{% for env in environmentsRevision.unpublish %}
<li><a href="{{ path('revision.unpublish', {'revisionId': revisionId, 'envId': env.id}) }}">{{ env.label }}</a></li>
<li><a href="{{ path('revision.unpublish', {'revisionId': revisionId, 'envId': env.id}) }}" class="dropdown-item">{{ env.label }}</a></li>
{% endfor %}
</ul>
</div>
Expand All @@ -194,7 +194,7 @@
<ul class="dropdown-menu">
<li>{% include '@EMSAdminUI/bootstrap5/elements/post-button.html.twig' with {
'url': path('revision.reindex', {'revisionId': revisionId}),
'btnClass': '',
'btnClass': 'dropdown-item',
'label': 'views.elements.revision-toolbar-html.re-index-label'|trans,
'icon': 'recycle'}%}</li>
</ul>
Expand Down

0 comments on commit 8434399

Please sign in to comment.