Jump to content

Publish/Unpublish button in Control Panel


DP

Recommended Posts

In the control panel of Paidlistings:

 

File: paid_account/listings.thtml

 

If a user has 50+ listings, and has some of them unpublished, it is very difficult to distinguish which ones are, and which are not.

It requires him to mouseover every single listingsmanager dropdown, to see if the 'Published' text and icon is there.

 

So I'm creating a secondary column, on the page, that is dedicated to Publishing/Unpublishing listings.

 

The code below, works, and all variables are passed correctly, mirroring the code of the listingsmanager button.

 

However, I'm missing something, since clicking the link, does not give a response.

 

<a href="javascript:void(0)" class="jr-listing-publish"
                        data-token="<?php echo cmsFramework::getCustomToken($listing['Listing']['listing_id']);?>"
                        data-listing-id="<?php echo $listing['Listing']['listing_id'];?>"
                        data-states='{"on":"jrIconPublished","off":"jrIconUnpublished"}'>
                        <span class="<?php echo $listing['Listing']['state'] ? 'jrIconPublished' : 'jrIconUnpublished';?>"></span>
                        <span><?php echo ($listing['Listing']['state'] ? __t("Published",true): __t("Unpublished",true));?></span>
</a>

 

I would appreciate any clues.

 

Link to comment
×
×
  • Create New...