Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into MOODLE_405_STABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyjbutler committed Oct 8, 2024
2 parents 7e27884 + b873b90 commit 5ffd345
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ visibility).
Changelog
---------

2024-10-08 v4.5.1

* Add option to use new Leganto UI for citation links

2024-10-07 v4.5.0

* Fix inline display of show/hide arrow for Moodle 4.5
Expand Down
2 changes: 2 additions & 0 deletions lang/en/leganto.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@
$string['selectcitations'] = 'Select citations from "{$a}"';
$string['settingnotconfigured'] = 'Error: Leganto module admin setting "{$a}" empty or misconfigured.';
$string['showhide'] = 'Show/hide reading list';
$string['usenewui'] = 'Use new UI';
$string['usenewui_desc'] = 'Enable this option to make citation links point to the new Leganto user interface. This is intended to provide an interim solution while your library is transitioning to the new UI (see <a href="https://knowledge.exlibrisgroup.com/Leganto/Product_Materials/New_User_Experience/FAQ#How_will_we_see_the_new_UI.3F" target="_blank">https://knowledge.exlibrisgroup.com/Leganto/Product_Materials/New_User_Experience/FAQ#How_will_we_see_the_new_UI.3F</a> for details).';
$string['viewcitation'] = 'View citation record in Leganto';
$string['viewonline'] = 'View online';
$string['yearregex'] = 'Year code regex';
Expand Down
3 changes: 3 additions & 0 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,9 @@ public function get_citation_data($list, $citationid, $parentpath = '', $display
$citation->title = $OUTPUT->heading($title, $headinglevel, 'citationtitle h' . ($headinglevel + 1));
if (!empty($citation->leganto_permalink)) {
$permalink = str_replace('auth=local', 'auth=SAML', $citation->leganto_permalink);
if (!empty($this->adminconfig->usenewui)) {
$permalink = str_replace('readinglist', 'nui', $permalink);
}
$linkaction = new popup_action('click', $permalink, 'popup', ['width' => 1024, 'height' => 768]);
$linktitle = get_string('viewcitation', 'leganto');
$linkclass = !is_null($display) && $display == LEGANTO_DISPLAY_PAGE ? ' fa-lg' : '';
Expand Down
4 changes: 4 additions & 0 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
$settings->add(new admin_setting_configcheckbox('leganto/authorsinconfig', get_string('authorsinconfig', 'leganto'),
get_string('authorsinconfig_desc', 'leganto'), 0));

// New UI transitioning.
$settings->add(new admin_setting_configcheckbox('leganto/usenewui', get_string('usenewui', 'leganto'),
get_string('usenewui_desc', 'leganto'), 0));

// API settings.
$settings->add(new admin_setting_heading('leganto/apisettings', get_string('apisettings', 'leganto'), ''));
$settings->add(new admin_setting_configtext('leganto/apiurl', get_string('apiurl', 'leganto'),
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2024100700; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2024100800; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2023100900; // Requires this Moodle version.
$plugin->component = 'mod_leganto'; // Full name of the plugin (used for diagnostics).
$plugin->cron = 0;
Expand Down

0 comments on commit 5ffd345

Please sign in to comment.