Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

EZP-28525: New icons for assign user and assign section buttons #179

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/bundle/Resources/public/img/ez-icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/bundle/Resources/public/img/icons/assign-section.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/bundle/Resources/public/img/icons/assign-user.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/bundle/Resources/views/admin/role/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<a title="{{ 'role.view.list.action.assign_to_users_or_groups'|trans|desc('Assign to Users/Groups') }}"
href="{{ path('ezplatform.role_assignment.create', { roleId: role.id }) }}" class="btn btn-icon mx-3">
<svg class="ez-icon ez-icon-relations ez-icon--secondary">
<use xlink:href="{{ asset('bundles/ezplatformadminui/img/ez-icons.svg') }}#relations"></use>
<use xlink:href="{{ asset('bundles/ezplatformadminui/img/ez-icons.svg') }}#assign-user"></use>
</svg>
</a>
<a title="{{ 'role.view.list.action.edit'|trans|desc('Edit') }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
<div class="ez-table-header">
<div class="ez-table-header__headline">{{ 'role_assignment.view.list.header'|trans|desc('Users and Groups') }}</div>
<div>
<a href="{{ path('ezplatform.role_assignment.create', {roleId: role.id}) }}" class="btn btn-secondary">
<a href="{{ path('ezplatform.role_assignment.create', {roleId: role.id}) }}"
title="{{ 'role_assignment.view.list.action.add'|trans|desc('Assign users/groups') }}"
class="btn btn-secondary">
<svg class="ez-icon ez-icon-relations ez-icon--secondary">
<use xlink:href="{{ asset('bundles/ezplatformadminui/img/ez-icons.svg') }}#relations"></use>
<use xlink:href="{{ asset('bundles/ezplatformadminui/img/ez-icons.svg') }}#assign-user"></use>
</svg>
{{ 'role_assignment.view.list.action.add'|trans|desc('Assign users/groups') }}

</a>
<button id="delete-role-assignments" class="btn btn-danger btn--trigger" disabled
data-click="#role_assignments_delete_delete">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% trans_default_domain 'section' %}

{% form_theme form_section_content_assign 'EzPlatformAdminUiBundle:parts/form:flat_widgets.html.twig' %}
{% form_theme form_section_content_assign 'EzPlatformAdminUiBundle:parts/form:flat_widgets.html.twig' 'EzPlatformAdminUiBundle:parts/form:assign_section_widget.html.twig' %}

<section class="container mt-4 px-5">
<div class="ez-table-header">
Expand All @@ -15,7 +15,8 @@
'action': path("ezplatform.section.assign_content", {"sectionId": section.id}),
'attr': {'class': 'd-inline-block'}
}) }}
{{ form_widget(form_section_content_assign.locations, { 'label': '' }) }}
{{ form_widget(form_section_content_assign.locations.location) }}
{{ form_widget(form_section_content_assign.locations.select_content, {'attr': {'class': 'btn btn-secondary btn--open-udw'}}) }}
{{ form_end(form_section_content_assign) }}
</div>
<table class="table">
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Resources/views/admin/section/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
data-form-action="{{ path("ezplatform.section.assign_content", {"sectionId": section.id}) }}"
class="btn btn-icon mx-3">
<svg class="ez-icon ez-icon-relations ez-icon--secondary btn--open-udw">
<use xlink:href="{{ asset('bundles/ezplatformadminui/img/ez-icons.svg') }}#relations"></use>
<use xlink:href="{{ asset('bundles/ezplatformadminui/img/ez-icons.svg') }}#assign-section"></use>
</svg>
</a>

Expand Down
2 changes: 0 additions & 2 deletions src/bundle/Resources/views/admin/section/view.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,13 @@
<svg class="ez-icon">
<use xlink:href="{{ asset('bundles/ezplatformadminui/img/ez-icons.svg') }}#trash"></use>
</svg>
{{ 'section.form.delete'|trans|desc('Delete') }}
</button>
{% include 'EzPlatformAdminUiBundle:admin/section:delete_confirmation_modal.html.twig' with {'form': form_section_delete} %}
{% else %}
<button type="button" class="btn btn-danger disabled">
<svg class="ez-icon">
<use xlink:href="{{ asset('bundles/ezplatformadminui/img/ez-icons.svg') }}#trash"></use>
</svg>
{{ 'section.form.delete'|trans|desc('Delete') }}
</button>
{% endif %}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{%- block button_widget -%}
{%- if label is not same as(false) and label is empty -%}
{%- if label_format is not empty -%}
{% set label = label_format|replace({
'%name%': name,
'%id%': id,
}) %}
{%- else -%}
{% set label = name|humanize %}
{%- endif -%}
{%- endif -%}
<button type="{{ type|default('button') }}" {{ block('button_attributes') }}>
<svg class="ez-icon ez-icon--secondary">
<use xlink:href="{{ asset('bundles/ezplatformadminui/img/ez-icons.svg') }}#assign-section"></use>
</svg>
</button>
{%- endblock -%}