Opened 7 months ago

Closed 6 months ago

Last modified 6 months ago

#4637 closed enhancement (fixed)

Add new template function to produce list of activity types

Reported by: DJPaul Owned by:
Priority: normal Milestone: 1.7
Component: Activity Version:
Severity: normal Keywords:
Cc:

Description (last modified by DJPaul)

Attached patch contains a proposed template function to produce a list of all the registered activity types for use in a <select> element, or as <input type="checkbox">.

When working on turtleshell, I wanted to add filter controls to the activity directory, just like how BP-Default has a dropdown box. Unfortunately, these are hardcoded into the BP-Default templates. We already register activity types, but we don't have a template function to output the data.

My patch implements such a template function and allows choice between rendering the activity types as a dropdown box or as a select dropdown.

Attachments (1)

4637.001.patch (2.1 KB) - added by DJPaul 7 months ago.

Download all attachments as: .zip

Change History (6)

DJPaul7 months ago

This rocks! Really cool and offers up flexibility for themes to pick what they want also. I'd like to see such flexibility in other areas so this is a great start I think of letting the template writer pick what they want format wise.

  • Description modified (diff)

Edited description to read: dropdown box or a select dropdown. This patch doesn't do radio buttons, sorry for confusion.

  • Resolution set to fixed
  • Status changed from new to closed

(In [6502]) Add new activity template function to renders a list of all the registered activity types for use in a <select> element, or as <input type="checkbox">.

  • For the <select> output, this is backwards compatible with the "bp_activity_filter_options" action which was hardcoded into the BP-Default theme templates.
  • Fixes #4637
  • Milestone changed from Awaiting Review to 1.7
Note: See TracTickets for help on using tickets.