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 10
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: |
Hide the Components table on the Manage Components page when there are no components defined. Hide the repositories table on the Manage Repositories page when there are no repositories defined. |
||
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 (12)
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-ups: 4 8 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.
comment:8 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.
Initially I had some concerns about making this change on 1.0-stable, and how it might affect the translations, but after regenerating the catalog template and string catalogs, it seems the result is that no manual changes to the catalogs are required to accommodate the templates being moved. Does making the change on 1.0-stable sound okay?
All of the proposed changes for this ticket can be found in rjollos.git:t11103.
comment:9 by , 11 years ago
Series looks good to me and 1.0 seems to be fine for the move of templates.
comment:10 by , 11 years ago
Release Notes: | modified (diff) |
---|
Thanks for reviewing. I'll go ahead and push the changes to 1.0-stable this evening.
Should I just expand the generator to a list before passing to the template, or is there something else that should be done here?