2009-08-16 16:40:54 +00:00
|
|
|
<input type="hidden" name="wdts[_nonce]" value="<?php echo $nonce ?>" />
|
2009-09-11 01:20:01 +00:00
|
|
|
<input type="hidden" name="wdts[module]" value="manage-post-transcripts" />
|
2009-08-16 16:40:54 +00:00
|
|
|
<input type="hidden" name="wdts[post_id]" value="<?php echo $post->ID ?>" />
|
2009-08-15 20:45:08 +00:00
|
|
|
<p>
|
|
|
|
<label>
|
2009-09-13 16:35:20 +00:00
|
|
|
<input type="checkbox" name="wdts[allow_on_post]" value="yes" <?php echo ($transcript_options->are_new_transcripts_allowed()) ? 'checked="checked"' : '' ?> />
|
2009-08-19 02:33:59 +00:00
|
|
|
<?php _e('Allow new transcripts to be submitted for this post', 'what-did-they-say') ?>
|
|
|
|
</label>
|
|
|
|
</p>
|
2009-09-11 01:20:01 +00:00
|
|
|
<?php if (is_array($queued_transcripts) && !empty($queued_transcripts)) { ?>
|
2009-08-19 22:54:12 +00:00
|
|
|
<p><strong><?php _e('Manage queued transcripts:', 'what-did-they-say') ?></strong></p>
|
2009-09-11 01:20:01 +00:00
|
|
|
<?php foreach ($queued_transcripts as $transcript) {
|
2009-09-13 16:35:20 +00:00
|
|
|
$user = get_userdata($transcript['user_id']);
|
2009-08-19 22:54:12 +00:00
|
|
|
if (!empty($user)) { ?>
|
|
|
|
|
|
|
|
<div class="queued-transcription-holder">
|
2009-09-13 16:35:20 +00:00
|
|
|
<input type="hidden" name="wdts[language]" value="<?php echo $transcript['language'] ?>" />
|
|
|
|
<input type="hidden" name="wdts[key]" value="<?php echo $transcript['key'] ?>" />
|
2009-08-19 22:54:12 +00:00
|
|
|
<p><?php
|
|
|
|
printf(
|
|
|
|
__('From <strong>%s</strong> in <strong>%s</strong>:', 'what-did-they-say'),
|
|
|
|
$user->display_name,
|
2009-09-13 16:35:20 +00:00
|
|
|
$language_options->get_language_name($transcript['language'])
|
2009-08-19 22:54:12 +00:00
|
|
|
)
|
|
|
|
?></p>
|
2009-09-13 16:35:20 +00:00
|
|
|
<div class="queued-transcription"><?php echo $transcript['transcript'] ?></div>
|
|
|
|
<div class="queued-transcription-raw" style="display:none"><?php echo $transcript['transcript'] ?></div>
|
2009-08-19 22:54:12 +00:00
|
|
|
<div style="padding: 10px 0">
|
|
|
|
<a href="#" class="approve-transcript button">Approve</a>
|
|
|
|
<a href="#" class="delete-transcript button">Delete</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
<?php } ?>
|
|
|
|
<?php } ?>
|
2009-08-19 02:33:59 +00:00
|
|
|
<p>
|
|
|
|
<label>
|
2009-08-19 22:54:12 +00:00
|
|
|
<?php _e('Edit provided transcript for:', 'what-did-they-say') ?>
|
2009-08-15 20:45:08 +00:00
|
|
|
<select name="wdts[language]" id="wdts-language">
|
|
|
|
<?php foreach ($options['languages'] as $code => $info) { ?>
|
|
|
|
<option value="<?php echo $code ?>" <?php echo $info['default'] ? 'selected="selected"' : '' ?>><?php echo $info['name'] ?></option>
|
|
|
|
<?php } ?>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
|
2009-09-24 01:34:06 +00:00
|
|
|
<div id="wdts-shorttags">
|
|
|
|
<button class="wdts-create" id="wdts-scene-heading">Scene Heading</button>
|
|
|
|
<button class="wdts-create" id="wdts-scene-action">Scene Action</button>
|
|
|
|
<button class="wdts-create" id="wdts-dialog">Dialog</button>
|
|
|
|
</div>
|
|
|
|
|
2009-09-13 18:46:02 +00:00
|
|
|
<?php foreach (array_keys($options['languages']) as $code) {
|
|
|
|
$approved_transcript_text = '';
|
|
|
|
foreach ($approved_transcripts as $transcript) {
|
|
|
|
if ($transcript['language'] == $code) { $approved_transcript_text = $transcript['transcript']; break; }
|
|
|
|
} ?>
|
|
|
|
<textarea class="edit-transcript" id="wdts-transcripts-<?php echo $code ?>" name="wdts[transcripts][<?php echo $code ?>]" style="display: none; width: 100%; height: 200px"><?php echo $approved_transcript_text ?></textarea>
|
2009-08-15 20:45:08 +00:00
|
|
|
<?php } ?>
|
|
|
|
</p>
|
2009-08-19 22:54:12 +00:00
|
|
|
|
2009-09-13 16:35:20 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
var language_selector = $('wdts-language');
|
|
|
|
var ajax_url = '<?php echo $_SERVER['REQUEST_URI'] ?>';
|
|
|
|
var nonce = '<?php echo $nonce ?>';
|
|
|
|
|
|
|
|
var messages = {
|
|
|
|
'overwrite': '<?php _e('This will overwrite the current transcript. Are you sure?', 'what-did-they-say') ?>',
|
|
|
|
'delete': '<?php _e('This will delete the queued transcript. Are you sure?', 'what-did-they-say') ?>',
|
|
|
|
'approved': '<?php _e('Transcript approved and posted. You can further edit it below.', 'what-did-they-say') ?>',
|
2009-09-24 01:34:06 +00:00
|
|
|
'deleted': '<?php _e('Transcript deleted.', 'what-did-they-say') ?>',
|
|
|
|
'scene_heading': '<?php _e('Enter the scene heading:', 'what-did-they-say') ?>',
|
|
|
|
'scene_action': '<?php _e('Enter the scene action:', 'what-did-they-say') ?>',
|
|
|
|
'dialog_name': '<?php _e('Enter the character name:', 'what-did-they-say') ?>',
|
|
|
|
'dialog_direction': '<?php _e('Enter the direction in which the character is speaking:', 'what-did-they-say') ?>',
|
|
|
|
'dialog_speech': '<?php _e('Enter what the character is speaking:', 'what-did-they-say') ?>',
|
2009-09-13 16:35:20 +00:00
|
|
|
};
|
2009-09-24 01:34:06 +00:00
|
|
|
</script>
|
|
|
|
<script type="text/javascript" src="<?php echo plugin_dir_url(dirname(__FILE__)) . '../js/edit-transcripts.js' ?>"></script>
|