michitux / dokuwiki-plugin-move

Move and rename pages and namespaces whilst maintaining the links
http://www.dokuwiki.org/plugin:move
GNU General Public License v2.0
40 stars 20 forks source link

Address scenarios with close page-media relations #279

Open splitbrain opened 3 months ago

splitbrain commented 3 months ago

Some people use media files in close relation with the pages. Eg. media is rarely reused across different pages and rarely across namespaces. Usually media files are located in namespaces named exactly like the namespace of the page they are used in. In this scenario it is desirable to move media together with the page. (See #222, #269, #273 and possibly others).

This PR addresses this scenario in two ways:

  1. The rename dialog has a new option called "Move referenced media files along with the page". When using this option all media that resides in the same namespace (named the same) as the page and is used in the page will be moved with the page if the rename operation assigns it a new namespace. See 64e370eb7e8064ba13451de082bd64a81c90d26a for details
  2. A full rewrite of the Tree Manager allows users to view a tree that is a representation of page and media file trees merged into one. This is similar to the view we use in the ACL manager. This makes it easier in the above scenario to rename/move whole hierarchies but keeping pages and media files together. Most of the work is done in 2ddb0d5a89cfea21f4e9e4e839d3745daae7fd52