?
avatar nvyush
nvyush
4 Jul 2017

Steps to reproduce the issue

We have command buttons 'Check-in' for lists of items (articles, contacts, categories etc.) at the admin panel, but we cannot filter checked out items.

I suggest to add that filter field (see the attached file) and add the key JOPTION_SELECT_CHECKED_OUT="- Select Checked out -" to the administrator/language/en-GB/en-GB.ini file. Then we can add tofilter_(...).xml files:

<field
	name="checked_out"
	type="checkedout"
	dbtable="_TABLE_NAME_"
	onchange="this.form.submit();"
>
	<option value="">JOPTION_SELECT_CHECKED_OUT</option>
	<option value="-1">JALL</option>
</field>

and to models files:

// Filter by checked_out
$checkedOut = $this->getState('filter.checked_out');

if (is_numeric($checkedOut))
{
	$checkedOut = (int) $checkedOut;
	$query->where('a.checked_out ' . (($checkedOut > 0) ? ' = ' . $checkedOut : ' > 0'));
}

Expected result

Actual result

System information (as much as possible)

Additional comments

checkedout.php.txt

avatar nvyush nvyush - open - 4 Jul 2017
avatar joomla-cms-bot joomla-cms-bot - change - 4 Jul 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Jul 2017
avatar nvyush nvyush - change - 4 Jul 2017
The description was changed
avatar nvyush nvyush - edited - 4 Jul 2017
avatar nvyush nvyush - change - 4 Jul 2017
The description was changed
avatar nvyush nvyush - edited - 4 Jul 2017
avatar Bakual
Bakual - comment - 4 Jul 2017

Since you already propose some code, can you please create a Pull request?
See https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests

avatar nvyush
nvyush - comment - 4 Jul 2017

@Bakual, should I place the file checkedout.php to the folder /libraries/cms/form/field or to the /libraries/joomla/form/fields?

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Jul 2017
Category com_content
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Jul 2017
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Jul 2017
Category com_content com_content Feature Request
avatar Bakual
Bakual - comment - 4 Jul 2017

I'd say to libraries/cms/form/field since it is CMS specific.

avatar nvyush
nvyush - comment - 26 Jul 2017

@Bakual, I can't create file in the folder /libraries/cms/form/field, I don't have access. Could you help me?

new checkedout.php

avatar nvyush
nvyush - comment - 8 Aug 2017

@Bakual, I prepare some model files (.php and filter_...xml) of many components (content, contact etc.) for PR, but I can't do PR without creating checkedout.php file. What I must do?

avatar Bakual
Bakual - comment - 8 Aug 2017

You should be able to create files after you forked the repo. Then you work in your own instance of this repo and you have full access to do anything. Best to create a new branch first and then start doing your changes in that branch.

avatar nvyush
nvyush - comment - 9 Aug 2017

The trouble is that the folders /libraries/cms/form and /libraries/cms/form/field are missing in my fork. I suppose, that I don't have access to do PR in that folder.

avatar brianteeman
brianteeman - comment - 9 Aug 2017

That means your forked repo is not up-to-date and you need to revise it

avatar nvyush
nvyush - comment - 9 Aug 2017

I see this folders at my local installed copy of Joomla 3.7.4, but I don't see they at fork of staging branch.

avatar brianteeman
brianteeman - comment - 9 Aug 2017

yes - many files have been moved for the next release of Joomla

avatar nvyush
nvyush - comment - 9 Aug 2017

@brianteeman, well, I try next release.

Could you look at pr #17316? The trouble is that com_content and com_contact use the same layout for categories (/layouts/joomla/content/category_default.php), but .xml-files of com_contact don't contain appropriate option show_category_heading_title_text.

avatar nvyush nvyush - close - 11 Aug 2017
avatar nvyush
nvyush - comment - 11 Aug 2017

Closed as we have PR #17491

avatar nvyush nvyush - change - 11 Aug 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-08-11 13:48:02
Closed_By nvyush

Add a Comment

Login with GitHub to post a comment