more cleanup work
This commit is contained in:
parent
c153688d93
commit
855cab5e1c
|
@ -855,6 +855,7 @@ class WhatDidTheySayAdmin {
|
|||
}
|
||||
|
||||
$transcript_options = new WDTSTranscriptOptions($post->ID);
|
||||
$queued_transcripts = new WDTSQueuedTranscript($post->ID);
|
||||
|
||||
$language_options = new WDTSLanguageOptions();
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="queued-transcript-holder" id="wdts-<?php echo $id = md5(rand()) ?>">
|
||||
<div class="queued-transcript-holder" id="wdts-<?php echo $queued_id = md5(rand()) ?>">
|
||||
<?php include(dirname(__FILE__) . '/_queued-transcript-contents.inc') ?>
|
||||
</div>
|
||||
<script type="text/javascript">queued_editors_to_attach.push('wdts-<?php echo $id ?>');</script>
|
||||
<script type="text/javascript">queued_editors_to_attach.push('wdts-<?php echo $queued_id ?>');</script>
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
<?php
|
||||
|
||||
|
||||
$transcripts_to_show = array();
|
||||
|
||||
if (current_user_can('approve_transcriptions')) {
|
||||
$transcripts_to_show = $queued_transcripts->get_transcripts();
|
||||
$transcripts_to_show = $queued_transcript_object->get_transcripts();
|
||||
$title = __('All Submitted Transcripts', 'what-did-they-say');
|
||||
} else {
|
||||
if (!is_admin()) {
|
||||
$user = wp_get_current_user();
|
||||
if (!empty($user)) {
|
||||
$transcripts_to_show = $queued_transcripts->get_transcripts_for_user($user->ID);
|
||||
$transcripts_to_show = $queued_transcript_object->get_transcripts_for_user($user->ID);
|
||||
$title = __('Your Submitted Transcripts', 'what-did-they-say');
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +19,7 @@
|
|||
<h3 style="margin-top: 0.5em"><?php echo $title ?></h3>
|
||||
<?php
|
||||
foreach ($transcripts_to_show as $transcript) {
|
||||
include(dirname(__FILE__) . '/classes/partials/_display-queued-transcript.inc');
|
||||
include('_display-queued-transcript.inc');
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<?php $transcript_user = get_userdata($transcript['user_id']) ?>
|
||||
<input type="hidden" name="wdts[language]" value="<?php echo $transcript['language'] ?>" />
|
||||
<input type="hidden" name="wdts[post_id]" value="<?php echo $post->ID ?>" />
|
||||
<input type="hidden" name="wdts[key]" value="<?php echo $transcript['key'] ?>" />
|
||||
<p><?php
|
||||
printf(
|
||||
__('From <strong>%s</strong> in <strong>%s</strong>:', 'what-did-they-say'),
|
||||
$user->display_name,
|
||||
$transcript_user->display_name,
|
||||
$language_options->get_language_name($transcript['language'])
|
||||
)
|
||||
?></p>
|
||||
|
|
|
@ -184,7 +184,7 @@ function the_media_transcript_queue_editor() {
|
|||
global $post;
|
||||
|
||||
if (current_user_can('submit_transcriptions')) {
|
||||
$queued_transcripts = new WDTSQueuedTranscript($post->ID);
|
||||
$queued_transcript_object = new WDTSQueuedTranscript($post->ID);
|
||||
|
||||
$language_options = new WDTSLanguageOptions();
|
||||
|
||||
|
@ -204,7 +204,7 @@ function the_media_transcript_queue_editor() {
|
|||
|
||||
?>
|
||||
<div style="display:none">
|
||||
[ <a id="wdts-opener-<?php echo $id = md5(rand()) ?>" href="#"><?php _e('Edit/Add Transcripts', 'what-did-they-say') ?></a> ]
|
||||
<span id="wdts-opener-<?php echo $id = md5(rand()) ?>">[ <a href="#"><?php _e('Edit/Add Transcripts', 'what-did-they-say') ?></a> ]</span>
|
||||
</div>
|
||||
<noscript>
|
||||
<p>JavaScript is required to edit transcripts.</p>
|
||||
|
|
Loading…
Reference in New Issue