Making WordPress.org


Ignore:
Timestamp:
08/19/2015 04:33:54 AM (11 years ago)
Author:
dd32
Message:

Translate: Add a "No Projects found" message for when a view has nothing to show. This includes a few Waiting-tab specifics, linking directly to Waiting translations & customising the no-projects-with-waiting-strings message.

File:
1 edited

Legend:

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

    r1739 r1836  
    8787                }
    8888
    89                 $project_url = gp_url_join( '/locale', $locale_slug, $set_slug, $sub_project->path );
     89                // Link directly to the Waiting strings if we're in the Waiting view, otherwise link to the project overview
     90                if ( 'waiting' == $project->slug ) {
     91                        $project_url = gp_url_join( '/projects', $sub_project->path, $locale_slug, $set_slug ) . '?filters[status]=waiting';
     92                } else {
     93                        $project_url = gp_url_join( '/locale', $locale_slug, $set_slug, $sub_project->path );
     94                }
    9095
    9196                $project_icon = '';
     
    140145                </div>
    141146                <?php
     147        }
     148        if ( ! $sub_projects ) {
     149                if ( 'waiting' === $project->slug ) {
     150                        echo '<div class="no-projects-found">No projects with strings awaiting approval!</div>';
     151                } else {
     152                        echo '<div class="no-projects-found">No projects found.</div>';
     153                }
    142154        }
    143155        ?>
Note: See TracChangeset for help on using the changeset viewer.