1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git synced 2024-09-03 18:36:09 +02:00

Allow to use mypads in subpath

This commit is contained in:
Maniack Crudelis 2018-02-25 19:25:25 +01:00
parent d62ad8cfa6
commit af8d389339
7 changed files with 12 additions and 41 deletions

View file

@ -40,8 +40,6 @@ Supported, **without LDAP nor SSO**.
## Limitations
* If you ask to install the plugin mypads, you have to install in the root of a dedicated domain or a sub domain. Else, mypads will be inaccessible.
## Additionnal informations
* This package will install the following plugins:
@ -62,10 +60,6 @@ Supported, **without LDAP nor SSO**.
* ep_table_of_contents - *View a table of contents for your pad*
* ep_user_font_size - *User Pad Contents font size can be set in settings, this does not effect other peoples views*
* Because there's no ldap support with mypads plugin, no user is created at the installation.
You have to connect to the admin panel to create the first users.
Login and password are those you chose during the installation.
## Links
* Report a bug: https://github.com/YunoHost-Apps/etherpad_mypads_ynh/issues

View file

@ -40,8 +40,6 @@ Supportée, **sans LDAP ni SSO**.
## Limitations
* Si vous demandez d'installer le plugin mypads, vous devez installer à la racine d'un domaine ou d'un sous-domaine dédié. Sinon, mypads sera inaccessible.
## Informations additionnelles
* Ce paquet installera les plugins suivants:
@ -62,10 +60,6 @@ Supportée, **sans LDAP ni SSO**.
* ep_table_of_contents - *Voir une table des matières pour votre pad*
* ep_user_font_size - *Permet de définir taille de la police dans les paramètres, cela n'affecte pas les vues des autres personnes*.
* Parce qu'il n'y a pas de support ldap avec le plugin mypads, aucun utilisateur n'est créé lors de l'installation.
Vous devez vous connecter au panneau d'administration pour créer les premiers utilisateurs.
Login et mot de passe sont ceux que vous avez choisis lors de l'installation.
## Liens
* Reporter un bug: https://github.com/YunoHost-Apps/etherpad_mypads_ynh/issues

View file

@ -1,4 +1,4 @@
;; Test complet avec libreoffice sans mypads
;; Test complet avec libreoffice et mypads
; Manifest
domain="domain.tld" (DOMAIN)
path="/path" (PATH)
@ -7,8 +7,8 @@
language="en"
is_public=1 (PUBLIC|public=1|private=0)
export="libreoffice"
mypads=0
useldap=0
mypads=1
useldap=1
; Checks
pkg_linter=1
setup_sub_dir=1
@ -22,7 +22,7 @@
incorrect_path=1
port_already_use=1 (9001)
change_url=1
;; Test avec mypads
;; Test sans mypads
; Manifest
domain="domain.tld" (DOMAIN)
path="/path" (PATH)
@ -31,12 +31,12 @@
language="en"
is_public=1 (PUBLIC|public=1|private=0)
export="libreoffice"
mypads=1
useldap=1
mypads=0
useldap=0
; Checks
setup_sub_dir=1
setup_root=1
upgrade=1
upgrade=1 from_commit=8bf300413ec3adcb416d168d2e9e98975dd9405b
backup_restore=1
;; Test abiword
; Manifest
@ -51,6 +51,7 @@
useldap=0
; Checks
setup_root=1
upgrade=1 from_commit=8bf300413ec3adcb416d168d2e9e98975dd9405b
;; Test sans export
; Manifest
domain="domain.tld" (DOMAIN)

View file

@ -39,12 +39,8 @@
"en": "Choose a path for Etherpad",
"fr": "Choisissez un chemin pour Etherpad"
},
"help": {
"en": "If you choose to install mypads plugin, etherpad has to be on /",
"fr": "Si vous choisissez d'installer le plugin mypads, etherpad doit être sur /"
},
"example": "/",
"default": "/"
"example": "/pad",
"default": "/pad"
},
{
"name": "admin",

View file

@ -32,15 +32,6 @@ test -n "$new_path" || new_path="/"
new_path=$(ynh_normalize_url_path $new_path)
old_path=$(ynh_normalize_url_path $old_path)
#=================================================
# CHECK IF THE PATH CAN BE CHANGED
#=================================================
if [ "$new_path" != "/" ] && [ $mypads -eq 1 ]
then
ynh_die "Mypads needs to be installed on the root of a domain or a subdomain."
fi
#=================================================
# CHECK WHICH PARTS SHOULD BE CHANGED
#=================================================

View file

@ -48,11 +48,6 @@ then
fi
ynh_print_ON
if [ "$path_url" != "/" ] && [ $mypads -eq 1 ]
then
ynh_die "Mypads needs to be installed on the root of a domain or a subdomain."
fi
final_path=/var/www/$app
test ! -e "$final_path" || ynh_die "This path already contains a folder"
@ -253,7 +248,7 @@ then
ynh_replace_string "^ *\"FOOTER\": .*2.0" "& | <a href='../admin'>Etherpad admin</a>" $final_path/node_modules/ep_mypads/static/l10n/fr.json
mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "</div>" | cut -d '-' -f 1) # Recherche le /div situé sous le champs d'ouverture de pad.
sed -i "$mod_line s@div>@&\n\t<center><br><font size="5"><a href="./mypads">Mypads</a></font></center>@" $final_path/src/templates/index.html # Pour ajouter un lien vers le plugin mypads depuis la page d'Etherpad.
sed -i "$mod_line s@div>@&\n\t<center><br><font size="5"><a href="./mypads/">Mypads</a></font></center>@" $final_path/src/templates/index.html # Pour ajouter un lien vers le plugin mypads depuis la page d'Etherpad.
fi
#=================================================

View file

@ -233,7 +233,7 @@ ynh_add_systemd_config
if [ $mypads -eq 1 ]
then
mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "</div>" | cut -d '-' -f 1) # Recherche le /div situé sous le champs d'ouverture de pad.
sed -i "$mod_line s@div>@&\n\t<center><br><font size="5"><a href="./mypads">Mypads</a></font></center>@" $final_path/src/templates/index.html # Pour ajouter un lien vers le plugin mypads depuis la page d'Etherpad.
sed -i "$mod_line s@div>@&\n\t<center><br><font size="5"><a href="./mypads/">Mypads</a></font></center>@" $final_path/src/templates/index.html # Pour ajouter un lien vers le plugin mypads depuis la page d'Etherpad.
fi
#=================================================