Making WordPress.org


Ignore:
Timestamp:
07/26/2015 04:42:45 PM (11 years ago)
Author:
ocean90
Message:

Rosetta: Update roles plugin to support sub projects.

props folletto for the design idea.
see #1101.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/global.wordpress.org/public_html/wp-content/mu-plugins/roles/views/edit-translation-editor.php

    r1419 r1786  
    1010                                        <th scope="row">
    1111                                                <?php _e( 'Add editor access for:', 'rosetta' ); ?><br>
    12                                                 <small style="font-weight:normal"><a href="#clear-all" id="clear-all"><?php _ex( 'Clear All', 'Deselects all checkboxes', 'rosetta' ); ?></a></small>
    1312                                        </th>
    1413                                        <td>
    15                                                 <fieldset>
     14                                                <fieldset id="projects">
    1615                                                        <legend class="screen-reader-text"><span><?php _e( 'Add editor access for:', 'rosetta' ); ?></span></legend>
    17                                                         <p>
    18                                                                 <label for="project-all">
    19                                                                         <input name="projects[]" id="project-all" value="all" type="checkbox"<?php checked( in_array( 'all', $project_access_list ) ); ?>> <?php _e( 'All projects &ndash; If selected, translation editor will have validation permissions for all projects, including newly-added projects.', 'rosetta' ); ?>
    20                                                                 </label>
    21                                                         </p>
    22                                                         <?php
    23                                                         foreach ( $projects as $project ) {
    24                                                                 $project_id = esc_attr( $project->id );
    25                                                                 printf(
    26                                                                         '<p><label for="project-%d"><input name="projects[]" id="project-%d" class="project" value="%d" type="checkbox"%s> %s</label></p>',
    27                                                                         $project_id,
    28                                                                         $project_id,
    29                                                                         $project_id,
    30                                                                         checked( in_array( $project->id, $project_access_list ), true, false ),
    31                                                                         esc_html( $project->name )
    32                                                                 );
    33                                                         }
    34                                                         ?>
    35                                                         <p class="description"><?php _e( 'Each project includes sub projects and newly-added sub projects.', 'rosetta' ); ?></p>
     16
     17                                                        <ul id="projects-list" class="projects-list">
     18                                                                <li id="project-all" class="active">
     19                                                                        <label>
     20                                                                                <input name="projects[]"value="all" type="checkbox"<?php checked( in_array( 'all', $project_access_list ) ); ?>> <?php _e( 'All projects', 'rosetta' ); ?>
     21                                                                        </label>
     22                                                                        <div class="sub-projects-wrapper">
     23                                                                                <?php _e( 'The translation editor has validation permissions for all projects, including newly-added projects.', 'rosetta' ); ?>
     24                                                                        </div>
     25                                                                </li>
     26                                                        </ul>
    3627                                                </fieldset>
     28                                                <p class="description"><?php _e( 'Each project includes sub projects and newly-added sub projects.', 'rosetta' ); ?></p>
    3729                                        </td>
    3830                                </tr>
Note: See TracChangeset for help on using the changeset viewer.