This is more of a "feature offer" than a request.

For a specific case use of Domain, we need an additional display under Affiliated content to basically show all nodes without any form of domain filtering, but with some additional visual information on their affiliate-assignment values based on the current domain (fetched from $_domain). This would be achieved with the use of background colors, ie green for content that's visible on the current domain and red for content that isn't. This way the user can quickly assess what content is available to be assigned to the current domain and what's already there.

I will be developing this functionality for someone, and I initially set out to do this in a small helper module. The problem is that I haven't found a way to hook into the point where the 'domain_site" filter is set and prevent that based on my "show all contents" flag. It would be considerably easier to make the few necessary changes directly in domain_content.admin.inc, but I'd rather not start hacking up the module. So the questions are:

- is this a feature you would be potentially interested in? If so, I can work on this and post a patch for evaluation as soon as it's done.
- if not, any particular reasons why? And any advice on how to set this up in an external helper module without replicating the code in domain_content_form?

Thanks again for Domain, it is a tremendous time-saver.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

agentrickard’s picture

This is not included now because the normal 'Content list' admin page does it.

But I can see the use of this, for editors who cannot 'administer nodes' so a patch is fine. I wouldn't use background colors, personally, but * or other cues.

You _may_ be able to build this in Views now, too.

nonsie’s picture

You should be able to do this using Views in HEAD. You'll need to theme the output to get the background color set properly.
Views Bulk Update/actions(or Rules) should give you the form part, the half you might end up writing is actions for DA.

IMHO there's no reason to write another module if the same can be achieved using existing modules.

agentrickard’s picture

True, but for features like this, I still don't like to introduce a Views + VBO dependency. I still think that modules should provide their own admin, so this is a feature worth considering, though I don't think the maintainers have time to work on it now.

tirdadc’s picture

FileSize
4.55 KB

Here is the patch that adds a new screen called Assigned and available Content under Affiliated Content. You'll get to view all contents on that page regardless of their affiliate status, but with a CSS class on the node link being set one way or another depending on that node's visibility settings on the current domain. The new file is just a simple example CSS that uses the classes to set the visible nodes to green and the unassigned ones to gray.

I did try to achieve this using Views (specifically through modifying Views Bulk Operations), but once you add the domain value to the list of values you want to fetch for your nodes, it (understandably) results in duplicate nodes, showing the same ones as many times as there are assigned domains. Plus if this can be done directly through a Domain-related screen, it would be easier in terms of user interaction.

The changes are pretty minor, please let me know what you think of them.

I'll also have to start a separate thread for possibly contributing Domain Contact, which is a simple module to allow admins to set a different override email address for the contact form based on the domain value. Let me know if you think that could be of use.

agentrickard’s picture

Status: Active » Needs review
agentrickard’s picture

Version: 6.x-2.0-rc6 » 6.x-2.0-rc7
Status: Needs review » Needs work
FileSize
7.02 KB

Interesting. Some notes:

1) Remove the stray tab characters from the patch and check Drupal coding standards using Coder.

2) You aren't loading the CSS file, which you should, just for this new page.

3) I don't like the page title or menu order.

4) Why 'green' for one and 5d for the other color? Consistency!

5) Not sure I like the color coding. I added an * for the color blind, too.

6) Added some help text to the form.

7) We need notes about this page in README.txt.

Revised to HEAD.

carlosdavis’s picture

I'm sorry if this is a bit off-topic, but were you able to successfully query for all content irrespective of domain assignment in one view for a non-super-admin user?

I have many many domains under domain access, the majority of which have content published only "locally," but I'd like a domain-ignorant recent content view. Is this a solved problem?

agentrickard’s picture

Status: Needs work » Closed (won't fix)

No one really cares, so it's not going in.

Jumoke’s picture

Version: 6.x-2.0-rc7 » 7.x-3.x-dev
Status: Closed (won't fix) » Active

hi agentrickard, i care! ;) please let it go in.
I am looking for a solution for this, any ideas please. Thanks

agentrickard’s picture

Re-roll the patch, if you can.

agentrickard’s picture

Status: Active » Closed (won't fix)