Feature #24019

Enhance IRRE to allow new records to appear at the top

Added by Andreas Kiessling almost 9 years ago. Updated over 4 years ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2010-11-11
Due date:
% Done:

0%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The current implementation always adds new IRRE records after all or after an already existing record.
There are some cases, when the ordering of the list is not relevant or if you sort the records e.g. by date, the newest one should be displayed at the top.
If the list of records is very long, the only visual feedback you get is a growing scrollbar, so some people might click "Create new" several times until they realize the that something happend.

Solution: add new config option "newRecordPosition" in the appearance section
prototype already has actions to make a "Insertion.Top", so the only big change is to let IRRE use that function and reorder the list of records right.

How to test:
- install the extension "irre_tutorial" and import the sample t3d to get something to work on
- add this to your extTables.php to create all new relations at the top:

t3lib_div::loadTCA('tx_irretutorial_1ncsv_hotel');
t3lib_div::loadTCA('tx_irretutorial_1nff_hotel');
t3lib_div::loadTCA('tx_irretutorial_mnasym_hotel');
t3lib_div::loadTCA('tx_irretutorial_mnattr_hotel');
t3lib_div::loadTCA('tx_irretutorial_mnmmasym_hotel');
t3lib_div::loadTCA('tx_irretutorial_mnsym_hotel');

$GLOBALS['TCA']['tx_irretutorial_1ncsv_hotel']['columns']['offers']['config']['appearance']['newRecordPosition'] = 'top';
$GLOBALS['TCA']['tx_irretutorial_1nff_hotel']['columns']['offers']['config']['appearance']['newRecordPosition'] = 'top';
$GLOBALS['TCA']['tx_irretutorial_mnasym_hotel']['columns']['offers']['config']['appearance']['newRecordPosition'] = 'top';
$GLOBALS['TCA']['tx_irretutorial_mnattr_hotel']['columns']['offers']['config']['appearance']['newRecordPosition'] = 'top';
$GLOBALS['TCA']['tx_irretutorial_mnmmasym_hotel']['columns']['offers']['config']['appearance']['newRecordPosition'] = 'top';
$GLOBALS['TCA']['tx_irretutorial_mnsym_hotel']['columns']['branches']['config']['appearance']['newRecordPosition'] = 'top';

If you want to check one level deeper, you can add something like this:
$GLOBALS['TCA']['tx_irretutorial_1ncsv_offer']['columns']['prices']['config']['appearance']['newRecordPosition'] = 'top';

Note: there will be an error on saving records on the page "m:n asymmetric combo", but this has nothing do to with the patch.
See http://bugs.typo3.org/view.php?id=15996 for that.

For the pending documentation: === doc_core_api (4.5) ===

Chapter: Table Configuration Array, $TCA
Part: ['columns'][fieldname]['config'] / TYPE: "inline"

