Delete the Contacts/Calender section from the admin page if the user didn't enable Nextcloud

Also, restored the old text in sync-guide.html since the user would only see it if he enabled Nextcloud
This commit is contained in:
dkoao 2019-09-28 09:25:13 +00:00
parent fc9389ac51
commit 5e13c55f89
3 changed files with 8 additions and 4 deletions

View File

@ -147,9 +147,7 @@
{% include "aliases.html" %}
</div>
<div id="panel_sync_guide" class="admin_panel">
{% include "sync-guide.html" %}
</div>
<div id="panel_sync_guide" class="admin_panel">{% include "sync-guide.html" %}</div>
<div id="panel_web" class="admin_panel">
{% include "web.html" %}

View File

@ -1,7 +1,7 @@
<div>
<h2>Contacts &amp; Calendar Synchronization</h2>
<p>If you chose to install Nextcloud, then this box can hold your contacts and calendar, just like it holds your email.</p>
<p>This box can hold your contacts and calendar, just like it holds your email.</p>
<hr>

View File

@ -85,6 +85,12 @@ unzip -q /tmp/bootstrap.zip -d $assets_dir
mv $assets_dir/bootstrap-$bootstrap_version-dist $assets_dir/bootstrap
rm -f /tmp/bootstrap.zip
# Remove the Contacts/Calendar section from the admin page if the user didn't enable Nextcloud
if [ "${DISABLE_NEXTCLOUD}" == 0 ]; then
sed -i '/sync_guide/d' ../management/templates/index.html
rm ../management/templates/sync-guide.html
fi
# Create an init script to start the management daemon and keep it
# running after a reboot.
cat > $inst_dir/start <<EOF;