re-arrange study group menus
This commit is contained in:
@@ -284,13 +284,21 @@ function booking_menu() {
|
||||
*/
|
||||
|
||||
//configure study groups
|
||||
$items['admin/config/booking/studygroups'] = array(
|
||||
'title' => 'View All Study Groups',
|
||||
'description' => 'View Study Group memberships',
|
||||
'page callback' => 'booking_studygroups_view_summary',
|
||||
'access arguments' => array("access administration pages"),
|
||||
'type' => MENU_NORMAL_ITEM,
|
||||
);
|
||||
|
||||
$items['admin/config/booking/studygroups/selectleaders'] = array(
|
||||
'title' => 'Study Group Leaders',
|
||||
'description' => 'Define attendees to lead or help study groups',
|
||||
'page callback' => 'drupal_get_form',
|
||||
'page arguments' => array('booking_available_leadhelp_select_form'),
|
||||
'access arguments' => array('access administration pages'),
|
||||
//'type' => MENU_NORMAL_ITEM,
|
||||
'type' => MENU_LOCAL_ACTION,
|
||||
);
|
||||
|
||||
$items['admin/config/booking/studygroups/calculate'] = array(
|
||||
@@ -299,16 +307,10 @@ function booking_menu() {
|
||||
'page callback' => 'drupal_get_form',
|
||||
'page arguments' => array('booking_studygroups_calculate'),
|
||||
'access arguments' => array('access administration pages'),
|
||||
//'type' => MENU_NORMAL_ITEM,
|
||||
'type' => MENU_LOCAL_ACTION,
|
||||
);
|
||||
|
||||
$items['admin/config/booking/studygroups/view'] = array(
|
||||
'title' => 'View All Study Groups',
|
||||
'description' => 'View Study Group memberships',
|
||||
'page callback' => 'booking_studygroups_view_summary',
|
||||
'access arguments' => array("access administration pages"),
|
||||
//'type' => MENU_NORMAL_ITEM,
|
||||
);
|
||||
|
||||
|
||||
$items['admin/config/booking/studygroups/%/view'] = array(
|
||||
'title' => 'View Study Group',
|
||||
|
@@ -39,7 +39,7 @@ function booking_report_summary() {
|
||||
$rows = array();
|
||||
$state_header = array('State', 'Count');
|
||||
$state_rows = array();
|
||||
$ecclesia_heaeder = array('State','Ecclesia', 'Count');
|
||||
$ecclesia_header = array('State','Ecclesia', 'Count');
|
||||
$ecclesia_rows = array();
|
||||
|
||||
//do some analysis about the people booked in
|
||||
@@ -147,7 +147,7 @@ function booking_report_summary() {
|
||||
$output .= t("<h3>Bookings by state</h3>");
|
||||
$output .= theme('table', array('header' => $state_header, 'rows' => $state_rows, 'attributes' => $stats_attributes));
|
||||
$output .= t("<h3>Bookings by ecclesia</h3>");
|
||||
$output .= theme('table', array('header' => $ecclesia_heaeder, 'rows' => $ecclesia_rows, 'attributes' => $stats_attributes));
|
||||
$output .= theme('table', array('header' => $ecclesia_header, 'rows' => $ecclesia_rows, 'attributes' => $stats_attributes));
|
||||
$output .= t("<h3>Summary of attendees for !event.</h3>", array('!event' => $event->booking_eventname));
|
||||
$output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'sort-table')));
|
||||
|
||||
|
@@ -558,6 +558,31 @@ function booking_studygroups_calculate() {
|
||||
*/
|
||||
function booking_studygroups_view_summary() {
|
||||
|
||||
global $event;
|
||||
$output = "";
|
||||
$header = array('Link','Study Group', 'Session Count');
|
||||
$attributes = array('style' => 'max-width:30%');
|
||||
|
||||
//get study groups
|
||||
$query = db_select('booking_studygroup_list', 's')
|
||||
->fields('s')
|
||||
->condition('s.booking_eventid', $event->eid, '=');
|
||||
$result = $query->execute();
|
||||
|
||||
foreach ($result as $group) {
|
||||
$rows[] = array(
|
||||
l(t('!id', array('!id' => $group->sid)), t('admin/config/booking/studygroups/!id/view', array('!id' => $group->sid))),
|
||||
$group->booking_studygroup_descrip,
|
||||
$group->booking_num_group_sessions,
|
||||
);
|
||||
}
|
||||
|
||||
//output everything
|
||||
$output .= t("<h3>!event Study Groups</h3>", array('!event' => $event->booking_eventname));
|
||||
$output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => $stats_attributes));
|
||||
|
||||
return $output;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user