Changeset 634018
- Timestamp:
- 12/04/2012 02:26:05 PM (13 years ago)
- Location:
- dippler/trunk
- Files:
-
- 4 edited
-
classes/dippler-html-builder.php (modified) (3 diffs)
-
themes/twentyeleven_dippler/dippler-resource-page.php (modified) (1 diff)
-
themes/twentyten_dippler/dippler-resource-page.php (modified) (1 diff)
-
themes/twentytwelve_dippler/dippler-resource-page.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dippler/trunk/classes/dippler-html-builder.php
r634007 r634018 318 318 $rootFolder= $resources->getRootFolder(); 319 319 320 echo '<tbody>'; 320 321 if ( $rootFolder->hasResources() ) { 321 322 echo $resources->buildHTML( $rootFolder ); … … 324 325 } 325 326 327 echo '</tbody>'; 328 echo '</table>'; 329 } 330 331 /* 332 * Get learning resource 333 */ 334 335 public static function getLearningResource() { 336 /* Load resources and print the table */ 337 $resources = new DipplerLearningResources(); 338 $resource = $resources->getResource( DipplerUtils::getResourceID() ); 339 340 self::getResourceTableHead( $resource ); 341 342 echo '<tbody>'; 343 if ( $resource ) { 344 echo $resources->buildResourceHTML( $resource ); 345 } else { 346 echo '<tr><td colspan="4">'.__( 'No such resource', self::getTextdomain() ).'</td></tr>'; 347 } 326 348 echo '</tbody>'; 327 349 echo '</table>'; … … 340 362 echo $resource; 341 363 } 342 } else {343 _e( 'No such resource', self::getTextdomain() );344 364 } 345 365 echo '</h2>'; 346 366 echo '<table style="width: 100%; font-size: .85em;" class="dippler-learning-resource">'; 367 //Single learning resource youtube video etc. then don't output extra thead node 368 if ( $resource instanceOf DipplerResource || !$resource ) { 369 return; 370 } 347 371 echo '<thead style="background-color: #ccc">'; 348 372 echo '<tr>'; -
dippler/trunk/themes/twentyeleven_dippler/dippler-resource-page.php
r628932 r634018 9 9 10 10 get_header(); 11 global $dipplerWP;12 13 /* Load resources and print the table */14 $resources = new DipplerLearningResources();15 $resource = $resources->getResource( DipplerUtils::getResourceID() );16 11 ?> 17 12 18 13 <div id="primary"> 19 14 <div id="content" role="main"> 20 <table style="width: 100%; font-size: .85em;" class="dippler-learning-resource"> 21 <thead style="background-color: #ccc"> 22 <tr> 23 <th colspan="2"> 24 <h2 style="font-weight: bold;"> 25 <?php 26 if ( $resource ) { 27 echo $resource->getTitle(); 28 } else { 29 _e( 'No such resource', $dipplerWP->getTextdomain() ); 30 } 31 ?> 32 </h2> 33 </th> 34 </tr> 35 </thead> 36 <tbody> 37 <?php 38 39 if ( $resource ) { 40 echo $resources->buildResourceHTML( $resource ); 41 } else { 42 echo '<tr><td colspan="4">'.__( 'No such resource', $dipplerWP->getTextdomain() ).'</td></tr>'; 43 } 44 ?> 45 </tbody> 46 </table> 15 <?php DipplerHTML::getLearningResource(); ?> 47 16 </div><!-- #content --> 48 17 </div><!-- #primary --> -
dippler/trunk/themes/twentyten_dippler/dippler-resource-page.php
r629015 r634018 9 9 10 10 get_header(); 11 global $dipplerWP;12 13 /* Load resources and print the table */14 $resources = new DipplerLearningResources();15 $resource = $resources->getResource( DipplerUtils::getResourceID() );16 11 ?> 17 12 18 13 <div id="container"> 19 14 <div id="content" role="main"> 20 <table style="width: 100%; font-size: .85em;" class="dippler-learning-resource"> 21 <thead style="background-color: #ccc"> 22 <tr> 23 <th colspan="2"> 24 <h2 style="font-weight: bold;"> 25 <?php 26 if ( $resource ) { 27 echo $resource->getTitle(); 28 } else { 29 _e( 'No such resource', $dipplerWP->getTextdomain() ); 30 } 31 ?> 32 </h2> 33 </th> 34 </tr> 35 </thead> 36 <tbody> 37 <?php 38 39 if ( $resource ) { 40 echo $resources->buildResourceHTML( $resource ); 41 } else { 42 echo '<tr><td colspan="4">'.__( 'No such resource', $dipplerWP->getTextdomain() ).'</td></tr>'; 43 } 44 ?> 45 </tbody> 46 </table> 15 <?php DipplerHTML::getLearningResource(); ?> 47 16 </div><!-- #content --> 48 17 </div><!-- #primary --> -
dippler/trunk/themes/twentytwelve_dippler/dippler-resource-page.php
r633418 r634018 9 9 10 10 get_header(); 11 global $dipplerWP;12 13 /* Load resources and print the table */14 $resources = new DipplerLearningResources();15 $resource = $resources->getResource( DipplerUtils::getResourceID() );16 11 ?> 17 12 18 13 <div id="primary" class="site-content"> 19 14 <div id="content" role="main"> 20 <table style="width: 100%; font-size: .85em;" class="dippler-learning-resource"> 21 <thead style="background-color: #ccc"> 22 <tr> 23 <th colspan="2"> 24 <h2 style="font-weight: bold;"> 25 <?php 26 if ( $resource ) { 27 echo $resource->getTitle(); 28 } else { 29 _e( 'No such resource', $dipplerWP->getTextdomain() ); 30 } 31 ?> 32 </h2> 33 </th> 34 </tr> 35 </thead> 36 <tbody> 37 <?php 38 39 if ( $resource ) { 40 echo $resources->buildResourceHTML( $resource ); 41 } else { 42 echo '<tr><td colspan="4">'.__( 'No such resource', $dipplerWP->getTextdomain() ).'</td></tr>'; 43 } 44 ?> 45 </tbody> 46 </table> 15 <?php DipplerHTML::getLearningResource(); ?> 47 16 </div><!-- #content --> 48 17 </div><!-- #primary -->
Note: See TracChangeset
for help on using the changeset viewer.