Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address scenarios with close page-media relations #279

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

splitbrain
Copy link
Collaborator

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 64e370e 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 2ddb0d5

A new checkbox allows to move referenced page media along with a page
rename.

This happens only if

* the checkbox is ticked
* the page actually moves to a new namespace
* the page was not in the root namespace
* the referenced media is in the same namespace as the page
This rewrite drops all dependencies on jQuery for the tree manager and
uses modern JavaScript for the drag'n'drop operations. It introduces the
posibility to view the tree as a merged tree of page and media
namespaces (similar to what we do in the ACL manager). This merged view
is often advantageous in wikis where both trees are very similar. A
default view can be set in the configuration but users can switch
between the views on a case by case basis.

This does not change any functionality in any of the other scripts or in
the way how the move is executed. It's a GUI refresh only.

Other parts of the plugin could use a GUI refresh as well (eg. use the
same SVG based icons and drop jQuery dependencies).
The duplicate message now displays a full ID including the namespace,
so the string had to be adjusted. This removes it from all language
files to have translators retranslate it.
We let the browser throw an error instead of trying to figure it out
ourself.
It's fine to have a page and a namespace named the same. Or a media file
and a page named the same.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant