Bug 26207: Compare values of system preference log entries
This patch adds the ability to compare the values of system preferences
in the system log. The user can select two entries in the log search
results and view a diff of the two versions.
The feature is designed specifically for CSS and JS preferences like
OpacUserCSS or OpacUserJS where code changes are difficult to track.
To test, apply the patch and go to Tools -> Log viewer. You may need to
add values and make changes to preferences like OpacUserCSS if you don't
already have a history in your logs.
- Perform a search for log entries in the "System prefs" module.
- In the results, each entry for a system preference should have a
"Compare" checkbox."
- Check one of the checkboxes.
- The table should now be filtered by the system preference name. This
facilitates meaningful selections for comparison.
- You should see a message displayed onscreen, "Showing results
for...[ preference name]"
- The "Check none" link in the toolbar above the table should now be
enabled.
- If youy click the "Compare selected" link in the toolbar at this
stage you should get a message, "You must select two entries to
compare."
- If you uncheck the checkbox the table should return to an unfiltered
state.
- Check two checkboxes.
- The "Compare selected" link in the toolbar should now be enabled.
- Next to each of the checkboxes you checked should be a "View
comparison" link.
- Clicking either of the "View comparison" links or the "Compare
selected" link should trigger a modal with the diff view of the two
preferences.
- Try to select a third checkbox. You should get a message, "You can
select a maximum of two checkboxes." The box should remain unchecked.
- Test that unchecking both checkboxes manually clears the table filter.
- Test that the "Check none" link works to uncheck checked boxes and
clear the table filter.
Signed-off-by: Brandon J <brandon.jimenez@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>