diff --git a/CHANGELOG.md b/CHANGELOG.md index 294662e..1e8fcb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - add option to approximate elevation of new point [#18](https://gitlab.com/eneiluj/gpxedit-oc/issues/18) @TheTiPi +- support for ownCloud admin settings ### Changed - change way to cut lines, hover the middle marker and press Del diff --git a/README.md b/README.md index 4fcc955..23cc18b 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Elevation data is loaded and saved but every new waypoint/track/trackpoint added Tracks are saved with one segment (trkseg tag). GpxEdit : -- allows you to add extra symbols in Nextcloud(\*) admin settings (section : additional) +- allows you to add extra symbols in admin settings (section : additional) - works with server-side encryption. - works with shared files. - loads GPX, KML, unicsv CSV, geotagged JPG files (requires Gpsbabel to convert files and import pictures) @@ -44,15 +44,13 @@ GpxEdit : - adds possibility to edit .gpx files directly from the "Files" app - is able to cut lines in two -This app is tested on Owncloud 9 with Firefox and Chromium. +This app is tested on Owncloud 10 with Firefox and Chromium. This app is tested on Nextcloud 11 and 12 with Firefox and Chromium. Any feedback will be appreciated. If you want to help to translate this app in your language, take the english=>french files in "l10n" directory as examples. -(\*) : If you run Owncloud, you still can add extra symbols by putting png files in /path/to/owncloud/data/gpxedit/symbols/ folder. - ## Donation I develop this app during my free time. You can make a donation to me on Paypal. [Click HERE to make a donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66PALMY8SF5JE) (you don't need a paypal account) diff --git a/appinfo/info.xml b/appinfo/info.xml index 54d8e7f..f396b19 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -39,7 +39,7 @@ Elevation data is loaded and saved but every new waypoint/track/trackpoint added Tracks are saved with one segment (trkseg tag). GpxEdit : -- allows you to add extra symbols in Nextcloud(\*) admin settings (section : additional) +- allows you to add extra symbols in admin settings (section : additional) - works with server-side encryption. - works with shared files. - loads GPX, KML, unicsv CSV, geotagged JPG files (requires Gpsbabel to convert files and import pictures) @@ -52,15 +52,13 @@ GpxEdit : - adds possibility to edit .gpx files directly from the "Files" app - is able to cut lines in two -This app is tested on Owncloud 9 with Firefox and Chromium. +This app is tested on Owncloud 10 with Firefox and Chromium. This app is tested on Nextcloud 11 and 12 with Firefox and Chromium. Any feedback will be appreciated. If you want to help to translate this app in your language, take the english=>french files in "l10n" directory as examples. -(\*) : If you run Owncloud, you still can add extra symbols by putting png files in /path/to/owncloud/data/gpxedit/symbols/ folder. - ## Donation I develop this app during my free time. You can make a donation to me on Paypal. [There is a donation link HERE](https://gitlab.com/eneiluj/gpxedit-oc#donation) (you don't need a paypal account) diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php index 8d4abf9..7e4d7f8 100644 --- a/lib/Settings/Admin.php +++ b/lib/Settings/Admin.php @@ -104,4 +104,33 @@ class Admin implements ISettings { return 5; } + /** + * @return TemplateResponse + * for ownCloud 10+ + */ + public function getPanel() { + $uploadPath = $this->urlGenerator->linkToRoute('gpxedit.utils.uploadExtraSymbol'); + //$extraSymbolList = Array(Array('name'=>'plop', 'url'=>'huhu'), Array('name'=>'lll', 'url'=>'uuu')); + $extraSymbolList = Array(); + foreach(globRecursive($this->dataDirPath.'/symbols', '*.png', False) as $symbolfile){ + $filename = basename($symbolfile); + array_push($extraSymbolList, Array('smallname'=>str_replace('.png', '', $filename), 'name'=>$filename)); + } + + $parameters = [ + 'extraSymbolList' => $extraSymbolList, + 'uploadPath' => $uploadPath + ]; + + return new TemplateResponse('gpxedit', 'admin', $parameters, ''); + } + + /** + * @return string the section ID, e.g. 'sharing' + * for ownCloud 10+ + */ + public function getSectionID() { + return 'additional'; + } + }