Personal Schedule

Categories

Component ID

2214329

Component name

Personal Schedule

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

This features module adds a My Schedule tab to the user profile when using the COD profile. The session_schedule flag comes with COD out of the box, but there is no aggregation and personalization of an attendee's schedule. This module hopes to fill that void.

The view template contains the following code and should be added to sites/all/themes/YOUR_THEME/templates/views/views-view-fields--personal-schedule--my-schedule.tpl.php

<?php

<div class="personal-schedule-outer">
  <?php foreach ($fields as $id => $field): ?>
    <?php if (!empty($field->separator)): ?>
      <?php print $field->separator; ?>
    <?php endif; ?>
  
    <?php print $field->wrapper_prefix; ?>
      <?php print $field->label_html; ?>
      <?php print $field->content; ?>
     
    <?php print $field->wrapper_suffix; ?>
  <?php endforeach; ?>
    
  <?php print flag_create_link("session_schedule", $row->nid); ?>
</div>
?>

I'm also altering the node.tpl.php (sites/all/themes/YOUR_THEME/templates/node.tpl.php) to not print the "Add to my schedule" button on the session node unless the session has been accepted.

  <?php
    if(isset($node) && $node->type == 'session' && $content['group_schedule_info']['field_accepted'][0]['#markup'] == 'Accepted'){
      $output = '<div class="add-remove-from-your-schedule">'."
";
      $output .= print flag_create_link('session_schedule', $node->nid)."
";
      $output = '<div>'."
";

      print $output;
  }
  ?>

The attached files are screen shots of the user experience.