Closed
Bug 412645
Opened 17 years ago
Closed 17 years ago
Add weighting to categories (tags) for customizable ordering
Categories
(addons.mozilla.org Graveyard :: Administration, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
3.2
People
(Reporter: morgamic, Assigned: cpollett)
References
Details
Attachments
(1 file)
8.47 KB,
patch
|
morgamic
:
review+
|
Details | Diff | Splinter Review |
Need to add a weight column to tags so it can be sorted by weight then name.
Reporter | ||
Comment 1•17 years ago
|
||
Chris, can you pick this up and knock this out?
Assignee: morgamic → cpollett
Comment 2•17 years ago
|
||
Maybe you want to do it like Drupal does: They allow values from -10 to 10, smaller values "float", higher "sink" to the bottom. But that's just a suggestion.
Reporter | ||
Comment 3•17 years ago
|
||
I just want an int(11) unsigned that can be anything. Think bugzilla. So could be 1, 20, 2000000, 4, 200 -- main thing is just to sort using that same philosphy. Not sure why we need negative numbers, though, so I'd rather just use arbitrarily large increments of unsigned ints...
Assignee | ||
Comment 4•17 years ago
|
||
The patch I am attaching, adds a column weight to the tags table, it modifies the Amo model getTags method to sort by weight then name. Finally, if one goes to the admin control panel (tools?) --> List Manager -> Categories. Then Edit Categories for one of the Category Types, one sees a new field Category Weight that can be adjusted. It sorts ascending so if you make the weight larger it will tend to appear later in the sort order.
Attachment #307375 -
Flags: review?(morgamic)
Assignee | ||
Comment 5•17 years ago
|
||
Just checking to see if the patch seemed okay.
Reporter | ||
Comment 6•17 years ago
|
||
Comment on attachment 307375 [details] [diff] [review]
adds weight field, plus adds to admin so can adjust
Looks good -- did you remove DOS linebreaks in
views/admin/tags_edit.thtml? If so, I'd like you to change only the code in this patch and to a subsequent patch to change the linebreaks (so the revision contains only code changes not style changes).
Attachment #307375 -
Flags: review?(morgamic) → review+
Assignee | ||
Comment 7•17 years ago
|
||
It looks like both remora.sql and tags_edit had changed since created patch above. so I svn up'd and merged these and did as asked in #6. When I did I svn diff after doing this only four lines had changed in tags_edit.thtml . The original repository file didn't have any ^M's when I checked, and my patch didn't introduce any, so hopefully all is good.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•