Making WordPress.org


Ignore:
Timestamp:
11/10/2015 11:49:53 PM (9 years ago)
Author:
obenland
Message:

Translate: Dynamic table headings for small screens.

Uses the same information for all screen sizes now, which also allows for table
headings to be translated. Makes the cursor a pointer on column headings to
make it a little more obvious they are sortable.

Fixes #1365.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/translate.wordpress.org/public_html/gp-templates/stats-overview.php

    r2056 r2070  
    4747                    foreach ( $projects as $slug => $project ) {
    4848                        $projecturl = gp_url( gp_url_join( 'locale', $gp_locale->slug, $set_slug, $project->path ) );
     49                        $project_name = str_replace( array( 'WordPress.org ', 'WordPress for ', 'WordPress ', 'ectory' ), '', $project->name );
    4950
    5051                        if ( isset( $translation_locale_statuses[ $locale_slug ][ $project->path ] ) ) {
     
    5960                                }
    6061                                $percent_class = 'percent' . $percent_class;
    61                                 echo '<td data-sort-value="'. esc_attr( $percent ) . '" class="' . $percent_class .'"><a href="' . $projecturl . '">' . number_format( $percent ) . '</a></td>';
     62                                echo '<td data-column-title="' . esc_attr( $project_name ) . '" data-sort-value="'. esc_attr( $percent ) . '" class="' . $percent_class .'"><a href="' . $projecturl . '">' . number_format( $percent ) . '</a></td>';
    6263                            } else {
    6364                                $percent_class = 'percent' . (int) ( $percent / 10 ) * 10;
    64                                 echo '<td data-sort-value="' . esc_attr( $percent ) . '" class="' . $percent_class .'"><a href="' . $projecturl . '">' . $percent . '%</a></td>';
     65                                echo '<td data-column-title="' . esc_attr( $project_name ) . '" data-sort-value="' . esc_attr( $percent ) . '" class="' . $percent_class .'"><a href="' . $projecturl . '">' . $percent . '%</a></td>';
    6566                            }
    6667
    6768                        } else {
    68                             echo '<td class="none" data-sort-value="-1">&mdash;</td>';
     69                            echo '<td class="none" data-column-title="" data-sort-value="-1">&mdash;</td>';
    6970                        }
    7071                    }
Note: See TracChangeset for help on using the changeset viewer.