[MAGNOLIA-2486] Make tree node icons configurable by template Created: 28/Nov/08  Updated: 04/Nov/15  Resolved: 04/Nov/15

Status: Closed
Project: Magnolia
Component/s: admininterface, gui
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Martin Algesten Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File patch-3.6.txt     Text File patch-trunk.txt    
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

I want a feature where I can specify in the template definition a node data called 'icon' which sets the icon used to represent the node in the website tree.

Attached are two patches that makes it possible to set an 'icon' property in the template definition.

One patch is against the current trunk (4.0-SNAPSHOT) and on against the 3.6 branch. They should (hopefully) do the same.



 Comments   
Comment by Martin Algesten [ 28/Nov/08 ]

Don't use this just yet. I realise I need to trigger a redraw when changing template to make the implementation complete.

Comment by Magnolia International [ 28/Nov/08 ]

Hi Martin,

Thanks for this - but: the Tree class should not have a dependency on Template/TemplateManager. We know some classes in admininterface already have dependencies on Paragraph/ParagraphManager and so on, but we'll be trying to remove these dependencies in the near future.

Comment by Martin Algesten [ 28/Nov/08 ]

I reworked the solution to introduce an "IconProvider" interface that can be set as a callback when providing icons. This generalises the behaviour of the previous "icons" map.

The solution removes:

public String getIconPage()
public String getIconContentNode()
public String getIconNodeData()

which I couldn't see were being used. (The setters are however used by module-dms, so they are kept).

The javascript has been altered to also trigger a reload of the current node when changing the template.

Comment by Martin Algesten [ 28/Nov/08 ]

Same as for trunk but against 3.6 branch.

Comment by Martin Algesten [ 28/Nov/08 ]

And it's not perfect yet.... The default icons have changed. I'll fix it.
:S

Comment by Martin Algesten [ 28/Nov/08 ]

Perhaps this is the final try?

Comment by Martin Algesten [ 28/Nov/08 ]

On 3.6 branch.

Comment by Michael Mühlebach [ 04/Nov/15 ]

Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.
I'm going to close this to set expectations so the issue doesn't stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.

Generated at Mon Feb 12 03:37:11 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.