forked from joomla/joomla-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
WIP - Feature multilingual associations #2
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
Closed
Closed
Conversation
This file contains hidden or 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
Since this list view is the only one in which an empty table is displayed before the user specifies what he wants to see via the select boxes, a preselection is defined by "default-values". The default language is set with the default site language, because normally the translations start from this language.
Since the selectboxes now always have a value, the buttons Delete associations and delete orphans of the toolbar are now always displayed. The "delete associations"-button now only deletes associations in which the user is currently located. - In addition, the button was adapted to a Confirm button, so that the associated js file and the associated message text could be removed. - The context is now also included as info in the message text.
- picked code from Wang-Yu-Chao/gsoc18_automatic_multilingual_association@55d46a1 -- remove column "Not Associated" from table -- removed now unused string -- removed parameter from function, as it is useless now --- remove all code using this parameter -- change color of the language-links --- grey (secondary) for not associated items --- green (success) for associated items
This was referenced May 27, 2019
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.
The master item is the one written in the language of the global master language. - New Column 'parent_id' for saving relationsship of items of an association. If an association contains no items with the masterlanguage (it may be not used) the value is -1. If an association contains an item with the masterlanguage, this is now the parent and is set with 0. The other items of this association get the id of the master item / parent. - Add new method to get the global master language parameter. - Change save-methods for the associations table concidering the new column - Add methods to change the master item in the associations table after saving the Languagefilter Plugin. - set global master language parameters in multi sample data
After the colors in the association view have changed after the columns have been merged, they are now adjusted for the other lists. In addition, the association column has been centered in each list.
If a global master language has been set, it is displayed as info in the Language select box , so that it is recognizable which master language has been set.
In order to display the Master-Child relationship of the associations in the lists, the layout was adapted. So now all children of an association are displayed, if the item in the row is a master item. Otherwise, only the current child-item is displayed with its master item, since there is no direct relationship between the children. In addition, the links of the association items in the Associations View have been adjusted so that the reference is now oriented to the master item and target to the children.
…al-Associations-2
This adds a new column "assocParams" to the association table where the modified date of the master item is stored. The column for the master item always gets its latest modified date, its children get the modified date when the association is created. The table of menu items does not yet have a modified date, so the column remains empty. Also, a new AssociationsHelperClass is added for all Masterlanguage matters.
Adding this filter allows to quickly determine if a master element is associated or not and if child elements are either associated, not associated or obsolete.
Set parent id correctly if no master item is present.
To prevent associations from receiving the same association key, since id and language can be the same in different contexts, the context is also added as differentiation.
As described in WCAG 3.3.2: 'Labels or instructions are provided when content requires user input. (Level A)'
Remove the fieldset for the master language and position its fields after the item association field, as the master fields depend on it.
…al-Associations-3
Filtering for "not associated" did not work correctly when either a child of a master item is not associated or when there is no master item for a child.
…al-Associations-4
- If Version is enabled then store the save_date of the ucm_history table into assocParams. This update the table just in cases when there were changes made when saving an item. - simplify the conditions in getMasterLanguageValues(). - when the languagefilter plugin get saved it doesn't reset the master id and his modified date when the global master language doesn't changed. - add a horizontal before item_associations and after global master language within the languagefilter plugin
- changed option values to names instead of numbers - no longer displays child elements of a master element that do not match when filtering.
Since it seems difficult to determine whether content versions are enabled or not, conflicts would arise if you simply set the modified date of the master item instead. Therefore, the changes are undone. The master language must now be explicitly activated in the plugin language filter.
This finds the table name using the getSupportedExtension function, except for categories. There are also changes for the field description and some comments. Also removed hardcoded error messages.
This adds a new edit view for updating a child item when it is oudated with the master item. There it is just possible to save the target and update his masters modified date. When versions are enabled for this itemtype then there is a compare view displayed for the reference/master otherwise the edit view is displayed.
…al-Associations-4
This revert the following changes when no master language is used: - the column 'Not Associated' in Associations is back - centering the associations column in all list views has been reverted Changes for List Views when a global master language is set: - centering the associations column in all list views - the toolip has been adjusted - - check if versions are enabled, if not the text for outdated items has been adjusted to "might be outdated" as we have no comparison if there has been made changes when the master item has been saved. So the user has to check manually if the child is really outdated. But he knows now that the master item has been saved at least.
When opening the association edit view via the associations-button from an item, then open this item as target, if an associated master item exists, and the master item as reference.
In Association Edit View: When a child item is the current reference then the target has to be the master language. Other child languages has no direct relationship to this child, so it makes no sense to display them in the language filter.
The same code is now moved to a function where the class name and the info text of the association status are set. The code style improvements include changes to variable names, the position of variables, improving comments, and text alignments.
…al-Associations-4
…al-Associations-4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull Request for Issue #1 .
Summary of Changes
See Step 1. Adjustment to the toolbar and the ListView of com_associations #3
See Step 2. Set a global Masterlanguage WIP #4
See Step 3. Adding Association States #5
Testing Instructions
Expected result
Actual result
Documentation Changes Required