Skip to content

Commit

Permalink
IBX-1402: Changed layout in content type group create and edit (#102)
Browse files Browse the repository at this point in the history
Co-authored-by: Jakub Brzegowski <symfiz@gmail.com>
  • Loading branch information
dew326 and tischsoic authored Dec 9, 2021
1 parent ad32bbc commit 937193e
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 75 deletions.
20 changes: 10 additions & 10 deletions src/bundle/Resources/translations/content_type.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -366,16 +366,6 @@
<target state="new">%name%</target>
<note>key: content_type.view.view.title</note>
</trans-unit>
<trans-unit id="d74d01091280ceabfb457980ddd459dc841ad957" resname="content_type_group.breadcrumb.add">
<source>Creating a new Content Type group</source>
<target state="new">Creating a new Content Type group</target>
<note>key: content_type_group.breadcrumb.add</note>
</trans-unit>
<trans-unit id="20ee2fba1b6d560dd296bbe696975e92b78ce578" resname="content_type_group.breadcrumb.edit">
<source>Editing Content Type group '%identifier%'</source>
<target state="new">Editing Content Type group '%identifier%'</target>
<note>key: content_type_group.breadcrumb.edit</note>
</trans-unit>
<trans-unit id="83a16866c8ff14a4966553088657aafbb9db8edb" resname="content_type_group.breadcrumb.list">
<source>Content Types</source>
<target state="new">Content Types</target>
Expand All @@ -401,6 +391,11 @@
<target state="new">Created Content Type group '%name%'.</target>
<note>key: content_type_group.create.success</note>
</trans-unit>
<trans-unit id="59f3d7c7674d76f2854970e9c63a8db856b1229f" resname="content_type_group.creating">
<source>Creating</source>
<target state="new">Creating</target>
<note>key: content_type_group.creating</note>
</trans-unit>
<trans-unit id="eec79e4a9109f28892797768f085eab39eaedc31" resname="content_type_group.delete.submit">
<source>Delete</source>
<target state="new">Delete</target>
Expand Down Expand Up @@ -466,6 +461,11 @@
<target state="new">%identifier%</target>
<note>key: content_type_group.view.view.title</note>
</trans-unit>
<trans-unit id="f34946beab1da2af6535a8e4a88145e9557de0aa" resname="editing">
<source>Editing</source>
<target state="new">Editing</target>
<note>key: editing</note>
</trans-unit>
<trans-unit id="f99cc628dc4d82c5ee69eae79039a2f449eec064" resname="field_definition.description">
<source>Description</source>
<target state="new">Description</target>
Expand Down
20 changes: 20 additions & 0 deletions src/bundle/Resources/translations/forms.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,26 @@
<target>Content Type / Update</target>
<note>key: role.policy.class.update</note>
</trans-unit>
<trans-unit id="3551d9a7a066b2a0941f244fa91f766c089fd063" resname="role.policy.commerce">
<source>Commerce</source>
<target>Commerce</target>
<note>key: role.policy.commerce</note>
</trans-unit>
<trans-unit id="b5a03c317caa2abbc2a833f7a1bd96dabe75f707" resname="role.policy.commerce.all_functions">
<source>Commerce / All functions</source>
<target>Commerce / All functions</target>
<note>key: role.policy.commerce.all_functions</note>
</trans-unit>
<trans-unit id="2bec0e366dfe740a1a13ef2b4186513711075983" resname="role.policy.commerce.currency">
<source>Commerce / Currency</source>
<target>Commerce / Currency</target>
<note>key: role.policy.commerce.currency</note>
</trans-unit>
<trans-unit id="fbf8fcb1c05ac737e68351c0a85682ac6a4bef6e" resname="role.policy.commerce.region">
<source>Commerce / Region</source>
<target>Commerce / Region</target>
<note>key: role.policy.commerce.region</note>
</trans-unit>
<trans-unit id="504ce9f80e074eeb880d5ae5f54d4811e2ab6862" resname="role.policy.comparison">
<source>Comparison</source>
<target>Comparison</target>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
{% extends '@ibexadesign/ui/layout.html.twig' %}
{% extends '@ibexadesign/ui/edit_base.html.twig' %}

{% trans_default_domain 'content_type' %}

{% block breadcrumbs %}
{% block breadcrumbs_admin %}{% endblock %}
{% endblock %}
{% block main_container_class %}ibexa-main-container--edit-container ibexa-main-container--without-anchor-menu-items{% endblock %}

{% block context_menu %}
{% block context_menu_admin %}{% endblock %}
{% endblock %}
{% set anchor_params = {
close_href: path('ezplatform.content_type_group.list'),
} %}

{% block header %}
{% block header_admin %}{% endblock %}
{% endblock %}

{% block content %}
<div class="row align-items-stretch ez-main-row">
<div class="px-0 pb-4 ez-content-container">
<div class="container ez-container">
{% block form %}
{% endblock %}
</div>
<div class="row">
<div class="col col-10 offset-1">
{% block form %}{% endblock %}
</div>
</div>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,26 @@

{% trans_default_domain 'content_type' %}

{% block breadcrumbs_admin %}
{% include '@ibexadesign/ui/breadcrumbs.html.twig' with { items: [
{ value: 'breadcrumb.admin'|trans(domain='messages')|desc('Admin') },
{ url: path('ezplatform.content_type_group.list'), value: 'content_type_group.breadcrumb.list'|trans|desc('Content Types') },
{ value: 'content_type_group.breadcrumb.add'|trans|desc('Creating a new Content Type group') }
]} %}
{% endblock %}

{% block context_menu_admin %}
{% block header_admin %}
{% set content_type_group_create_sidebar_right = knp_menu_get('ezplatform_admin_ui.menu.content_type_group_create.sidebar_right') %}
{{ knp_menu_render(content_type_group_create_sidebar_right, {'template': '@ibexadesign/ui/menu/context_menu.html.twig'}) }}
{% endblock %}

{% block header_admin %}
{% include '@ibexadesign/ui/page_title.html.twig' with {
{% include '@ibexadesign/ui/edit_header.html.twig' with {
action_name: 'content_type_group.creating'|trans|desc('Creating'),
icon_name: 'file',
title: 'content_type_group.view.add.title'|trans|desc('Creating a new Content Type group'),
context_actions: knp_menu_render(content_type_group_create_sidebar_right, {'template': '@ibexadesign/ui/menu/context_menu.html.twig'})
} %}
{% endblock %}

{% block form %}
{{ form_start(form) }}

<section>
<div class="card ibexa-card ibexa-card--light">
<div class="card-body ibexa-card__body">
{{ form_row(form.identifier, {'attr': {'autofocus': 'autofocus'}}) }}
<section>
<div class="card ibexa-card ibexa-card--light">
<div class="card-body ibexa-card__body">
{{ form_row(form.identifier, {'attr': {'autofocus': 'autofocus'}}) }}
</div>
</div>
</div>
</section>

{{ form_widget(form.create, {'attr': {'hidden': 'hidden'}}) }}

</section>
{{ form_widget(form.create, {'attr': {'hidden': 'hidden'}}) }}
{{ form_end(form) }}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,27 @@

{% trans_default_domain 'content_type' %}

{% block breadcrumbs_admin %}
{% include '@ibexadesign/ui/breadcrumbs.html.twig' with { items: [
{ value: 'breadcrumb.admin'|trans(domain='messages')|desc('Admin') },
{ url: path('ezplatform.content_type_group.list'), value: 'content_type_group.breadcrumb.list'|trans|desc('Content Types') },
{ value: 'content_type_group.breadcrumb.edit'|trans({ '%identifier%': content_type_group.identifier })|desc('Editing Content Type group \'%identifier%\'') }
]} %}
{% endblock %}

{% block context_menu_admin %}
{% block header_admin %}
{% set content_type_group_edit_sidebar_right = knp_menu_get('ezplatform_admin_ui.menu.content_type_group_edit.sidebar_right', [], {'save_id': form.update.vars.id}) %}
{{ knp_menu_render(content_type_group_edit_sidebar_right, {'template': '@ibexadesign/ui/menu/context_menu.html.twig'}) }}
{% endblock %}

{% block header_admin %}
{% include '@ibexadesign/ui/page_title.html.twig' with {
{% include '@ibexadesign/ui/edit_header.html.twig' with {
action_name: 'editing'|trans|desc('Editing'),
icon_name: 'file',
title: 'content_type_group.view.edit.title'|trans({'%identifier%': content_type_group.identifier})|desc('Editing Content Type group \'%identifier%\''),
show_autosave_status: false,
context_actions: knp_menu_render(content_type_group_edit_sidebar_right, {'template': '@ibexadesign/ui/menu/context_menu.html.twig'})
} %}
{% endblock %}

{% block form %}
{{ form_start(form) }}

<section>
<div class="card ibexa-card ibexa-card--light">
<div class="card-body ibexa-card__body">
{{ form_row(form.identifier) }}
<section>
<div class="card ibexa-card ibexa-card--light">
<div class="card-body ibexa-card__body">
{{ form_row(form.identifier) }}
</div>
</div>
</div>
</section>

{{ form_widget(form.update, {'attr': {'hidden': 'hidden'}}) }}

</section>
{{ form_widget(form.update, {'attr': {'hidden': 'hidden'}}) }}
{{ form_end(form) }}
{% endblock %}

{% block right_sidebar %}
{% set content_type_group_edit_sidebar_right = knp_menu_get('ezplatform_admin_ui.menu.content_type_group_edit.sidebar_right', [], {'save_id': form.update.vars.id}) %}
{{ knp_menu_render(content_type_group_edit_sidebar_right, {'template': '@ibexadesign/ui/menu/context_menu.html.twig'}) }}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
icon_name: 'content-type',
show_autosave_status: true,
description: content_type.description,
subtitle: 'editing_details'|trans({ '%location_name%': parent_location.contentInfo.name })|desc('under %location_name%'),
subtitle: 'editing_details'|trans({ '%location_name%': parent_location.contentInfo.name, '%language%': language.name })|desc('under %location_name% in %language%'),
} %}
{% endblock %}

Expand Down

0 comments on commit 937193e

Please sign in to comment.