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

Fix triple mypads links

This commit is contained in:
ericgaspar 2021-05-05 00:01:16 +02:00
parent 2ee32ce4e3
commit 509199dcf8
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 7 additions and 6 deletions

View file

@ -280,9 +280,9 @@ then
ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | <a href='../admin'>Etherpad admin</a>" --target_file=$final_path/node_modules/ep_mypads/static/l10n/en.json
ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | <a href='../admin'>Etherpad admin</a>" --target_file=$final_path/node_modules/ep_mypads/static/l10n/fr.json
# Find the /div just after the field to open a pad
## Find the /div just after the field to open a pad
#mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "</div>" | cut -d '-' -f 1)
# In order to add a link to mypads plugin.
## In order to add a link to MyPads plugin.
#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
sed -i '157i<center><br><font size="5"><a href="./mypads/">MyPads</a></font></center>' $final_path/src/templates/index.html
fi

View file

@ -440,10 +440,11 @@ fi
if [ "$upgrade_type" == "UPGRADE_APP" ] && [ $mypads -eq 1 ]
then
# Find the /div just after the field to open a pad
mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "</div>" | cut -d '-' -f 1)
# In order to add a link to mypads plugin.
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
# # Find the /div just after the field to open a pad
# mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "</div>" | cut -d '-' -f 1)
# # In order to add a link to mypads plugin.
# 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
sed -i '157i<center><br><font size="5"><a href="./mypads/">MyPads</a></font></center>' $final_path/src/templates/index.html
fi
#=================================================