Skip to content

Commit

Permalink
New resource option "Use current alias in alias path" to allow hiding…
Browse files Browse the repository at this point in the history
… resources from the URI [modxcms#11153, modxcms#13660]

Merge remote-tracking branch 'upstream/pr/13660' into 2.x

* upstream/pr/13660:
  Update translation (taken from evo)
  Fix alias_visible checkbox in quick create/update window
  Fix typo
  Add alias_visible checkbox to quick update resource form
  Refresh children URIs on save/update when alias_visible is marked as dirty
  Implement logic for hiding parent alias fragments
  Restate resource modext changes
  Undo accidental changes to modResource
  Set default checkbox value to checked
  Add english lexicon entries
  Move checkbox to the left side and add help text + label
  Add alias_visible checkbox to resource form
  Add upgrade script for new column field
  Add property to modResource class
  Add alias_visible to map files
  • Loading branch information
Mark-H committed Jan 29, 2018
2 parents 851e95d + 4802026 commit 589afa2
Show file tree
Hide file tree
Showing 38 changed files with 267 additions and 131 deletions.
1 change: 1 addition & 0 deletions core/docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ This file shows the changes in recent releases of MODX. The most current release
development release, and is only shown to give an idea of what's currently in the pipeline.

- Add "Purge Old Versions" button to the package version listing to clean up old versions [#12818]
- New resource option "Use current alias in alias path" to allow hiding resources from the URI [#11153]
- Make $modx->setDebug support E_LEVEL constants (e.g. E_NOTICE/E_ERROR) and fix setting debug to 1 not working [#12579]
- Use stricter check for string type in resource tree to avoid uncaught error in edge cases [#13262]
- Allow plugins OnDocFormRender to set templates with $resource->set('template', 3) [#13049]
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/ar/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'ليس لديك صلاحية لإنشاء مصدر في هذا المكان.';
$_lang['resource_alias'] = 'الاسم المستعار للمصدر';
$_lang['resource_alias_help'] = 'إسم مستعار للمصدر. فتح المصدر بإسم مستعار, مثال:<br /><br />http://yourserver/<span dir="ltr">الاسم المستعار </span><br /><br /><strong>تنبيه</strong>هذه الخاصية تعمل عند تنشيط خاصية العناوين المعدّلة.';
$_lang['resource_alias_visible'] = 'Use current alias in alias path';
$_lang['resource_alias_visible_help'] = 'Check this to include the alias of this resource in the resource path for children.';
$_lang['resource_change_template_confirm'] = 'هل أنت متأكد من تغيير القالب؟ <br /><br />تحذير: سيقوم هذا الإجراء<b>بالتخزين المؤقت</b> لتغييراتك السابقة و إعادة تحميل الصفحة. بعد إعادة تحميل الصفحة, يجب عليك حفظ القالب .';
$_lang['resource_cacheable'] = 'قابل للتخزين في الذاكرة المؤقتة';
$_lang['resource_cacheable_help'] = 'عند التفعيل ,سيتم حفظ المصدر في الذاكرة المؤقتة.';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/be/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'You do not have permission to create a Resource in this location.';
$_lang['resource_alias'] = 'Псеўданім';
$_lang['resource_alias_help'] = 'An alias for this resource. This will make the resource accessible using:<br /><br />http://yourserver/alias<br /><br /><strong>Note</strong>This only works if you\'re using friendly URLs.';
$_lang['resource_alias_visible'] = 'Use current alias in alias path';
$_lang['resource_alias_visible_help'] = 'Check this to include the alias of this resource in the resource path for children.';
$_lang['resource_change_template_confirm'] = 'Are you sure you want to change the Template? <br /><br />WARNING: This will <b>only temporarily store</b> your prior changes and reload the page; ensure you are ready to do so before proceeding. After the page has reloaded, you will need to save when you are ready to save the Template change.';
$_lang['resource_cacheable'] = 'Кэшаваны';
$_lang['resource_cacheable_help'] = 'When enabled, the resource will be saved to the cache.';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/bg/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'You do not have permission to create a Resource in this location.';
$_lang['resource_alias'] = 'Resource Alias';
$_lang['resource_alias_help'] = 'An alias for this resource. This will make the resource accessible using:<br /><br />http://yourserver/alias<br /><br /><strong>Note</strong>This only works if you\'re using friendly URLs.';
$_lang['resource_alias_visible'] = 'Use current alias in alias path';
$_lang['resource_alias_visible_help'] = 'Check this to include the alias of this resource in the resource path for children.';
$_lang['resource_change_template_confirm'] = 'Are you sure you want to change the Template? <br /><br />WARNING: This will <b>only temporarily store</b> your prior changes and reload the page; ensure you are ready to do so before proceeding. After the page has reloaded, you will need to save when you are ready to save the Template change.';
$_lang['resource_cacheable'] = 'Cacheable';
$_lang['resource_cacheable_help'] = 'When enabled, the resource will be saved to the cache.';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/cs/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'Nemáte oprávnění vytvořit dokument v tomto místě.';
$_lang['resource_alias'] = 'URL alias';
$_lang['resource_alias_help'] = 'URL alias dokumentu. Toto udělá dokument přístupný z:<br /><br />http://vas-server/url-alias<br /><br /><strong>Poznámka</strong>: Toto bude fungovat pouze pokud používáte "Přátelská URL".';
$_lang['resource_alias_visible'] = 'Use current alias in alias path';
$_lang['resource_alias_visible_help'] = 'Check this to include the alias of this resource in the resource path for children.';
$_lang['resource_change_template_confirm'] = 'Opravdu chcete změnit šablonu? Tímto dojde k odstranění všech template variable použitých v rámci aktuální šablony u tohoto dokumentu.';
$_lang['resource_cacheable'] = 'Ukládat cache';
$_lang['resource_cacheable_help'] = 'Pokud je aktivní, dokument bude ukládán do cache.';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/da/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'Du har ikke tilladelse til at oprette en ressource på denne placering.';
$_lang['resource_alias'] = 'Ressource Alias';
$_lang['resource_alias_help'] = 'Et alias for denne ressource. Dette vil gøre ressourcen tilgængelig med: <br /><br />http://yourserver/alias <br /><br /> <strong>Bemærk</strong> dette virker kun hvis du har aktiveret søgemaskinevenlige URLs i systemindstillingerne.';
$_lang['resource_alias_visible'] = 'Use current alias in alias path';
$_lang['resource_alias_visible_help'] = 'Check this to include the alias of this resource in the resource path for children.';
$_lang['resource_change_template_confirm'] = 'Er du sikker på at du vil ændre skabelonen?<br /><br />ADVARSEL: Dette vil <b>kun midlertidigt gemme</b> dine tidligere ændringer og genindlæse siden. Vær sikker på du er klar før du fortsætter. Efter siden er genindlæst skal du gemme før ændringen af skabelon er permanent.';
$_lang['resource_cacheable'] = 'Cache-bar';
$_lang['resource_cacheable_help'] = 'Når aktiveret, gemmes ressourcen til cache.';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/de/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'Sie haben keine Berechtigung, an dieser Stelle eine Ressource zu erstellen.';
$_lang['resource_alias'] = 'Ressourcen-Alias';
$_lang['resource_alias_help'] = 'Ein Alias für diese Ressource. Dies wird die Ressource verfügbar machen unter:<br /><br />http://ihrserver/alias<br /><br /><strong>Hinweis:</strong> Dies funktioniert nur, wenn Sie suchmaschinenfreundliche URLs verwenden.';
$_lang['resource_alias_visible'] = 'Alias im Alias-Pfad ausgeben';
$_lang['resource_alias_visible_help'] = 'Den Alias dieser Ressource im generierten Alias-Pfad ausgeben.';
$_lang['resource_change_template_confirm'] = 'Sind Sie sicher, dass Sie das Template wechseln möchten?<br /><br />WARNUNG: Hierdurch werden Ihre vor dem Template-Wechsel vorgenommenen Änderungen <b>nur temporär gespeichert</b> und die Seite neu geladen; bitte stellen Sie sicher, dass Sie bereit sind, dies zu tun, bevor Sie fortfahren. Nachdem die Seite neu geladen wurde, müssen Sie die Ressource speichern, wenn Sie bereit sind, auch den Template-Wechsel selbst zu speichern.';
$_lang['resource_cacheable'] = 'Cache aktiv';
$_lang['resource_cacheable_help'] = 'Wenn diese Einstellung aktiviert ist, wird die Ressource in den Cache übernommen.';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/el/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'You do not have permission to create a Resource in this location.';
$_lang['resource_alias'] = 'Resource Alias';
$_lang['resource_alias_help'] = 'An alias for this resource. This will make the resource accessible using:<br /><br />http://yourserver/alias<br /><br /><strong>Note</strong>This only works if you\'re using friendly URLs.';
$_lang['resource_alias_visible'] = 'Use current alias in alias path';
$_lang['resource_alias_visible_help'] = 'Check this to include the alias of this resource in the resource path for children.';
$_lang['resource_change_template_confirm'] = 'Are you sure you want to change the Template? <br /><br />WARNING: This will <b>only temporarily store</b> your prior changes and reload the page; ensure you are ready to do so before proceeding. After the page has reloaded, you will need to save when you are ready to save the Template change.';
$_lang['resource_cacheable'] = 'Cacheable';
$_lang['resource_cacheable_help'] = 'When enabled, the resource will be saved to the cache.';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/en/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'You do not have permission to create a Resource in this location.';
$_lang['resource_alias'] = 'Resource Alias';
$_lang['resource_alias_help'] = 'An alias for this resource. This will make the resource accessible using:<br /><br />http://yourserver/alias<br /><br /><strong>Note</strong>This only works if you\'re using friendly URLs.';
$_lang['resource_alias_visible'] = 'Use current alias in alias path';
$_lang['resource_alias_visible_help'] = 'The alias of this Resource is inserted in Friendly URL alias path';
$_lang['resource_change_template_confirm'] = 'Are you sure you want to change the Template? <br /><br />WARNING: This will <b>only temporarily store</b> your prior changes and reload the page; ensure you are ready to do so before proceeding. After the page has reloaded, you will need to save when you are ready to save the Template change.';
$_lang['resource_cacheable'] = 'Cacheable';
$_lang['resource_cacheable_help'] = 'When enabled, the resource will be saved to the cache.';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/es/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'No tienes permiso para crear un Recurso aquí.';
$_lang['resource_alias'] = 'Alias del Recurso';
$_lang['resource_alias_help'] = 'Un alias para este recurso. Esto hará el recurso accesible a través de:<br /><br />http://tuservidor/alias<br /><br /><strong>Nota</strong>Sólo funciona con las URLs amigables activadas.';
$_lang['resource_alias_visible'] = 'Utilizar alias actual en ruta de alias';
$_lang['resource_alias_visible_help'] = 'El alias de este Recurso se insertará en la ruta de alias de URL amigable';
$_lang['resource_change_template_confirm'] = '¿Estás seguro de que quieres cambiar la plantilla? <br /><br />ADVERTENCIA: Esto <b>sólo guardará temporalmente</b> los cambios hechos previamente y cargará la página nuevamente; asegúrate de estar listo para hacerlo antes de continuar. Después que la página sea recargada recuerda guardar el cambio de Plantilla cuando estés listo.';
$_lang['resource_cacheable'] = 'Almacenable en Caché';
$_lang['resource_cacheable_help'] = 'Cuando está habilitado, el recurso será guardado en la caché.';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/et/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'Teil puuduvad õigused Ressurssi loomiseks siia.';
$_lang['resource_alias'] = 'Ressurssi Alias';
$_lang['resource_alias_help'] = 'Alias selle ressurssi jaoks. See võimaldab ressurssile juurdepääseda aadressilt:<br /><br />http://sinuserver/alias<br /><br /><strong>Märge:</strong> See töötab ainult kui kasutate sõbralike URL-e (friendly URLs).';
$_lang['resource_alias_visible'] = 'Use current alias in alias path';
$_lang['resource_alias_visible_help'] = 'Check this to include the alias of this resource in the resource path for children.';
$_lang['resource_change_template_confirm'] = 'Olete kindel, et soovite muuta seda templatet?';
$_lang['resource_cacheable'] = 'Puhverdatav';
$_lang['resource_cacheable_help'] = 'Kui lubatud, siis see resurss salvestatakse puhvrisse.';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/fa/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'You do not have permission to create a Resource in this location.';
$_lang['resource_alias'] = 'Resource Alias';
$_lang['resource_alias_help'] = 'An alias for this resource. This will make the resource accessible using:<br /><br />http://yourserver/alias<br /><br /><strong>Note</strong>This only works if you\'re using friendly URLs.';
$_lang['resource_alias_visible'] = 'Use current alias in alias path';
$_lang['resource_alias_visible_help'] = 'Check this to include the alias of this resource in the resource path for children.';
$_lang['resource_change_template_confirm'] = 'Are you sure you want to change the Template? <br /><br />WARNING: This will <b>only temporarily store</b> your prior changes and reload the page; ensure you are ready to do so before proceeding. After the page has reloaded, you will need to save when you are ready to save the Template change.';
$_lang['resource_cacheable'] = 'Cacheable';
$_lang['resource_cacheable_help'] = 'When enabled, the resource will be saved to the cache.';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/fi/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'Sinulla ei ole oikeuksia luoda resurssia tähän sijaintiin.';
$_lang['resource_alias'] = 'Resurssin alias';
$_lang['resource_alias_help'] = 'Resurssin alias. Tämä tekee resurssin URL:n muotoon: < br / > < br / > http://domain/alias < br / > < br / > <strong>Huomautus!</strong> Tämä toimii vain, jos käytät hakukone ystävällistä URL:ia.';
$_lang['resource_alias_visible'] = 'Käytä nykyistä aliasta aliaspolussa';
$_lang['resource_alias_visible_help'] = 'The alias of this Resource is inserted in Friendly URL alias path';
$_lang['resource_change_template_confirm'] = 'Are you sure you want to change the Template? <br /><br />WARNING: This will <b>only temporarily store</b> your prior changes and reload the page; ensure you are ready to do so before proceeding. After the page has reloaded, you will need to save when you are ready to save the Template change.';
$_lang['resource_cacheable'] = 'Välimuistiin';
$_lang['resource_cacheable_help'] = 'When enabled, the resource will be saved to the cache.';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/fr/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'Vous n\'avez pas la permission de créer une ressource à cet endroit.';
$_lang['resource_alias'] = 'Alias de la ressource';
$_lang['resource_alias_help'] = 'Un alias pour cette ressource. Cela rendra les ressources accessibles comme ceci : <br /><br /> http://votredomaine.com/alias <br /><br /> <strong>Remarque</strong> Cela ne fonctionne que si vous utilisez la réécriture d\'URL (ex. via .htaccess).';
$_lang['resource_alias_visible'] = 'Utiliser l\'alias du document dans chemin d\'alias';
$_lang['resource_alias_visible_help'] = 'L\'alias de ce document sera utilisé dans le chemin d\'alias';
$_lang['resource_change_template_confirm'] = 'Êtes-vous sûr de vouloir modifier ce modèle ? <br /><br />ATTENTION : Ceci <b>enregistrera temporairement</b> les changements effectués et rechargera la page; assurez-vous de vouloir ceci avant de continuer. Après le chargement de la page, vous devrez enregistrer à nouveau pour que le changement de modèle soit pris en compte.';
$_lang['resource_cacheable'] = 'Mise en cache possible';
$_lang['resource_cacheable_help'] = 'Lorsqu\'il est activé, la ressource sera sauvegardé dans le cache.';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/he/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'You do not have permission to create a Resource in this location.';
$_lang['resource_alias'] = 'Resource Alias';
$_lang['resource_alias_help'] = 'An alias for this resource. This will make the resource accessible using:<br /><br />http://yourserver/alias<br /><br /><strong>Note</strong>This only works if you\'re using friendly URLs.';
$_lang['resource_alias_visible'] = 'Use current alias in alias path';
$_lang['resource_alias_visible_help'] = 'Check this to include the alias of this resource in the resource path for children.';
$_lang['resource_change_template_confirm'] = 'Are you sure you want to change the Template? <br /><br />WARNING: This will <b>only temporarily store</b> your prior changes and reload the page; ensure you are ready to do so before proceeding. After the page has reloaded, you will need to save when you are ready to save the Template change.';
$_lang['resource_cacheable'] = 'Cacheable';
$_lang['resource_cacheable_help'] = 'When enabled, the resource will be saved to the cache.';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/hi/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'आप इस स्थान पर Resource बनाने के लिए अनुमति नहीं है।';
$_lang['resource_alias'] = 'Resource Alias';
$_lang['resource_alias_help'] = 'इस Resource के लिए एलियास है। यह Resource सुलभ का उपयोग करना होगा: <br /><br /> http://yourserver/alias <br /><br /><strong>नोट</strong> यदि आप friendly यूआरएल का उपयोग कर रहे हैं यह केवल काम करता है।';
$_lang['resource_alias_visible'] = 'Use current alias in alias path';
$_lang['resource_alias_visible_help'] = 'Check this to include the alias of this resource in the resource path for children.';
$_lang['resource_change_template_confirm'] = 'आप सुनिश्चित करें कि आप टेम्पलेट बदलने के लिए चाहते हैं? <br /><br /> चेतावनी: यह <b>केवल अस्थायी रूप से संग्रहीत</b> होगी आपके पूर्व परिवर्तन और पुनः लोड पृष्ठ; आप आगे बढ़ने से पहले ऐसा करने के लिए तैयार कर रहे हैं सुनिश्चित करें। पृष्ठ पुनः लोड है के बाद, आप जब आप टेम्पलेट बदलने को बचाने के लिए तैयार कर रहे हैं बचाने के लिए की आवश्यकता होगी।';
$_lang['resource_cacheable'] = 'Cacheable';
$_lang['resource_cacheable_help'] = 'जब सक्षम, संसाधन cache करने के लिए सहेजा जाएगा।';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/hu/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'You do not have permission to create a Resource in this location.';
$_lang['resource_alias'] = 'Resource Alias';
$_lang['resource_alias_help'] = 'An alias for this resource. This will make the resource accessible using:<br /><br />http://yourserver/alias<br /><br /><strong>Note</strong>This only works if you\'re using friendly URLs.';
$_lang['resource_alias_visible'] = 'Use current alias in alias path';
$_lang['resource_alias_visible_help'] = 'Check this to include the alias of this resource in the resource path for children.';
$_lang['resource_change_template_confirm'] = 'Are you sure you want to change the Template? <br /><br />WARNING: This will <b>only temporarily store</b> your prior changes and reload the page; ensure you are ready to do so before proceeding. After the page has reloaded, you will need to save when you are ready to save the Template change.';
$_lang['resource_cacheable'] = 'Cacheable';
$_lang['resource_cacheable_help'] = 'When enabled, the resource will be saved to the cache.';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/id/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
$_lang['resource_add_children_access_denied'] = 'Anda tidak memiliki izin untuk menciptakan sumber daya yang di lokasi ini.';
$_lang['resource_alias'] = 'Sumber daya alias';
$_lang['resource_alias_help'] = 'Alias untuk sumber ini. Ini akan membuat sumber daya dapat diakses menggunakan: <br /><br /> http://yourserver/alias <br /><br /><strong>catatan</strong> ini hanya bekerja jika Anda menggunakan URL ramah.';
$_lang['resource_alias_visible'] = 'Use current alias in alias path';
$_lang['resource_alias_visible_help'] = 'Check this to include the alias of this resource in the resource path for children.';
$_lang['resource_change_template_confirm'] = 'Apakah Anda yakin Anda ingin mengubah Template? <br /><br /> PERINGATAN: Ini akan <b>hanya sementara menyimpan</b> perubahan Anda sebelumnya dan memuat ulang halaman; Pastikan Anda siap untuk melakukannya sebelum melanjutkan. Setelah halaman telah reloaded, Anda akan perlu untuk menyelamatkan ketika Anda siap untuk menyimpan perubahan Template.';
$_lang['resource_cacheable'] = 'Cache';
$_lang['resource_cacheable_help'] = 'Bila diaktifkan, sumber daya yang akan disimpan ke cache.';
Expand Down
Loading

0 comments on commit 589afa2

Please sign in to comment.