Where in issue.inc (or elsewhere) where is the line to change the # of issues that show on a page? Currently it is set at 20, but there doesn't seem to be an option to alter this.

Comments

dww’s picture

Assigned: Unassigned » dww
Category: support » feature
Status: Active » Needs review
StatusFileSize
new3.6 KB

Yup, there's no easy way to do this, currently. That sucks. Here's a patch that adds an admin setting to specify this. Really, I'd like this to be configurable directly in the UI by each user, but an admin setting is a start...

sickhippie’s picture

DWW, have I told you lately that you're totally awesome? You've been so much help in the last couple weeks while I've been setting these modules up for my company. Thanks!

dww’s picture

Thanks.

However... does the patch work for you? ;) Praise is one thing, help is another... ;)

cheers,
-derek

sickhippie’s picture

Well, actually - it's not working for some reason. It seems that the patch is looking for project_issue.module 1.37 and issue.inc 1.249. I've got the right version of issue.inc, but my project_issue.module is 1.36. It's the one that is in the current release.

Any ideas?

dww’s picture

Version: 5.x-1.0 » 5.x-2.x-dev

Right, that's the latest copy in CVS. Grab the 5.x-1.x-dev snapshot release and the patch should apply cleanly.

sickhippie’s picture

Works like a dream, sir! Thanks again!

hunmonk’s picture

Status: Needs review » Needs work
  • /// How many issues should be displayed per page by default. -- does three slashes have some special significance, or is that a typo?
  • $form['project_issues_per_page'] = array( -- there's an extra space in that line.
  • my feeling is that a select box with sensible values might be a better widget for this setting.
dww’s picture

Status: Needs work » Needs review
StatusFileSize
new3.59 KB

- phpdoc considers /// to be a valid 1-liner phpdoc comment.
- a select box is needlessly restrictive IMHO, and doesn't really save us anything. we'd still need to validate it to catch people who alter the POST data (e.g. via firebug), and then we'd just get issues from people complaining that our "reasonable defaults" aren't what they want.
- extra space removed. ;)

hunmonk’s picture

we'd still need to validate it to catch people who alter the POST data (e.g. via firebug),

i'm almost positive this is incorrect, due to the choice checker that's built into select validation.

we'd just get issues from people complaining that our "reasonable defaults" aren't what they want.

i use selects to build reasonable defaults all the time, and i don't recall ever getting a complaint or issue filed because of the 'limitation'

so i'm not buying your arguments :)

sickhippie’s picture

I've agree with DWW on this point - I prefer inputting a number I choose for pagination instead of picking from a preselected list.

hunmonk’s picture

either one will work, i think. the tradeoff here is slightly simpler code (read easier to maintain) for slightly less flexibility. i feel confident that a select list of 10-15 reasonable defaults will be plenty flexible enough.

that being said, this probably isn't a discussion worth too much wrangling over.

dww’s picture

Status: Needs review » Fixed

Committed #8 to HEAD and DRUPAL-5. Normally we wouldn't add new features to the stable series, but this is so minor I figured I'd allow an exception. ;) Plus, it's only really going to be useful to 5.x-1.* sites, since in 5.x-2.* all of this will soon be handled via views, and then the views UI lets you control the # of nodes per page. See http://drupal.org/node/76725.

Anonymous’s picture

Status: Fixed » Closed (fixed)