help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

Feature requests for JEM 2.0 - initial public release

add option to hide/show only "open dates" in the view

add option to hide "open dates" in the view

10 years 10 months ago - 10 years 10 months ago
#12604
think it would be nice to have an option to hide events with open date from the list. Or the opposite: only events with open date.

It ain't that hard to integrate as it requires:
- a few lines of code in the model (to detect param and fire up the action)
- a field to the xml page


//
having a list with a lot of dates and open dates can be very annoying.
Last edit: 10 years 10 months ago by Bluefox.

Please Log in or Create an account to join the conversation.

Re: add option to hide "open dates" in the view

10 years 6 months ago
#14306
what about this?

I found a:
Code:
if ($params->get('showopendates') == 1) { $this->setState('filter.opendate',1); }

but what's his effect?, where to set this param?

Please Log in or Create an account to join the conversation.

Re: add option to hide "open dates" in the view

10 years 6 months ago - 10 years 6 months ago
#14310
but what's his effect?
the filter was intended to strip the events with opendates from the output when enabled.

where to set this param?
nowhere as the current filter is partially there. Did had the option in a personal version but didn't add all the code in this version.

but if you want, then the option can be added in the xml (view/eventslist/default.xml) and implement the rest of the code in the GetListQuery.
Last edit: 10 years 6 months ago by Bluefox.

Please Log in or Create an account to join the conversation.

Re: add option to hide "open dates" in the view

10 years 6 months ago - 10 years 6 months ago
#14312
Code:
implement the rest of the code in the GetListQuery.
how to get?
Last edit: 10 years 6 months ago by Bluefox.

Please Log in or Create an account to join the conversation.

Re: add option to hide "open dates" in the view

10 years 6 months ago
#14318
how to get?



you can take a look at the repo but you could try code like.

xml:
Code:
<field name="showopendates" type="text" default="0" label="COM_JEM_SHOWOPENDATES" description="COM_JEM_SHOWOPENDATES_DESC" />

model:
Code:
$nullDate = $db->quote($db->getNullDate()); $opendate = $this->getState('filter.opendate'); if ($opendate) { $query->where('(a.dates > '.$nullDate.')'); }

but be aware, it can be that the $nullDate variable is not correct but ou can check it out.

when selected it won't show the opendates

Please Log in or Create an account to join the conversation.

Re: add option to hide "open dates" in the view

10 years 6 months ago
#14321
works, but perhaps better to say COM_JEM_HIDEOPENDATES

Now would be interesting to find a solution to show only opendates.

Please Log in or Create an account to join the conversation.

Time to create page: 0.478 seconds