-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[6.0] Add a global master language for Multilingual Associations #25403
Draft
lavipr
wants to merge
127
commits into
joomla:6.0-dev
Choose a base branch
from
lavipr:Feature_Global-Master-For-Multilingual-Associations
base: 6.0-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
127 commits
Select commit
Hold shift + click to select a range
cec6bd5
fill select boxes with default values to avoid empty list
lavipr 57c3a12
Display always the toolbar and adjust its functions
lavipr 655f7bb
merge the Association- and the "Not Associated"-column together
lavipr 9cd69c0
Add fields for setting a masterlanguage
lavipr b74930c
save the master item in the associations table
lavipr d20257a
Merge remote-tracking branch 'parent/4.0-dev' into addingMasterlanguage
lavipr eb72d74
change color of associations and center associations column
lavipr cc03c48
add masterlanguage information to the language select box
lavipr b669d7b
fix the toolbar button where variables have to be checked if they are…
lavipr d834ab6
center and widen the association column also in the associations modal
lavipr cd7aeb4
Merge remote-tracking branch 'parent/4.0-dev' into addingMasterlanguage
lavipr 391e1a0
display the master-child associations in the list views
lavipr 72f8963
Merge remote-tracking branch 'parent/4.0-dev' into addingMasterlanguage
lavipr 03818fd
Merge remote-tracking branch 'parent/4.0-dev' into addingMasterlanguage
lavipr 577c1c6
Merge remote-tracking branch 'parent/4.0-dev' into Feature-Multilingu…
lavipr 6812d99
add masterlanguage as default to language select box
lavipr 1495977
Add modified date of a master item to the associations table
lavipr 7da2da0
display new association state 'outdated' in list views
lavipr 8c61dd6
Add a filter for association states to the Associations View
lavipr e6d7e3c
Add sql for filter for association states to the Associations View
lavipr e0ceadd
Fix Bug when changing global master language
lavipr 0eed838
Fix bug where newsfeeds and contacts get the same assoc key
lavipr 211400d
Fix Bug for displaying associations without master language
lavipr 75ccfe9
Adding labels to select for accessibility reasons
lavipr b9361e6
change fields order and add description to these fields
lavipr 500f10e
Merge remote-tracking branch 'parent/4.0-dev' into Feature-Multilingu…
lavipr b9d451c
fix filter by association state
lavipr 628c22e
Merge remote-tracking branch 'parent/4.0-dev' into Feature-Multilingu…
lavipr 69b7c05
fix filter with correct context for categories in the associations table
lavipr 7171c11
add modified date when installing multilingual sample data
lavipr a123b14
use date of history if enabled instead of modified date for master item
lavipr 4ab0293
improve filtering by associations state
lavipr cb4a7d3
undo master language activation for multilingual sample data
lavipr 666acbd
set default value for the association state filter
lavipr 9b3d1c6
fix filter by association state also for modal
lavipr dbe7494
remove hardcoded table names
lavipr 28010b8
update outdated child of a master item
lavipr b74287e
add forgotten file for update outdated child of a master item
lavipr b34c098
remove unused functions, change function name and change comments
lavipr 561c01e
merge from 4.0-dev
lavipr 9f29efd
merge from 4.0-dev
lavipr be8fdbf
Merge remote-tracking branch 'parent/4.0-dev' into Feature-Multilingu…
lavipr 591ced4
revert some changes and adjust tooltips in List Views with Associations
lavipr e22457d
adjust code style and rename variables and function
lavipr fc95e69
open item as target if it is a child language
lavipr 550db64
don't display other target languages if master language is one of them
lavipr eaf8ce2
improve code style and new function for masterInfo in ListViews
lavipr 2275c8a
Merge remote-tracking branch 'parent/4.0-dev' into Feature-Multilingu…
lavipr ca7d5b0
rename table columns for master lang
lavipr 7df0d4a
fix display assoc without other children
lavipr ef78227
fix compare Master View when there is name instead of title used
lavipr 3a109bb
change links to edit association in other listviews with master
lavipr 7f42c40
fix missed renaming table column for master_id
lavipr 978aac0
Merge remote-tracking branch 'parent/4.0-dev' into Feature-Multilingu…
lavipr e6cdd7e
fix hound
lavipr 506059f
fix hound again
lavipr a866a13
fix phpcs
lavipr 0acf809
fix phpcs again
lavipr 047bf74
fix hound
lavipr 55e46d1
Update administrator/components/com_associations/forms/filter_associa…
lavipr eb2bdbb
Update administrator/components/com_associations/Model/AssociationsMo…
lavipr 285944f
Update administrator/components/com_associations/Model/AssociationsMo…
lavipr 3ac1800
Update administrator/components/com_associations/Helper/MasterAssocia…
lavipr 6e30b12
Update administrator/components/com_associations/Helper/MasterAssocia…
lavipr ad19dc3
Update administrator/components/com_associations/Helper/AssociationsH…
lavipr 42a39b2
Update administrator/components/com_categories/Model/CategoryModel.php
lavipr ba57d95
Update administrator/components/com_categories/Service/HTML/Administr…
lavipr 190ab67
Update administrator/components/com_contact/Service/HTML/Administrato…
lavipr 3918c30
Update administrator/components/com_content/Service/HTML/Administrato…
lavipr ef1eb55
Update administrator/components/com_menus/Service/HTML/Menus.php
lavipr 5052e70
Update administrator/components/com_newsfeeds/Service/HTML/Administra…
lavipr dc44040
Update administrator/language/en-GB/en-GB.com_associations.ini
lavipr 3215e64
Update installation/src/Model/LanguagesModel.php
lavipr 3c182ae
Update libraries/src/MVC/Model/AdminModel.php
lavipr 88ddb2a
Update plugins/system/languagefilter/languagefilter.xml
lavipr 952d7fb
Update administrator/language/en-GB/en-GB.ini
lavipr 393ed64
Update administrator/language/en-GB/en-GB.ini
lavipr 588ee55
fix alpha ordering in 'use' and removed commented out code line
lavipr 3951117
remove fieldset wrapping table
lavipr f6ba2ee
Update plugins/sampledata/multilang/multilang.php
lavipr 7104b51
Merge branch '4.0-dev' into Feature_Global-Master-For-Multilingual-As…
infograf768 f6f3e9d
fix correct typeAlias for categories
lavipr 2733b6a
Merge remote-tracking branch 'origin/Feature_Global-Master-For-Multil…
lavipr 439c6ad
get modified table name from contentType table
lavipr 8f97cc0
Update plugins/system/languagefilter/languagefilter.xml
lavipr a7c72db
Update plugins/sampledata/multilang/multilang.php
lavipr da88da9
Update plugins/system/languagefilter/languagefilter.php
lavipr 01f9cd8
fix wrong uppercase filename
lavipr 5c321cb
change type of master_date to date and add update sqls
lavipr ab0e2bd
Add schema updates to pr 25403
richard67 77bb4f7
Merge pull request #6 from richard67/Feature_Global-Master-For-Multil…
lavipr e81e549
Merge branch '4.0-dev' into Feature_Global-Master-For-Multilingual-As…
infograf768 1f8fb0b
Merge remote-tracking branch 'parent/4.0-dev' into Feature_Global-Mas…
lavipr 6304010
Merge remote-tracking branch 'origin/Feature_Global-Master-For-Multil…
lavipr de8a1b1
remove disabled for filters
lavipr 04ee4a7
rename outdated into out of date
lavipr fcb4f22
move Route::_call() to the layout
lavipr 059ad32
fix phpcs
lavipr 822eeba
Merge branch '4.0-dev' into Feature_Global-Master-For-Multilingual-As…
lavipr 5dbad04
Merge remote-tracking branch 'parent/4.0-dev' into Global-Master-For-…
lavipr 8f65a6c
fix phpcs
lavipr e705cf5
Merge branch '4.0-dev' into Feature_Global-Master-For-Multilingual-As…
infograf768 3069cd7
Merge branch '4.0-dev' into Feature_Global-Master-For-Multilingual-As…
lavipr 197d0ce
avoid using the term master
lavipr 9f5c7a3
use prepared statements and save parent_date value as date
lavipr c6e83ed
merge with 4.0-dev and resolve conflicts
lavipr 6e74985
fix phpcs
lavipr f8866a2
fix bug for correct parent_date when adding child from other association
lavipr 1b14de0
Update administrator/components/com_associations/Model/AssociationsMo…
lavipr 41d85a7
Update administrator/components/com_associations/Model/AssociationsMo…
lavipr 6cd6fcb
Merge remote-tracking branch 'parent/4.0-dev' into Global-Master-For-…
lavipr b4d0019
use getContentLanguage method to count languages
lavipr 5c9d903
use prepared statement and bind variable to the main query
lavipr 6193b2b
Merge remote-tracking branch 'parent/4.0-dev' into Global-Master-For-…
lavipr 4e7e99f
declare variable before running the loop
lavipr 58d567d
Merge remote-tracking branch 'parent/4.0-dev' into Global-Master-For-…
lavipr a596d3a
Update plugins/system/languagefilter/languagefilter.php
lavipr f5b6dcb
Fix PHP notices in languagefilter.php
richard67 1844027
PHPCS, type-safe comparison
richard67 a17cef8
Merge pull request #7 from richard67/4.0-dev-pr-25403-fix-php-notices-2
lavipr ac231c8
Fix PHP Notice "Only variables ... by reference" in languagefilter.php
richard67 fbf0c44
Merge pull request #8 from richard67/Feature_Global-Master-For-Multil…
lavipr ffc4e27
fix controller name with correct casing
lavipr 6dcae08
fix model call name with correct casing
lavipr 0023d72
Fix PHP Notice "Only variables ... by reference" in DefaultAssocLangM…
richard67 062dd08
Add missing semicolon
richard67 440584d
Merge pull request #9 from richard67/Feature_Global-Master-For-Multil…
lavipr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add fields for setting a masterlanguage
This add two fields for setting a masterlanguage in the languagefilter plugin. To set these parameters correctly there has been added an onExtensionAfterSave event, because these parameters depends on others.
- Loading branch information
commit 9cd69c009ef50f717bb633f1c8d534fb176c1a63
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
plugins/system/languagefilter/Field/ContentsitelanguageField.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Plugin | ||
* @subpackage System.languagefilter | ||
* | ||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
namespace Joomla\Plugin\System\Languagefilter\Field; | ||
|
||
defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\Component\ComponentHelper; | ||
use Joomla\CMS\Form\Field\ContentlanguageField; | ||
use Joomla\CMS\HTML\HTMLHelper; | ||
use Joomla\CMS\Language\Text; | ||
lavipr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
use Joomla\CMS\Language\LanguageHelper; | ||
|
||
|
||
/** | ||
* Content Site Languages Field class. | ||
* | ||
* @since 4.0 | ||
This comment was marked as abuse.
Sorry, something went wrong. |
||
*/ | ||
class ContentsitelanguageField extends ContentlanguageField | ||
{ | ||
/** | ||
* The list field type. | ||
* | ||
* @var string | ||
* | ||
* @since 4.0 | ||
This comment was marked as abuse.
Sorry, something went wrong. |
||
*/ | ||
public $type = 'contentsitelanguage'; | ||
|
||
/** | ||
* Method to get the field options. | ||
* | ||
* @return array The field option objects. | ||
* | ||
* @since 4.0 | ||
This comment was marked as abuse.
Sorry, something went wrong. |
||
*/ | ||
public function getOptions() | ||
{ | ||
$defaultSiteLanguage = ComponentHelper::getParams('com_languages')->get('site'); | ||
$contentLanguages = LanguageHelper::getContentLanguages(array(0, 1)); | ||
$options = array(); | ||
|
||
foreach ($contentLanguages as $langCode) | ||
{ | ||
// Add the information to the language if it is the default site language | ||
if ($langCode->lang_code == $defaultSiteLanguage) | ||
{ | ||
$options[] = HTMLHelper::_('select.option', $langCode->lang_code, $langCode->title | ||
. ' - ' . Text::_('PLG_SYSTEM_LANGUAGEFILTER_OPTION_DEFAULT_LANGUAGE') | ||
); | ||
} | ||
else | ||
{ | ||
$options[] = HTMLHelper::_('select.option', $langCode->lang_code, $langCode->title); | ||
} | ||
} | ||
|
||
return $options; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as abuse.
Sorry, something went wrong.