Skip to content

Commit

Permalink
Merge pull request #435 from mikadamczyk/EZP-29028
Browse files Browse the repository at this point in the history
EZP-29028: Subtree should be shown in a new line
  • Loading branch information
Łukasz Serwatka authored Apr 3, 2018
2 parents e2e6d8c + 753df2d commit ec1bb68
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 12 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"php": ">=7.1",
"symfony/symfony": "^3.4",
"jms/translation-bundle": "^1.3.2",
"ezsystems/ezpublish-kernel": "^7.1",
"ezsystems/repository-forms": "^2.1",
"ezsystems/ezplatform-admin-ui-modules": "^1.1",
"ezsystems/ez-support-tools": "^0.2",
"ezsystems/ezpublish-kernel": "^7.1@dev",
"ezsystems/repository-forms": "^2.1@dev",
"ezsystems/ezplatform-admin-ui-modules": "^1.1@dev",
"ezsystems/ez-support-tools": "^0.2@dev",
"white-october/pagerfanta-bundle": "^1.1",
"knplabs/knp-menu-bundle": "^2.1"
},
Expand Down
4 changes: 2 additions & 2 deletions features/ContentType.feature
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Feature: Content types management
| label | value |
| Name | Test CT |
| Identifier | iTestCT |
| Content name pattern | <name> |
| Content name schema | <name> |
And Content Type "Test CT" has field "CountryField" of type "ezcountry"
And notification that "Content type" "Test CT" is updated appears

Expand Down Expand Up @@ -68,7 +68,7 @@ Feature: Content types management
| label | value |
| Name | Test CT edited |
| Identifier | iTestCT |
| Content name pattern | <name> |
| Content name schema | <name> |
And Content Type "Test CT" has proper fields
| fieldName | fieldType |
| CountryField | ezcountry |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public function load(array $configs, ContainerBuilder $container)

$loader->load('default_parameters.yml');
$loader->load('services.yml');
$loader->load('role.yml');
}

/**
Expand Down
4 changes: 4 additions & 0 deletions src/bundle/Resources/config/role.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
parameters:
# Limitation mappers
ezrepoforms.limitation.null.template: "EzPlatformAdminUiBundle:Limitation:null_limitation_values.html.twig"
ezrepoforms.limitation.udw.template: "EzPlatformAdminUiBundle:Limitation:udw_limitation_value.html.twig"
8 changes: 4 additions & 4 deletions src/bundle/Resources/translations/content_type.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<note>key: content_type.container</note>
</trans-unit>
<trans-unit id="693f9ade0c2bb6a7c19b6f9b818d96aa23f1e013" resname="content_type.default_availability">
<source>Default content availability</source>
<target state="new">Default content availability</target>
<source>Default availability</source>
<target state="new">Default availability</target>
<note>key: content_type.default_availability</note>
</trans-unit>
<trans-unit id="3b3fc626a669a5462ec9fa7c94280a3573d8b106" resname="content_type.default_availability.help">
Expand Down Expand Up @@ -87,8 +87,8 @@
<note>key: content_type.name</note>
</trans-unit>
<trans-unit id="9e9628fc59643f3167ebe81dfed3e40eecd281c9" resname="content_type.name_schema">
<source>Content name pattern</source>
<target state="new">Content name pattern</target>
<source>Content name schema</source>
<target state="new">Content name schema</target>
<note>key: content_type.name_schema</note>
</trans-unit>
<trans-unit id="da59e6ae77cae375a30d7285970b1b2d9690049e" resname="content_type.sort_field.ascending">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% do form.setRendered() %}
{{ form_label(form) }}
<em class="d-block">{{ "role.policy.limitation.not_implemented"|trans({"%limitationTypeIdentifier%": form.vars.data.identifier}, 'ezrepoforms_role') }}</em>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<div>
{{ form_label(form.limitationValues) }}
{{ form_errors(form.limitationValues) }}
{{ form_widget(form.limitationValues) }}

<div>
<button data-universaldiscovery-title="{{ "role.policy.limitation.location.udw_title"|trans({}, "ezrepoforms_role") }}"
class="ez-button-tree pure-button ez-font-icon ez-button btn btn-secondary ez-pick-location-limitation-button"
data-location-input-selector="#{{ form.limitationValues.vars.id }}"
data-selected-location-list-selector="#{{ form.limitationValues.vars.id }}-selected-location"
>{{ "role.policy.limitation.location.udw_button"|trans({}, "ezrepoforms_role") }}</button>
</div>
</div>

<ul id="{{ form.limitationValues.vars.id }}-selected-location">
{% for limitationValue in form.limitationValues.vars.value|split(',') %}
{% if limitationValue is not empty %}
<li>
{{ render( controller( "ez_content:viewAction", {'locationId': limitationValue, 'viewType': '_platformui_content_name'} ) ) }}
</li>
{% endif %}
{% endfor %}
</ul>
4 changes: 2 additions & 2 deletions src/bundle/Resources/views/admin/content_type/view.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<td>{{ content_type.descriptions[language_code]|default('') }}</td>
</tr>
<tr>
<th>{{ "content_type.name_schema"|trans|desc("Content name pattern") }}</th>
<th>{{ "content_type.name_schema"|trans|desc("Content name schema") }}</th>
<td>{{ content_type.nameSchema }}</td>
</tr>
<tr>
Expand All @@ -71,7 +71,7 @@
</tr>
<tr>
<th>
{{ "content_type.default_availability"|trans|desc('Default content availability') }}
{{ "content_type.default_availability"|trans|desc('Default availability') }}
<p class="text-secondary small">
{{ "content_type.default_availability.help"|trans|desc("Default availability in primary language, if translation is absent") }}
</p>
Expand Down

0 comments on commit ec1bb68

Please sign in to comment.