Feature #18044
closedShortcut manager - shortcut icon should reflect record type.
0%
Description
I think it would be nice if the icons in the new shortcut menu reflected the actual record type.
So if you have news category record, you get the news category icon instead of the pencil icon currently used.
Also I have thought about somehow distinguishing between a shortcut which will create a new record and a shortcut which will edit an existing record.
Maybe through changing what text label is added for the shortcut.
So if the shortcut will create a new News record, the text could be "Create News (page)" or "Create News on page", - where page is the name of the page where the record will be created.
The diff for the first part of the bug report about the icons is just around the corner.
I will make another diff which also includes the text label thingy.
(issue imported from #M7267)
Files
Updated by Stig Nørgaard Færch almost 17 years ago
I have added two diffs.
The first one makes the icons in the new shortcut menu reflected the actual record type. So the if you have a shortcut to at news category record, you will have the news category icon instead of the pencil icon.
The second one does the exact same, plus
changes to the shortcut label when shortcuts are created.
So if you create a shortcut to a 'Website User' record on the page 'storage folder' the label will be: 'Edit Website User (storage folder)'.
If you create a shortcut to a blank 'Website User' record on the page 'storage folder', the label will be: 'Create Website User (storage folder)'.
The result is a more descriptive shortcut label, but also a longer label. So it might impose some problems with the current menu width....
Updated by Stig Nørgaard Færch almost 17 years ago
bug_7267_2a.diff as a addition for bug_7267_2.diff
I have also added a diff on /typo3/sysext/lang/locallang_misc.xml
I have added the label 'shortcut_create'.
Updated by Ingo Renner almost 17 years ago
Hi Stig, I cleaned up your patch a bit. However when editing a content element in Web->page and set a shortcut to it I don't get a shortcut icon... could you please check that?
EDIT: Other then that: good job!
Updated by Stig Nørgaard Færch almost 17 years ago
Hi Ingo
Thanks for checking out the patch.
I will look into that as soon as possible.
Probably either sunday or monday.
Updated by Stig Nørgaard Færch almost 17 years ago
Hi Ingo
Your cleansing of my patch seems very reasonable.
The Web->page bug in the patch is corrected easy.
You added a check on the $shortcut['recordid'] if there was a comma. If that was the case you remove it.
But $shortcut['recordid'] need to be used in its original form on the next line.
So I just moved your "comma check" below.
Btw. do you know what is the intention with this comma?
Updated by Ingo Renner almost 17 years ago
No idea, I only can imagine that it's related to the edit-multiple-records-at-once feature the list view offers.
checked and it works now.
Only one issue left: the icons are the "old" original ones and not the ones from skins like t3skin.
Updated by Ingo Renner almost 17 years ago
ok, solved by adding
$icon = t3lib_iconWorks::skinImg($this->backPath, $icon, '', 1);
at the end of the first case in getShortcutIcon()
Updated by Stig Nørgaard Færch almost 17 years ago
Ok.
About the comma. It is for a comma separated list when editing multiple records.
So I suggest that we change:
'WHERE' => 'uid = '.$recordid.' '.$permissionClause.
to
'WHERE' => 'uid IN ('.$recordid.') '.$permissionClause.
also in getShortcutIcon()
Updated by Ingo Renner almost 17 years ago
unfortunately that doesn't seem to work when creating a shortcut to "editing a content element" in the page module.
EDIT:
could you provide a new patch with your proposed changes, maybe I've overseen something...
just noticed: even a shortcut to editing multiple records at once should work in the case we only strip the last comma
Updated by Stig Nørgaard Færch almost 17 years ago
I will probably not have time to look more at this until next week.