[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

/gp-templates/ -> translation-row-editor-notes.php (source)

   1  <?php
   2  /**
   3   * Template for the notes section of the editor row in a translation set display
   4   *
   5   * @package    GlotPress
   6   * @subpackage Templates
   7   */
   8  
   9  $notes = GP::$notes->get_by_translation_id( $translation->id );
  10  if ( $translation->translation_status ) {
  11      if ( count( $notes ) > 0 ) {
  12  ?>
  13  <div class="notes">
  14      <h3><?php _e( 'Translation Notes', 'glotpress' ); ?></h3>
  15      <dl class="notes-list">
  16          <?php
  17              foreach ( $notes as $note ) {
  18                  gp_tmpl_load( 'note', get_defined_vars() );
  19              }
  20          ?>
  21      </dl>
  22      <dl>
  23      <?php
  24      }
  25  
  26      if ( GP::$permission->current_user_can(
  27          'approve',
  28          'translation',
  29          $translation->id,
  30          array(
  31              'translation' => $translation,
  32          )
  33      ) || get_current_user_id() === (int) $translation->user_id ) {
  34      ?>
  35              <dt><?php _e( 'New note:', 'glotpress' ); ?></dt>
  36              <dt><textarea autocomplete="off" class="foreign-text" name="note[<?php echo esc_attr( $translation->row_id ); ?>]" id="note_<?php echo esc_attr( $translation->row_id ); ?>"></textarea></dt>
  37              <dt><button class="add-note" tabindex="-1" data-nonce="<?php echo esc_attr( wp_create_nonce( 'new-note-' . $translation->id ) ); ?>"><?php _e( 'Add Note', 'glotpress' ); ?></button></dt>
  38      <?php
  39      }
  40      ?>
  41      </dl>
  42  </div>
  43  <?php
  44  }
  45  ?>


Generated: Fri Apr 17 01:01:46 2020 Cross-referenced by PHPXref 0.7.1