Making WordPress.org


Ignore:
Timestamp:
03/24/2019 03:15:29 PM (6 years ago)
Author:
ocean90
Message:

Translate: Add a filter to limit waiting view to projects without an assigned editor.

Fixes #3586.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/locale-projects.php

    r7617 r8496  
    8686<div class="sort-bar">
    8787    <form id="sort-filter" action="" method="GET">
     88        <input type="hidden" name="s" value="<?php echo esc_attr( $search ?? '' ); ?>"
    8889        <input type="hidden" name="page" value="1">
     90
     91        <?php if ( 'waiting' === $project->slug && is_user_logged_in() ) { ?>
     92            <input id="filter-without-editors" type="checkbox" name="without-editors" value="1"<?php checked( isset( $_GET['without-editors'] ) ); ?>>
     93            <label for="filter-without-editors">Limit to projects without editors</label>
     94            <span class="filter-sep" aria-hidden="true">|</span>
     95        <?php } ?>
     96
     97        <label for="filter">Filter:</label>
    8998        <select id="filter" name="filter">
    9099            <?php
     
    111120            ?>
    112121        </select>
     122        <button type="submit">Submit</button>
    113123    </form>
    114124</div>
    115 <script>
    116     var filterForm  = document.getElementById( 'sort-filter' );
    117     var filterSelect = document.getElementById( 'filter' );
    118     filterSelect.addEventListener( 'change', function() {
    119         filterForm.submit()
    120     } );
    121 </script>
    122 
    123125<div id="projects" class="projects">
    124126    <?php
Note: See TracChangeset for help on using the changeset viewer.