Issue Feature Under Review Stale

#24019Enhance IRRE to allow new records to appear at the top

Andreas Kießling 11/11/10, 12:12 updated 07/09/26, 14:59

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)

Reviews 1

History 3132

Show 7 earlier messages
  1. Andreas Kießling commented <span data-processor="relativetime" data-value="2010-11-12T12:21:01+00:00" > 11/12/10, 12:21 </span>

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

  2. Andreas Kießling commented <span data-processor="relativetime" data-value="2010-11-16T00:32:17+00:00" > 11/16/10, 00:32 </span>

    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. Webadmin no-lastname-given commented <span data-processor="relativetime" data-value="2011-01-31T09:55:32+00:00" > 01/31/11, 09:55 </span>

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

  4. Andreas Kießling commented <span data-processor="relativetime" data-value="2011-01-31T11:14:36+00:00" > 01/31/11, 11:14 </span>

    Too late for 4.5 now, has to wait for 4.6

  5. Webadmin no-lastname-given commented and changed target version <span data-processor="relativetime" data-value="2011-08-18T18:57:57+00:00" > 08/18/11, 18:57 </span>

    Is it’s again to late for 4.6 ?

  1. Georg Ringer commented and changed status New Resolved <span data-processor="relativetime" data-value="2014-12-14T21:52:22+00:00" > 12/14/14, 21:52 </span>

    config $config['appearance']['levelLinksPosition'] can be set to “‘top’, ‘bottom’, ‘both’, ‘none’@”.

  2. Andreas Kießling commented <span data-processor="relativetime" data-value="2014-12-14T23:20:32+00:00" > 12/14/14, 23:20 </span>

    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!

  3. Alexander Opitz commented and changed status Resolved Accepted <span data-processor="relativetime" data-value="2014-12-15T11:02:43+00:00" > 12/15/14, 11:02 </span>

    @Andreas
    Can you please update your patch with jQuery?

  4. Abin Sabu commented <span data-processor="relativetime" data-value="2015-03-26T14:55:02+00:00" > 03/26/15, 14:55 </span>

    Hi guys.

    Do you have any work around for this problem!!

    Abin

  5. Abin Sabu commented <span data-processor="relativetime" data-value="2015-03-26T14:57:00+00:00" > 03/26/15, 14:57 </span>

    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

  6. Webadmin no-lastname-given commented <span data-processor="relativetime" data-value="2015-03-26T15:05:30+00:00" > 03/26/15, 15:05 </span>

    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.

  7. Christian Toffolo commented <span data-processor="relativetime" data-value="2020-10-26T08:35:47+00:00" > 10/26/20, 08:35 </span>

    Instead of simply allow new IRRE records to appear at the top, it would be better to imitate List Module behavior: a ] button at the top of the records list to add the new IRRE record as first and a [ button in each IRRE record to add the new record after the one with the button.

  8. Marc Hirdes commented <span data-processor="relativetime" data-value="2026-07-09T13:10:57+00:00" > 07/09/26, 13:10 </span>

    A costumer of us would also like to have this feature. It could be also a solution to add “move to first postion” and “move to last postion” buttons.

  9. Garvin Hicking commented <span data-processor="relativetime" data-value="2026-07-09T14:42:56+00:00" > 07/09/26, 14:42 </span>

    Marc Hirdes wrote in #note-27:
    > A costumer of us would also like to have this feature. It could be also a solution to add “move to first postion” and “move to last postion” buttons.

    That sounds good, would you like to contribute a patch for this maybe?

  10. Gerrit Code Review pushed patch set 1 for main to change 94720 status Accepted Under Review <span data-processor="relativetime" data-value="2026-07-09T14:53:20+00:00" > 07/09/26, 14:53 </span>

  11. Georg Ringer commented <span data-processor="relativetime" data-value="2026-07-09T14:54:19+00:00" > 07/09/26, 14:54 </span>

    to be discussed: how much does a new setting make sense and should be levelLinksPosition used, e.g. if that is set to “both”, it is strange that there are 2 buttons but they do the same.

  12. Andreas Kießling commented <span data-processor="relativetime" data-value="2026-07-09T14:57:47+00:00" > 07/09/26, 14:57 </span>

    > it is strange that there are 2 buttons but they do the same.

    I think back then my patch allowed to insert the record depending on the clicked button. So top button: insert at the top, bottom bottom: append to bottom

  13. Webadmin no-lastname-given commented <span data-processor="relativetime" data-value="2026-07-09T14:59:15+00:00" > 07/09/26, 14:59 </span>

    Georg Ringer wrote in #note-30:
    > to be discussed: how much does a new setting make sense and should be levelLinksPosition used, e.g. if that is set to “both”, it is strange that there are 2 buttons but they do the same.

    That is exactly our point. With “both,” the top button should insert the new elements at the top, and the bottom button should append the elements at the bottom.