- Timestamp:
- 07/12/2015 05:42:47 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/translate.wordpress.org/public_html/gp-templates/locale-project.php
r1721 r1734 4 4 $breadcrumb = array(); 5 5 $breadcrumb[] = gp_link_get( '/', __( 'Locales' ) ); 6 $breadcrumb[] = gp_link_get( gp_url_join( '/locale', $locale_slug, $set_slug), esc_html( $locale->english_name ) ); 6 $breadcrumb[] = gp_link_get( gp_url_join( '/locale', $locale_slug, $set_slug ), esc_html( $locale->english_name ) ); 7 $breadcrumb[] = gp_link_get( gp_url_join( '/locale', $locale_slug, $set_slug, $project->path ), esc_html( $project->name ) ); 7 8 $breadcrumb[] = $sub_project->name; 8 9 gp_breadcrumb( $breadcrumb ); … … 13 14 <p class="project-description"><?php echo $sub_project->description; ?></p> 14 15 15 <div class="project-box ">16 <div class="project-box percent-<?php echo $sub_project_status->percent_complete; ?>"> 16 17 <div class="project-box-header"> 17 18 <div class="project-icon"> … … 50 51 51 52 <div class="project-status"> 52 <?php 53 $percent_complete = floor( $project_status->current_count / $project_status->all_count * 100 ); 54 echo $percent_complete . '%'; 55 ?> 53 <?php echo $sub_project_status->percent_complete . '%'; ?> 56 54 </div> 57 55 </div> 58 56 59 57 <div class="project-status-progress percent"> 60 <div class="percent-complete" style="width:<?php echo $ percent_complete; ?>%;"></div>58 <div class="percent-complete" style="width:<?php echo $sub_project_status->percent_complete; ?>%;"></div> 61 59 </div> 62 60 63 61 <div class="project-box-footer"> 62 <ul class="projects-dropdown"> 63 <li><span>All Sub-Projects</span> 64 <ul> 65 <?php 66 // Show the current project if it has strings. 67 if ( $sub_project_status->all_count ) { 68 printf( 69 '<li><a href="%s">%s <span>%s</span></a>', 70 gp_url_project( $sub_project->path, gp_url_join( $locale->slug, $set_slug ) ), 71 $sub_project->name, 72 $sub_project_status->percent_complete . '%' 73 ); 74 } 75 76 foreach ( $sub_projects as $_sub_project ) { 77 $status = $sub_project_statuses[ $_sub_project->id ]; 78 79 printf( 80 '<li><a href="%s">%s <span>%s</span></a>', 81 gp_url_project( $_sub_project->path, gp_url_join( $locale->slug, $set_slug ) ), 82 $_sub_project->name, 83 $status->percent_complete . '%' 84 ); 85 } 86 ?> 87 </ul> 88 </li> 89 </ul> 64 90 </div> 65 91 </div> … … 85 111 <td class="set-name"> 86 112 <strong><?php gp_link( gp_url_project( $sub_project->path, gp_url_join( $locale->slug, $set_slug ) ), $sub_project->name ); ?></strong> 87 <?php if ( $sub_project_status->current_count && $sub_project_status->current_count >= $sub_project_status->all_count * 0.9 ): 88 $percent = floor( $sub_project_status->current_count / $sub_project_status->all_count * 100 ); 113 <?php if ( $sub_project_status->percent_complete > 90 ): 89 114 ?> 90 <span class="bubble morethan90"><?php echo $ percent; ?>%</span>115 <span class="bubble morethan90"><?php echo $sub_project_status->percent_complete; ?>%</span> 91 116 <?php endif;?> 92 117 </td> … … 116 141 <td class="set-name"> 117 142 <strong><?php gp_link( gp_url_project( $sub_project->path, gp_url_join( $locale->slug, $set_slug ) ), $sub_project->name ); ?></strong> 118 <?php if ( $status->current_count && $status->current_count >= $status->all_count * 0.9 ): 119 $percent = floor( $status->current_count / $status->all_count * 100 ); 143 <?php if ( $status->percent_complete > 90 ): 120 144 ?> 121 <span class="bubble morethan90"><?php echo $ percent; ?>%</span>145 <span class="bubble morethan90"><?php echo $status->percent_complete; ?>%</span> 122 146 <?php endif;?> 123 147 </td> … … 155 179 } 156 180 }); 181 182 $( '.projects-dropdown > li' ).on( 'click', function() { 183 $( this ).parent( '.projects-dropdown' ).toggleClass( 'open' ); 184 }); 157 185 }); 158 186 </script>
Note: See TracChangeset
for help on using the changeset viewer.