Making WordPress.org

Changeset 1836


Ignore:
Timestamp:
08/19/2015 04:33:54 AM (10 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.

Location:
sites/trunk/translate.wordpress.org/public_html/gp-templates
Files:
2 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    ?>
  • sites/trunk/translate.wordpress.org/public_html/gp-templates/style.css

    r1808 r1836  
    808808}
    809809
     810.projects .no-projects-found {
     811    width: 100%;
     812    float: none;
     813    text-align: center;
     814    margin: 30px 0;
     815    font-size: 1.5em;
     816    color: #999;
     817    min-height: 5em;
     818}
     819
    810820/* Responsive styles */
    811821@media (max-width: 700px) {
Note: See TracChangeset for help on using the changeset viewer.