function gp_project_links_from_root($leaf_project) { $links = array(); $path_from_root = array_reverse($leaf_project->path_to_root()); $links[] = empty($path_from_root) ? __('Projects') : gp_link_get(gp_url('/projects'), __('Projects')); foreach ($path_from_root as $project) { $links[] = gp_link_project_get($project, esc_html($project->name)); } return $links; }
<?php gp_title(sprintf(__('Permissions < %s < %s < GlotPress'), $translation_set->name, $project->name)); gp_breadcrumb(array(gp_link_project_get($project, $project->name), $locale->english_name, 'default' != $translation_set->slug ? $translation_set->name : '', 'Permissions')); gp_tmpl_header(); ?> <h2>Permissions</h2> <ul id="translation-set-permissions"> <?php foreach ($permissions as $permission) { ?> <li> <span class="permission-action">user</span> <span class="user"><?php echo esc_html($permission->user->user_login); ?> </span> <span class="permission-action">can <?php echo esc_html($permission->action); ?> </span> <a href="<?php echo gp_url_join(gp_url_current(), '_delete/' . $permission->id); ?> " class="action delete">Remove</a> </li> <?php } if (!$permissions) { ?> <strong>No validators defined for this translation set.</strong>
<?php gp_title(sprintf(__('%s < GlotPress'), esc_html($project->name))); gp_breadcrumb(array(gp_link_project_get($project, $project->name))); wp_enqueue_script('common'); gp_tmpl_header(); if ($sub_projects) { ?> <ul> <?php foreach ($sub_projects as $sub_project) { ?> <li> <?php gp_link_project($sub_project, esc_html($sub_project->name)); ?> <?php gp_link_project_edit($sub_project); ?> <?php gp_link_project_delete($sub_project); ?> </li> <?php } ?> </ul> <?php }
<?php gp_title(sprintf(__('Edit Translation Set < %s < %s < GlotPress'), $set->name, $project->name)); gp_breadcrumb(array(gp_link_project_get($project, $project->name), gp_link_get($url, $locale->english_name . 'default' != $set->slug ? ' ' . $set->name : ''))); gp_tmpl_header(); ?> <h2><?php _e('Edit Translation Set'); ?> </h2> <form action="" method="post"> <?php gp_tmpl_load('translation-set-form', get_defined_vars()); ?> <p> <input type="submit" name="submit" value="<?php echo esc_attr(__('Save')); ?> " id="submit" /> <span class="or-cancel">or <a href="javascript:history.back();">Cancel</a></span> </p> </form> <?php gp_tmpl_footer();
<?php gp_title($kind == 'originals' ? sprintf(__('Import Originals < %s < GlotPress'), esc_html($project->name)) : sprintf(__('Import Translations < %s < GlotPress'), esc_html($project->name))); gp_breadcrumb(array(gp_link_project_get($project, $project->name), $kind == 'originals' ? __('Import originals') : __('Import translations'))); gp_tmpl_header(); ?> <form action="" method="post" enctype="multipart/form-data"> <p> <label for="mo-file"><?php echo __('MO file'); ?> </label><input type="file" name="mo-file" id="mo-file" /> </p> <p> <label for="pot-file"><?php echo __('PO/POT file'); ?> </label><input type="file" name="pot-file" id="pot-file" /> </p> <p><input type="submit" value="<?php echo esc_attr(__('Import')); ?> "></p> </form> <?php gp_tmpl_footer();