Skip to content

Commit

Permalink
SAK-49564 sitemanage. Add template sites to merge screen (sakaiprojec…
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianfish committed Feb 2, 2024
1 parent f3f4a0e commit c5746e3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ sitinfimp.merge.heading = Import Materials from Other sites
sitinfimp.merge.confirm = Are you sure you want to merge the selected tool content?
sitinfimp.replace.heading = Import Materials from Another site
sitinfimp.replace.confirm = Are you sure you want to replace the selected tool content in {0}?
sitinfimp.youcan = You can only import material from other sites that you own. You can import \
sitinfimp.youcan = You can only import material from template sites or other sites that you own. You can import \
material from more than one site. Choose the sites below that contain the content that you wish to \
import into this site.
sitinfimp.reuse.user = Import User from Other Sites
Expand Down Expand Up @@ -912,14 +912,14 @@ imported data. Before you proceed, please double-check that you are using the co
there is no “undo” button or a site Trash to restore any overwritten data.
sitinfimp.hiddensites = Import from Hidden Sites
sitinfimp.hiddensites.info = The following sites are hidden by preferences. You can still import materials from those sites.
sitinfimp.templatesites = Import from Template Sites
sitinfimp.templatesites = Template Sites
sitinfimp.templatesites.info = The following sites are template sites.
sitinfimp.import=I would like to merge my data
sitinfimp.import.info=Your imported data will be added to any existing site data.
sitinfimp.import.user=I would like to merge my user(s)
sitinfimp.import.user.info=Your imported user(s) will merge with existing users. This is a \
one-time action that does not import roster-provided users.
sitinfimp.mysites = Import from My Sites
sitinfimp.mysites = My Sites
sitinfimp.replace=You have chosen to replace the content in the current site ({0}) by importing \
materials from another site that you own. Select the heading and choose the other site in the list \
below. <strong>Warning:</strong> Any existing data in this current site will be replaced by the data from the site \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,38 @@
<div class="sak-banner-error">$tlang.getString("sitinfimp.alert") $alertMessage</div>
#end
<form name="featuresForm" action="#toolForm("$action")" method="post">

<div class="sak-banner-info">$tlang.getString("sitinfimp.youcan")</div>

#if ($!templateSites && $templateSites.size() > 0)
<div class="mb-4">
<div class="fw-bold mb-2">$tlang.getString("sitinfimp.templatesites")</div>
#foreach($templateSite in $templateSites)
#if ($!currentSite && ($templateSite.Id != $!currentSite.Id))
<div class="checkbox">
<label>
<input type="checkbox" name="importSites" value="$templateSite.getId()"
#if ($!importSiteList.containsKey($!templateSite))
checked="checked"
#end
/>
$formattedText.escapeHtml($templateSite.getTitle())
</label>
</div>
#end
#end
</div>
#end

## import is possible when use has maintain rights on at least one site other than the current one
#if ($!sites && $sites.size()>1)
<p class="instruction">
$tlang.getString("sitinfimp.youcan")
</p>
<div class="fw-bold mb-2">$tlang.getString("sitinfimp.mysites")</div>
#set ($siteIDCounter =0)
#foreach($site in $sites)
#set ($siteIDCounter = $siteIDCounter + 1)
#if ($!currentSite && ($site.Id != $!currentSite.Id))
<div class="checkbox">
<label for="site_$siteIDCounter">
<input type="checkbox" name="importSites" id="site_$siteIDCounter" value="$site.getId()"
<label>
<input type="checkbox" name="importSites" value="$site.getId()"
#if ($!importSiteList.containsKey($!site))
checked="checked"
#end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@
</div>
<div id="mysites" class="collapse in">
<div class="card-body">
#set ($siteIDCounter =0)
#foreach($site in $sites)
#set ($siteIDCounter = $siteIDCounter + 1)
#if ($!currentSite && ($site.Id != $!currentSite.Id))
<div class="radio">
<label for="site_$siteIDCounter">
<input type="radio" name="importSites" id="site_$siteIDCounter" #if ($!importSiteList.containsKey($!site)) checked="checked"#end value="$site.getId()"/>
<label>
<input type="radio" name="importSites" #if ($!importSiteList.containsKey($!site)) checked="checked"#end value="$site.getId()"/>
$formattedText.escapeHtml($site.getTitle())
</label>
</div>
Expand All @@ -53,11 +51,10 @@
$tlang.getString("sitinfimp.hiddensites.info")
</p>
#foreach($hiddenSite in $hiddenSites)
#set ($siteIDCounter = $siteIDCounter + 1)
#if ($!currentSite && ($hiddenSite.Id != $!currentSite.Id))
<div class="radio">
<label for="site_$siteIDCounter">
<input type="radio" name="importSites" id="site_$siteIDCounter" #if ($!importSiteList.containsKey($!hiddenSite)) checked="checked" #end value="$hiddenSite.getId()"/>
<label>
<input type="radio" name="importSites" #if ($!importSiteList.containsKey($!hiddenSite)) checked="checked" #end value="$hiddenSite.getId()"/>
$formattedText.escapeHtml($hiddenSite.getTitle())
</label>
</div>
Expand All @@ -82,11 +79,10 @@
$tlang.getString("sitinfimp.templatesites.info")
</p>
#foreach($templateSite in $templateSites)
#set ($siteIDCounter = $siteIDCounter + 1)
#if ($!currentSite && ($templateSite.Id != $!currentSite.Id))
<div class="radio">
<label for="site_$siteIDCounter">
<input type="radio" name="importSites" id="site_$siteIDCounter" #if ($!importSiteList.containsKey($!templateSite)) checked="checked" #end value="$templateSite.getId()"/>
<label>
<input type="radio" name="importSites" #if ($!importSiteList.containsKey($!templateSite)) checked="checked" #end value="$templateSite.getId()"/>
$formattedText.escapeHtml($templateSite.getTitle())
</label>
</div>
Expand Down

0 comments on commit c5746e3

Please sign in to comment.