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

SAK-50402 Portal publish now button visible if user has permission to publish the site #12813

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ public void doSite(HttpServletRequest req, HttpServletResponse res, Session sess
rcontext.put("portalSearchPageSize", serverConfigurationService.getString("portal.search.pageSize", "10"));

//Show a confirm dialog when publishing an unpublished site.
rcontext.put("publishSiteButton", siteService.allowUpdateSite(siteId));
rcontext.put("publishSiteDialogEnabled", serverConfigurationService.getBoolean("portal.publish.site.confirm.enabled", false));
Map<String, String> toolTitles = new HashMap<>();
site.getPages().forEach(pageNow -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
#else
<strong id="unpublished-label">${rloader.sit_unpublished}</strong>
#end
#if($publishSiteButton)
<button class="btn btn-link Mrphs-button--active" aria-describedby="unpublished-label" #if($publishSiteDialogEnabled) data-bs-toggle="modal" data-target="#publishSiteConfirmModal" #else onclick="publishSite('${sitePages.siteId}');" #end>${rloader.sit_publish_now}</button>
##if($manageurl)
## <a class="managePublishingLink" href="$manageurl" >${rloader.sit_managepublish}</a>
##end
#end
</div>

<div id="publishSiteConfirmModal" class="modal" role="dialog" tabindex="-1" aria-hidden="true">
Expand Down
Loading