-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow to switch content language on list and filter by language #119
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,11 @@ | |
All notable changes to this project will be documented in this file. | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
## 2.1.0 (unreleased) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can remove this line. We add this line when releasing a new version. |
||
### Added | ||
- [gedmo translations] Added content language switcher to lists | ||
- [gedmo translations] Added available translations filter | ||
|
||
## [2.0.2](https://github.com/sonata-project/SonataTranslationBundle/compare/2.0.1...2.0.2) - 2016-06-15 | ||
### Fixed | ||
- Remove wrong `doctrine-orm-admin-bundle` and `doctrine-phpcr-admin-bundle` composer requirements | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,15 @@ | |
{% set admin = block_context.settings.admin %} | ||
{% set locale_switcher_route = block_context.settings.locale_switcher_route %} | ||
{% set locale_switcher_route_parameters = block_context.settings.locale_switcher_route_parameters %} | ||
{% set currentLocale = object.locale %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
{% if (admin.class is translatable) %} | ||
{% for extension in admin.extensions %} | ||
{% if (extension.translatableLocale is defined) %} | ||
{% set currentLocale = extension.translatableLocale(admin) %} | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{% if (object is translatable) %} | ||
<div class="locale_switcher"> | ||
{% spaceless %} | ||
{% for locale in sonata_translation_locales %} | ||
|
@@ -19,7 +26,7 @@ | |
{'id': admin.id(object), 'tl': locale}|merge(locale_switcher_route_parameters) | ||
) }}" | ||
accesskey="" | ||
class=" {% if (object.locale == locale) %} active {% endif %}" | ||
class=" {% if (currentLocale == locale) %} active {% endif %}" | ||
title="{{ 'admin.locale_switcher.tooltip' |trans([], 'SonataTranslationBundle') }}"> | ||
<img src="{{ asset('bundles/sonatatranslation/img/flags/' ~ locale ~ '.png')}}" /> | ||
</a> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is never used or at least no hint how to use it.