Opened 11 years ago
Last modified 11 years ago
#11103 closed defect
Admin Manage Components table does not hide when there are no components — at Version 7
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.2 |
Component: | admin/web | Version: | 1.0-stable |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
Here is a screen capture of the Manage Milestones view with all of the milestones deleted:
Here is a screen capture of the Manage Components view with all of the components deleted:
The message As long as you don't add any items to the list, this field will remain completely hidden from the user interface. should be displayed and the table header should be hidden when all of the Components are deleted.
The problem is that Component.select returns a generator, and it's not expanded to a list in _render_admin_panel. For all of the other cases of Ticket System fields, select
either returns a list or the generator is expanded to a list in _render_admin_panel
(e.g. enums).
Change History (9)
by , 11 years ago
Attachment: | ManageComponents.png added |
---|
by , 11 years ago
Attachment: | ManageMilestones.png added |
---|
comment:1 by , 11 years ago
Description: | modified (diff) |
---|
comment:2 by , 11 years ago
follow-up: 4 comment:3 by , 11 years ago
It's just "by luck" that some other select
return a list and not a generator. It would look suspicious to have a 'components': list(model.Component.select(self.env)),
line but then a 'versions': model.Version.select(self.env)
a bit later. As we already have the list(...)
for the abstract enums, I think we should better add it everywhere, to be consistent and better express that the templates actually expect a list.
Btw, I just saw we still have the ticket related admin templates still below admin/templates. It would be better to have them below the ticket/templates.
comment:4 by , 11 years ago
Replying to cboos:
Btw, I just saw we still have the ticket related admin templates still below admin/templates. It would be better to have them below the ticket/templates.
Cool, I've been meaning to bring that up. I'll make that change in the Git branch for this ticket.
comment:5 by , 11 years ago
Milestone: | → 1.0.2 |
---|
comment:6 by , 11 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:7 by , 11 years ago
Description: | modified (diff) |
---|
The Manage Repositories panel has the same issue as the Manage Components panel.
Should I just expand the generator to a list before passing to the template, or is there something else that should be done here?