[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

/gp-templates/ -> project-branch.php (source)

   1  <?php
   2  gp_title(
   3      sprintf(
   4          /* translators: %s: project name */
   5          __( 'Branch project "%s" &lt; GlotPress', 'glotpress' ),
   6          $project->name
   7      )
   8  );
   9  gp_breadcrumb_project( $project );
  10  gp_tmpl_header();
  11  ?>
  12  <h2>
  13      <?php
  14      printf(
  15          /* translators: %s: project name */
  16          __( 'Branch project "%s"', 'glotpress' ),
  17          esc_html( $project->name )
  18      );
  19      ?>
  20  </h2>
  21  <p><?php _e( 'Here you can branch out this project: everything will be duplicated into a new project for you.', 'glotpress' ); ?></p>
  22  <form action="<?php echo esc_url( gp_url_current() ); ?>" method="post">
  23      <dt><label for="project[name]"><?php _e( 'New branch name', 'glotpress' ); ?></label></dt>
  24      <dd><input type="text" name="project[name]" value="" placeholder="<?php esc_attr_e( 'Type tag project name here', 'glotpress' ); ?>" id="project[name]"></dd>
  25  
  26      <!-- TODO: make slug edit WordPress style -->
  27      <dt><label for="project[slug]"><?php _e( 'New Slug', 'glotpress' ); ?></label></dt>
  28      <dd>
  29          <input type="text" name="project[slug]" value="" id="project[slug]">
  30          <small><?php _e( 'If you leave the slug empty, it will be derived from the name.', 'glotpress' ); ?></small>
  31      </dd>
  32      <dt><label for="project[description]"><?php _e( 'Description', 'glotpress' ); ?></label> <span class="ternary"><?php _e( 'can include HTML', 'glotpress' ); ?></span></dt>
  33      <dd><textarea name="project[description]" rows="4" cols="40" id="project[description]"><?php echo esc_textarea( $project->description ); ?></textarea></dd>
  34      <dt><label for="project[source_url_template]"><?php _e( 'Source file URL', 'glotpress' ); ?></label></dt>
  35      <dd>
  36          <input type="text" value="<?php echo esc_html( $project->source_url_template ); ?>" name="project[source_url_template]" id="project[source_url_template]" style="width: 30em;" />
  37          <span class="ternary">
  38              <?php
  39              printf(
  40                  /* translators: 1: %file%, 2: %line%, 3: https://trac.example.org/browser/%file%#L%line% */
  41                  __( 'Public URL to a source file in the project. You can use %1$s and %2$s. Ex. %3$s', 'glotpress' ),
  42                  '<code>%file%</code>',
  43                  '<code>%line%</code>',
  44                  '<code>https://trac.example.org/browser/%file%#L%line%</code>'
  45              );
  46              ?>
  47          </span>
  48      </dd>
  49      <div id="preview"></div>
  50      <input type="hidden" value="<?php echo esc_html( $project->parent_project_id ); ?>" name="project[parent_project_id]" id="project[parent_project_id]" />
  51      <p><input class="button is-primary" type="submit" name="submit" value="<?php esc_attr_e( 'Branch project', 'glotpress' ); ?>" id="submit" /></p>
  52      <?php gp_route_nonce_field( 'branch-project_' . $project->id ); ?>
  53  </form>
  54  
  55  <?php
  56  gp_tmpl_footer();


Generated: Wed Apr 24 01:01:14 2024 Cross-referenced by PHPXref 0.7.1