Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…iscovery into 24.12.00
  • Loading branch information
mdnoble73 committed Nov 21, 2024
2 parents 7d5e6a7 + a1730ef commit dbdc774
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
<html lang="en">
<head>
<meta charset="UTF-8">
{if $canEdit}
<div style="position:absolute;top:50px;right:10px"><button onclick="window.location.href='{$editPageUrl|escape: 'html'}'">{translate text="Edit Page" isPublicFacing=false}</button></div>
{/if}
<title>{$title|escape: 'html'}</title>
</head>
<body>
Expand Down
9 changes: 9 additions & 0 deletions code/web/release_notes/24.12.00.MD
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,23 @@
// james staub - Nashville

// alexander - PTFSE
### Web Builder Updates
- Remove edit button in admin view of Grapes JS Pages as breadcrumbs allow navigation back to the editor and are in keeping with the rest of Aspen. (*AB*)

// Chloe - PTFSE

// Pedro - PTFSE

// Lucas - Theke
- The logs directory belongs to the appropriate user (Docker deployment) (*LM*)

// Tomas - Theke

// ByWater

### Other Updates
- Redirect to selfRegistrationUrl if the /MyAccount/SelfReg URL is accessed directly.(*PA*)

## This release includes code contributions from
### ByWater Solutions
-
Expand All @@ -70,6 +78,7 @@
### PTFS-Europe
- Alexander Blanchard (AB)
- Chloe Zermatten (CZ)
- Pedro Amorim (PA)

### Theke Solutions
- Lucas Montoya (LM)
Expand Down
6 changes: 6 additions & 0 deletions code/web/services/MyAccount/SelfReg.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ function launch($msg = null) {
$selfRegFields = $catalog->getSelfRegistrationFields();
if ($library->enableSelfRegistration == 0) {
$this->display('selfRegistrationNotAllowed.tpl', 'Register for a Library Card', '');
} elseif ($library->enableSelfRegistration == 2) {
if (!empty($library->selfRegistrationUrl)) {
header("Location: {$library->selfRegistrationUrl}");
exit;
}
$this->display('selfRegistrationNotAllowed.tpl', 'Register for a Library Card', '');
} else {
if (isset($_REQUEST['submit'])) {

Expand Down
7 changes: 0 additions & 7 deletions code/web/services/WebBuilder/GrapesPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ function launch() {
$title = $this->grapesPage->title;
$interface->assign('id', $this->grapesPage->id);
$interface->assign('contents', $this->grapesPage->getFormattedContents());
$editButton = $this->generateEditPageUrl();
$interface->assign('editPageUrl', $editButton);
$canEdit = UserAccount::userHasPermission( 'Administer All Grapes Pages',
'Administer Library Grapes Pages');
$interface->assign('canEdit', $canEdit);
Expand All @@ -66,11 +64,6 @@ function canView(): bool {
return true;
}

function generateEditPageUrl() {
$objectId = $this->grapesPage->id;
$templatesSelect - $this->grapesPage->templatesSelect;
return '/services/WebBuilder/GrapesJSEditor?objectAction=edit&id=' . $objectId . '&tempalteId=' . $templatesSelect;
}

function getBreadcrumbs(): array {
$breadcrumbs = [];
Expand Down
6 changes: 3 additions & 3 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
volumes:
- ${ASPEN_DATA_DIR}/conf:/usr/local/aspen-discovery/sites/${SITE_NAME}
- ${ASPEN_DATA_DIR}/data:/data/aspen-discovery/${SITE_NAME}
- ${ASPEN_DATA_DIR}/logs:/var/log/aspen-discovery
- ${ASPEN_DATA_DIR}/logs:/var/log/aspen-discovery/${SITE_NAME}
depends_on:
db:
condition: service_healthy
Expand All @@ -31,7 +31,7 @@ services:
volumes:
- ${ASPEN_DATA_DIR}/conf:/usr/local/aspen-discovery/sites/${SITE_NAME}
- ${ASPEN_DATA_DIR}/data:/data/aspen-discovery/${SITE_NAME}
- ${ASPEN_DATA_DIR}/logs:/var/log/aspen-discovery
- ${ASPEN_DATA_DIR}/logs:/var/log/aspen-discovery/${SITE_NAME}
command:
- cron
depends_on:
Expand All @@ -52,7 +52,7 @@ services:
networks:
- net-aspen
healthcheck:
interval: 60s
interval: 10s
retries: 10
test:
[
Expand Down
2 changes: 1 addition & 1 deletion docker/files/scripts/createDirs.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
exec("chmod -R 755 $logDir2");
}

exec("chown $newOwner $logDir/*");
exec("chown -R $newOwner $logDir");
exec("chown -R $newOwner $logDir/logs");

//Conf directory
Expand Down
8 changes: 7 additions & 1 deletion docker/files/scripts/cron.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

export CONFIG_DIRECTORY="/usr/local/aspen-discovery/sites/${SITE_NAME}"

Expand All @@ -10,6 +10,12 @@ if [ ! -f "$confSiteFile" ] ; then
exit 1
fi

# Adjust permissions if required
if [[ ! -z "${LOCAL_USER_ID}" && "${LOCAL_USER_ID}" != "33" ]]; then
echo "% Setting www-data to UID=${LOCAL_USER_ID}"
usermod -o -u ${LOCAL_USER_ID} "www-data"
fi

# Move and create temporarily sym-links to etc/cron directory
sanitizedSitename=$(echo "$SITE_NAME" | tr -dc '[:alnum:]_')
cp "$CONFIG_DIRECTORY/conf/crontab_settings.txt" "/etc/cron.d/$sanitizedSitename"
Expand Down

0 comments on commit dbdc774

Please sign in to comment.