Field: appeareance:
newRecordPosition (string)
Values: 'top', 'bottom' - default: 'bottom'
Defines where the new record is inserted in the list of records.
(issue imported from #M16350)

16350_v1.patch View (2.57 KB) Administrator Admin, 2010-11-11 12:12

16350_v2.patch View (8.34 KB) Administrator Admin, 2010-11-16 00:35


Related issues

Related to TYPO3 Core - Feature #23954: Create new Element Button always inserts new record at the bottom Closed 2010-11-05
Related to TYPO3 Core - Feature #78532: Improve way of adding a new image reference in TCE Forms Closed 2016-11-01
Related to TYPO3 Core - Feature #83858: Add option to change the insert position for inline elements (IRRE) Closed 2018-02-12
Related to TYPO3 Core - Bug #84695: New irre elements appear outside of the current view Closed 2018-04-11
Related to TYPO3 Core - Bug #87797: IRRE - Position of new elements Closed 2019-02-26
Related to TYPO3 Core - Feature #85986: Create new inline record before the existing ones Closed 2018-08-27

History

#1 Updated by Andreas Kiessling almost 9 years ago

Category should have been "Inline Relational Record Editing (IRRE) "
Can somebody please adjust that?

#2 Updated by Andreas Kiessling almost 9 years ago

v2 adds new config setting 'auto' for newRecordPosition as suggested in http://bugs.typo3.org/view.php?id=16264
With both "Create new'-Links, clicking on the top one inserts the new record at the top, clicking on the bottom link inserts the new record at the bottom.

Example config:t3lib_div::loadTCA('tx_irretutorial_1ncsv_hotel');
$GLOBALS['TCA']['tx_irretutorial_1ncsv_hotel']['columns']['offers']['config']['appearance']['levelLinksPosition'] = 'both';
$GLOBALS['TCA']['tx_irretutorial_1ncsv_hotel']['columns']['offers']['config']['appearance']['newRecordPosition'] = 'auto';

t3lib_div::loadTCA('tx_irretutorial_1nff_hotel');
$GLOBALS['TCA']['tx_irretutorial_1nff_hotel']['columns']['offers']['config']['appearance']['levelLinksPosition'] = 'both';
$GLOBALS['TCA']['tx_irretutorial_1nff_hotel']['columns']['offers']['config']['appearance']['newRecordPosition'] = 'auto';

t3lib_div::loadTCA('tx_irretutorial_mnasym_hotel');
$GLOBALS['TCA']['tx_irretutorial_mnasym_hotel']['columns']['offers']['config']['appearance']['levelLinksPosition'] = 'both';
$GLOBALS['TCA']['tx_irretutorial_mnasym_hotel']['columns']['offers']['config']['appearance']['newRecordPosition'] = 'auto';

t3lib_div::loadTCA('tx_irretutorial_mnattr_hotel');
$GLOBALS['TCA']['tx_irretutorial_mnattr_hotel']['columns']['offers']['config']['appearance']['levelLinksPosition'] = 'both';
$GLOBALS['TCA']['tx_irretutorial_mnattr_hotel']['columns']['offers']['config']['appearance']['newRecordPosition'] = 'auto';

t3lib_div::loadTCA('tx_irretutorial_mnsym_hotel');
$GLOBALS['TCA']['tx_irretutorial_mnsym_hotel']['columns']['offers']['config']['appearance']['levelLinksPosition'] = 'both';
$GLOBALS['TCA']['tx_irretutorial_mnsym_hotel']['columns']['branches']['config']['appearance']['newRecordPosition'] = 'auto';

t3lib_div::loadTCA('tx_irretutorial_mnmmasym_hotel');
$GLOBALS['TCA']['tx_irretutorial_mnmmasym_hotel']['columns']['offers']['config']['appearance']['levelLinksPosition'] = 'both';
$GLOBALS['TCA']['tx_irretutorial_mnmmasym_hotel']['columns']['offers']['config']['appearance']['newRecordPosition'] = 'auto';

#3 Updated by Chris topher almost 9 years ago

Fixed the category.

#4 Updated by Andreas Kiessling almost 9 years ago

Thanks.

#5 Updated by Webadmin no-lastname-given over 8 years ago

See also http://bugs.typo3.org/view.php?id=16264
This patch here would solve a great usability problem.

#6 Updated by Andreas Kiessling over 8 years ago

Too late for 4.5 now, has to wait for 4.6

#7 Updated by Webadmin no-lastname-given about 8 years ago

  • Target version changed from 0 to 4.6.0

Is it's again to late for 4.6 ?

#8 Updated by Chris topher almost 8 years ago

  • Target version changed from 4.6.0 to 4.6.1

#9 Updated by Chris topher almost 8 years ago

  • Target version changed from 4.6.1 to 4.6.2

#10 Updated by Xavier Perseguers over 7 years ago

  • Target version deleted (4.6.2)

#11 Updated by Thorsten Kahler over 7 years ago

  • Category set to 978

#12 Updated by Georg Ringer almost 5 years ago

  • Status changed from New to Resolved

config $config['appearance']['levelLinksPosition'] can be set to "'top', 'bottom', 'both', 'none'@".

#13 Updated by Andreas Kiessling almost 5 years ago

Georg Ringer wrote:

config $config['appearance']['levelLinksPosition'] can be set to "'top', 'bottom', 'both', 'none'@".

But that just affects the position of the button and not where new records are placed!

#14 Updated by Alexander Opitz almost 5 years ago

  • Status changed from Resolved to Accepted

@Andreas
Can you please update your patch with jQuery?

#15 Updated by Abin Sabu over 4 years ago

Hi guys.

Do you have any work around for this problem!!

Abin

#16 Updated by Abin Sabu over 4 years ago

Andreas Kiessling wrote:

Georg Ringer wrote:

config $config['appearance']['levelLinksPosition'] can be set to "'top', 'bottom', 'both', 'none'@".

But that just affects the position of the button and not where new records are placed!

Guys

Yea it affects the botton postion.No change for new record!!

Abin Sabu

#17 Updated by Webadmin no-lastname-given over 4 years ago

Abin Sabu wrote:

Hi guys.

Do you have any work around for this problem!!

Abin

There is a patch on the top of this ticket. I tested it 4 years ago, it worekd.

#18 Updated by Riccardo De Contardi over 2 years ago

  • Related to Feature #78532: Improve way of adding a new image reference in TCE Forms added

#19 Updated by Tymoteusz Motylewski over 1 year ago

  • Related to Feature #83858: Add option to change the insert position for inline elements (IRRE) added

#20 Updated by Riccardo De Contardi over 1 year ago

  • Related to Bug #84695: New irre elements appear outside of the current view added

#21 Updated by Georg Ringer 7 months ago

  • Related to Bug #87797: IRRE - Position of new elements added

#22 Updated by Riccardo De Contardi 5 months ago

  • Related to Feature #85986: Create new inline record before the existing ones added

Also available in: Atom PDF