Skip to:

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#4637 closed enhancement (fixed)

Add new template function to produce list of activity types

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

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 9 years ago.

Download all attachments as: .zip

Change History (6)

9 years ago

#1 @karmatosed
9 years 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.

#2 @DJPaul
9 years ago

  • Description modified (diff)

#3 @DJPaul
9 years ago

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

#4 @djpaul
9 years ago

  • 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

#5 @DJPaul
9 years ago

  • Milestone changed from Awaiting Review to 1.7
Note: See TracTickets for help on using tickets.