CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • divide results of custom search and display each part in accordions
Pages: [1]

Author Topic: divide results of custom search and display each part in accordions  (Read 6466 times)

andersiversen

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 1
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
divide results of custom search and display each part in accordions
August 07, 2012, 11:24:27 am
Hi

I've made a custom search (learning from the wiki) wich displays all students related to a school.

I would like to divide the search results into years and classes and display it to the user as shown in the attached mockup (it's in danish, but I guess you'll get it). Shown in another way:
Code: [Select]
<Year 1>
  <class a>
    table with students from 1st year class a...
  </class a>
  <class b>
    table with students from 1st year class b...
  </class b>
</Year 1>
<Year 2>
  <class a>
    table with students from 2nd year class a...
  </class a>
  <class b>
    table with students from 2nd year class b...
  </class b>
</Year 2>

I would like each year and each class to be displayed in an accordion so you can colapse/unfold them.

Where is it smart to make the division - in the custom search php file or in the custom template file? I guess I could do it with some if statements in the template and just "sort" the $rows array there?

I would also like to change the edit link so it links to a custom edit profile, instead of the standard edit contact screen - and get rid of the map and view links in $rows['action'] - but I don't know how to change what values goes to the action key in the $rows array.

PS: As a side-note I would like to use edit in-place on the values in the last column, hence all the "Gem" buttons in the mockup (danish for "Save"), and I'm also curious about this with the "in-place" forms: http://forum.civicrm.org/index.php/topic,24058.msg101250.html#msg101250 - as you can see in the mockup, I would like to use something like it for editing a contact.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • divide results of custom search and display each part in accordions

This forum was archived on 2017-11-26.