Skip to content
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

[NEW-UI] Post update page #1096

Merged
merged 2 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions classes/DocumentationLinks.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class DocumentationLinks
public const DEV_DOC_UPGRADE_URL = self::DEV_DOC_UP_TO_DATE_URL . '/upgrade-module';
public const DEV_DOC_UPGRADE_CLI_URL = self::DEV_DOC_UPGRADE_URL . '/upgrade-cli';
public const DEV_DOC_UPGRADE_WEB_URL = self::DEV_DOC_UP_TO_DATE_URL . '/use-autoupgrade-module';
public const DEV_DOC_UPGRADE_POST_UPGRADE_URL = self:: DEV_DOC_UPGRADE_URL . '/post-update-checklist';
public const PRESTASHOP_PROJECT_URL = 'https://www.prestashop-project.org';
public const PRESTASHOP_PROJECT_DATA_TRANSPARENCY_URL = self::PRESTASHOP_PROJECT_URL . '/data-transparency';
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@

namespace PrestaShop\Module\AutoUpgrade\Controller;

use PrestaShop\Module\AutoUpgrade\DocumentationLinks;
use PrestaShop\Module\AutoUpgrade\Router\Routes;
use PrestaShop\Module\AutoUpgrade\Task\TaskType;
use PrestaShop\Module\AutoUpgrade\Twig\UpdateSteps;
use PrestaShop\Module\AutoUpgrade\UpgradeContainer;

class UpdatePagePostUpdateController extends AbstractPageWithStepController
{
Expand Down Expand Up @@ -61,8 +64,9 @@ protected function getParams(): array
return array_merge(
$updateSteps->getStepParams($this::CURRENT_STEP),
[
// TODO
'backlog_link' => 'https://myshop.com/my-backlog.txt',
'exit_link' => DIRECTORY_SEPARATOR . $this->upgradeContainer->getProperty(UpgradeContainer::PS_ADMIN_SUBDIR) . DIRECTORY_SEPARATOR . 'index.php',
'dev_doc_link' => DocumentationLinks::DEV_DOC_UPGRADE_POST_UPGRADE_URL,
'download_logs' => $this->upgradeContainer->getLogsService()->getDownloadLogsData(TaskType::TASK_TYPE_UPDATE),
]
);
}
Expand Down
14 changes: 8 additions & 6 deletions views/templates/steps/post-update.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,25 @@
</ul>
</div>

{% if download_logs is defined %}
<div class="content__section">
<a class="link" href="{{ backlog_link }}" download>
{{ 'Download update logs'|trans({}) }}
<a class="link" href="{{ download_logs.download_path }}" download="{{ download_logs.filename }}">
{{ download_logs.button_label }}
<i class="material-icons">file_upload</i>
</a>
</div>
{% endif %}
</div>
{% endblock %}

{% block buttons_inner %}
<button class="btn btn-lg btn-default" type="button">
<a class="btn btn-lg btn-default" href="{{ exit_link }}">
<i class="material-icons">exit_to_app</i>
{{ 'Exit'|trans({}) }}
</button>
</a>

<button class="btn btn-lg btn-primary" type="button">
<a class="btn btn-lg btn-primary" type="button" href="{{ dev_doc_link }}" target="_blank">
<i class="material-icons">launch</i>
{{ 'Open developer documentation'|trans({}) }}
</button>
</a>
{% endblock %}
Loading