google-code-export / wordpress-custom-content-type-manager

Automatically exported from code.google.com/p/wordpress-custom-content-type-manager
2 stars 1 forks source link

Show in the admin panel which Related items are in the Trash #523

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
BEFORE YOU FILE: Are you using the latest version of the CCTM?  Please
check http://wordpress.org/extend/plugins/custom-content-type-manager/

What functionality do you want to see?
I would like to see a message or colored-background or some indication that 
related items were trashed (not deleted) so that content authors could go 
through and identify why certain related content types aren't showing up on the 
page.

Do you have examples of similar functionality on other sites or in other
plugins? (Please share URLs below)
N/A

Please provide any additional information below.

Original issue reported on code.google.com by kevin.gh...@group3solutions.com on 11 Sep 2013 at 8:28

GoogleCodeExporter commented 9 years ago
You could do this already by utilizing some custom formatting templates in your 
manager pages, e.g. your fields/elements/_relation.tpl file could rely on a 
[+post_status+] and some custom CSS rule, e.g. a CSS rule for .myrelation_trash

<span class="cctm_relation myrelation_[+post_status+]" ...

You could leverage such a css rule as long as your search criteria included 
trashed items (set which post statuses are visible when you define the custom 
field).  Otherwise, a secondary query would be required for each relation 
field, and that's probably risking too much overhead.  

Another custom workaround might be to add in a hidden field with a bit of 
PHP/MySQL to run the desired reporting query, then use a custom tpl file to 
display the results.

Original comment by ever...@fireproofsocks.com on 11 Sep 2013 at 9:14

GoogleCodeExporter commented 9 years ago
I like the first idea a lot better for my needs. That's pretty neat.

My issue is I don't know how to style the admin panel through the theme. Do you 
have any good references on how to do it?

Original comment by kevin.gh...@group3solutions.com on 11 Sep 2013 at 9:24

GoogleCodeExporter commented 9 years ago
Hope that helps.  I don't have a link handy, but I know there's a way to 
include a manager.css file from your theme inside the manager -- there are 
themes that do this.  Worst case scenario is to include a <style> block in your 
custom tpl file and make your declaration there in-line.

Original comment by ever...@fireproofsocks.com on 11 Sep 2013 at 9:32