Skip to content

Commit

Permalink
- hide table footer since it creates too much clutter with small numb…
Browse files Browse the repository at this point in the history
…er of teams

- add message to display when no teams have been created yet
  • Loading branch information
Chris Woodall committed Oct 20, 2010
1 parent be21b65 commit 6187cdf
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions admin/leagues/includes/teams-list.php
Expand Up @@ -12,7 +12,6 @@
</select>
<input type="submit" value="<?php _e('Apply'); ?>" name="doaction" id="doaction" class="button-secondary action" />
</div>

<!-- Table -->
<table class="widefat">
<thead>
Expand All @@ -23,14 +22,19 @@
<th scope="col" class="num"><?php _e( 'Players', 'leaguepress' ) ?></th>
</tr>
</thead>
<?php /*
* TO DO - make the footer conditionally appear only when
* certain number of teams are present
* ?>
<tfoot>
<tr>
<th scope="col" class="check-column"><input type="checkbox" onclick="Leaguemanager.checkAll(document.getElementById('seaons-filter'));" /></th>
<th scope="col"><?php _e( 'Name', 'leaguePress' ) ?></th>
<th scope="col"><?php _e( 'Short Name', 'leaguePress' ) ?></th>
<th scope="col" class="num"><?php _e( 'Players', 'leaguepress' ) ?></th>
</tr>
</tfoot>
</tfoot>
<?php */ ?>
<tbody id="the-list" class="list">
<?php foreach( $teams AS $team ) : $class = ( 'alternate' == $class ) ? '' : 'alternate' ?>
<tr class="<?php echo $class ?>">
Expand All @@ -47,6 +51,11 @@
<td class="num">0</td>
</tr>
<?php endforeach; ?>
<?php if (count($teams) == 0) : ?>
<tr class="alternate">
<td colspan="4"><p>There are currently no teams maintained.</p></td>
</tr>
<?php endif ?>
</tbody>
</table>
</form>

0 comments on commit 6187cdf

Please sign in to comment.