

<div class="invitation_list_viewer">
	
	<div class="ui-widget ui-widget-content ui-corner-all team_list left">
		<div>
			<table style="width:100%;">
				<thead class="head ui-tabs-nav ui-widget-header ui-corner-all">
					<tr>
						<th colspan=3>Participating Teams</th>
					</tr>
				</thead>
			</table>
		</div>
		<div style="height: 186px; overflow-y: auto;">
			<table style="width:100%;">
				<tbody>
	                <?php if(count($information['teams'] > 0)): ?>
	                	<?php foreach($information['teams'] as $team): ?>
		                    <tr>
								<td style="width:30px">
									<?php
										$image_url = null;
										if (!is_null($team['activity_program_id']))
										{
											$school = school::find($team['host_school']);

											if (!is_null($school))
											{
												$image_url = ImagesController::getImageURL($school->short_name, 'logo', '24x24');
											}
										}
									?>
									<?php if (!is_null($image_url)): ?>
										<img src="<?php echo $image_url; ?>" alt="" title="" style="width:24px; height:24px;" />
									<?php else: ?>
										<img src="http://www.osaa.org/images/no_logo.png" alt="" title="No School Logo Available" class="tooltip" style="width:24px; height:24px;">
									<?php endif; ?>
								</td>
		                        <td style="text-align: left"><?php echo $team['name']; ?></td>
								<td style="width:40px">
									<div class="button cancel" style="font-size: 7pt;" data-meet="<?php echo $information['id']; ?>"  data-team="<?php echo $team['id']; ?>" data-team-name="<?php echo $team['name']; ?>" data-action="drop">Drop</div>
								</td>
							</tr>
	                    <?php endforeach; ?>
	                <?php endif; ?>
	                <?php if(count($information['oos_teams'] > 0)): ?>
	                	<?php foreach($information['oos_teams'] as $team): ?>
		                    <tr>
								<td style="width:30px">
									<img src="http://www.osaa.org/images/no_logo.png" alt="" title="No School Logo Available" class="tooltip" style="width:24px; height:24px;">
								</td>
		                        <td style="text-align: left"><?php echo $team; ?></td>
								<td style="width:50px">
									<div class="button cancel" style="font-size: 7pt;" data-meet="<?php echo $information['id']; ?>"  data-team="<?php echo $team; ?>" data-team-name="<?php echo $team; ?>" data-action="drop">Drop</div>
								</td>
							</tr>
	                    <?php endforeach; ?>
	                <?php endif; ?>
				</tbody>
			</table>
		</div>
	</div>
	<div class="right" style="width: 400px; padding-top: 0.5em;">
		<?php echo Form::open(array('id' => 'new_team_form')); ?>
			<h3>Invite a New Team</h3>
			<br>
	  		<?php echo Form::hidden('meet_id', $information['id']); ?>

			<?php echo Form::label('new_team', 'Team Name', array('class' => 'input_label')); ?>
			<?php echo Form::text('new_team', "", array('style' => 'width:215px;', 'class' => 'school_autocomplete')); ?>
			<br><br>

			<?php echo Form::label('team_is_oos', 'OOS', array('class' => 'input_label')); ?>
			<?php echo Form::checkbox('team_is_oos', true, false); ?>

			<select style="width:120px;" id="new_team_state" name="new_team_state" disabled="disabled">
				<?php
					$states = DB::select('SELECT slug, name FROM states');
					foreach ($states as $s)
					{
						$name = $s->name;
						$slug = $s->slug;

						echo '<option value="' . $slug . '"';
							if ($slug == Input::old('new_team_state')) echo ' selected="selected"';
						echo '>' . $name . '</option>';	                  	
					}
					echo '<option value="Other">Other</option>';
				?>
			</select>

			<br><br>

			<?php echo Form::button('Invite New Team',
					 array('id' => 'add_new_team',
					 	   'class' => 'button tooltip',
					 	   'style' => 'font-size: 9pt;')); ?>  
		<?php echo Form::close(); ?>		

		<br><br>

		<div class="ui-state-highlight ui-corner-all message-box" style="padding: 0.5em; margin-bottom: 0.5em; width: 360px; display:none;">
			<div class="message"></div>
		</div>
	</div>

</div>






